Merge pull request #238 from mcarlton00/delete-artwork

Add ability to delete artwork from database
This commit is contained in:
Abby 2020-03-20 23:41:08 +00:00 committed by GitHub
commit 69bb8bca04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -83,4 +83,10 @@ class Artwork(object):
self.update(*(artwork['Primary'],) + args + (kodi_image,))
elif artwork.get(art):
self.update(*(artwork[art],) + args + (KODI[art],))
self.update(*(artwork[art],) + args + (KODI[art],))
def delete(self, *args):
''' Delete artwork from kodi database
'''
self.cursor.execute(QU.delete_art, args)

View file

@ -551,6 +551,11 @@ delete_episode = """
DELETE FROM episode
WHERE idEpisode = ?
"""
delete_art = """
DELETE FROM art
WHERE media_id = ?
AND media_type = ?
"""
delete_backdrops = """
DELETE FROM art
WHERE media_id = ?