Fix error message upon playlist deletion
This commit is contained in:
parent
81b1d18192
commit
63c829b042
2 changed files with 4 additions and 14 deletions
|
@ -869,11 +869,5 @@ def delete_playlist_from_pms(playlist):
|
||||||
"""
|
"""
|
||||||
Deletes the playlist from the PMS
|
Deletes the playlist from the PMS
|
||||||
"""
|
"""
|
||||||
xml = DU().downloadUrl("{server}/%ss/%s" %
|
DU().downloadUrl("{server}/%ss/%s" % (playlist.kind.lower(), playlist.id),
|
||||||
(playlist.kind.lower(), playlist.id),
|
action_type="DELETE")
|
||||||
action_type="DELETE")
|
|
||||||
try:
|
|
||||||
xml.attrib
|
|
||||||
except (TypeError, AttributeError):
|
|
||||||
LOG.error('Could not delete playlist from server: %s', playlist)
|
|
||||||
raise PlaylistError('Could not delete playlist %s' % playlist)
|
|
||||||
|
|
|
@ -79,12 +79,8 @@ def delete_plex_playlist(playlist):
|
||||||
Returns None or raises PL.PlaylistError
|
Returns None or raises PL.PlaylistError
|
||||||
"""
|
"""
|
||||||
LOG.info('Deleting playlist %s from the PMS', playlist.plex_name)
|
LOG.info('Deleting playlist %s from the PMS', playlist.plex_name)
|
||||||
try:
|
PL.delete_playlist_from_pms(playlist)
|
||||||
PL.delete_playlist_from_pms(playlist)
|
update_plex_table(playlist, delete=True)
|
||||||
except PL.PlaylistError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
update_plex_table(playlist, delete=True)
|
|
||||||
|
|
||||||
|
|
||||||
def create_kodi_playlist(plex_id=None, updated_at=None):
|
def create_kodi_playlist(plex_id=None, updated_at=None):
|
||||||
|
|
Loading…
Add table
Reference in a new issue