Delete studios from the Kodi DB
This commit is contained in:
parent
bad32e90ab
commit
652f5757cf
2 changed files with 12 additions and 0 deletions
|
@ -483,6 +483,7 @@ class Movies(Items):
|
|||
self.kodi_db.delete_countries(kodi_id, kodi_type)
|
||||
self.kodi_db.delete_people(kodi_id, kodi_type)
|
||||
self.kodi_db.delete_genre(kodi_id, kodi_type)
|
||||
self.kodi_db.delete_studios(kodi_id, kodi_type)
|
||||
# Delete kodi movie and file
|
||||
kodicursor.execute("DELETE FROM movie WHERE idMovie = ?",
|
||||
(kodi_id,))
|
||||
|
@ -1207,6 +1208,7 @@ class TVShows(Items):
|
|||
"""
|
||||
kodicursor = self.kodicursor
|
||||
self.kodi_db.delete_genre(kodi_id, v.KODI_TYPE_SHOW)
|
||||
self.kodi_db.delete_studios(kodi_id, v.KODI_TYPE_SHOW)
|
||||
self.artwork.deleteArtwork(kodi_id, v.KODI_TYPE_SHOW, kodicursor)
|
||||
kodicursor.execute("DELETE FROM tvshow WHERE idShow = ?", (kodi_id,))
|
||||
if v.KODIVERSION >= 17:
|
||||
|
|
|
@ -548,6 +548,16 @@ class KodiDBMethods(object):
|
|||
''')
|
||||
self.cursor.execute(query, (studioid, kodiid, mediatype))
|
||||
|
||||
def delete_studios(self, kodi_id, kodi_type):
|
||||
"""
|
||||
Removes the studio links as well as orphaned studios from the Kodi DB
|
||||
"""
|
||||
self._delete_from_link_and_table(kodi_id,
|
||||
kodi_type,
|
||||
'studio_link',
|
||||
'studio',
|
||||
'studio_id')
|
||||
|
||||
def addStreams(self, fileid, streamdetails, runtime):
|
||||
|
||||
# First remove any existing entries
|
||||
|
|
Loading…
Reference in a new issue