2021-12-09 Fred Gleason <fredg@paravelsystems.com>

* Added a 'RemovePodcast()' method to the 'rivwebpyapi' API.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2021-12-09 15:37:46 -05:00
parent e00bf0c53f
commit 6409a778a1
4 changed files with 105 additions and 0 deletions

View File

@@ -1862,6 +1862,35 @@ class rivwebpyapi(object):
if(r.status_code!=requests.codes.ok):
self.__throwError(response=r)
def RemovePodcast(self,cast_id):
"""
Delete podcast audio from 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': '41',
'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 TrimAudio(self,cart_number,cut_number,trim_level):
"""
Return time pointers to the first and last instance of a