mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-18 16:41:18 +02:00
2021-12-09 Fred Gleason <fredg@paravelsystems.com>
* Added a 'PostPodcast()' method to the 'rivwebpyapi' API. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -1730,6 +1730,36 @@ class rivwebpyapi(object):
|
||||
|
||||
return handler.output()[0]
|
||||
|
||||
def PostPodcast(self,cast_id):
|
||||
"""
|
||||
Upload podcast audio from the Rivendell audio store to the
|
||||
remote archive.
|
||||
|
||||
Takes the following argument:
|
||||
|
||||
cast_id - ID of the owning podcast item (integer).
|
||||
"""
|
||||
|
||||
if(cast_id<0):
|
||||
raise ValueError('invalid podcast ID')
|
||||
|
||||
#
|
||||
# Build the WebAPI arguments
|
||||
#
|
||||
postdata={
|
||||
'COMMAND': '40',
|
||||
'LOGIN_NAME': self.__connection_username,
|
||||
'PASSWORD': self.__connection_password,
|
||||
'ID': str(cast_id)
|
||||
}
|
||||
|
||||
#
|
||||
# Fetch the audio data
|
||||
#
|
||||
r=requests.post(self.__connection_url,data=postdata)
|
||||
if(r.status_code!=requests.codes.ok):
|
||||
self.__throwError(response=r)
|
||||
|
||||
def Rehash(self,cart_number,cut_number):
|
||||
"""
|
||||
Update the SHA1 hash entry in the database from the contents of
|
||||
|
Reference in New Issue
Block a user