Cleanly remove all file references

This commit is contained in:
croneter 2018-03-11 12:00:28 +01:00
parent 456ef5cb34
commit 9101f49895
2 changed files with 2 additions and 12 deletions

View file

@ -479,13 +479,10 @@ class Movies(Items):
self.kodi_db.modify_genres(kodi_id, kodi_type)
self.kodi_db.modify_studios(kodi_id, kodi_type)
self.kodi_db.modify_tags(kodi_id, kodi_type)
self.kodi_db.modify_streams(file_id)
self.kodi_db.delete_playstate(file_id)
# Delete kodi movie and file
self.kodi_db.remove_file(file_id)
kodicursor.execute("DELETE FROM movie WHERE idMovie = ?",
(kodi_id,))
kodicursor.execute("DELETE FROM files WHERE idFile = ?",
(file_id,))
if set_id:
self.kodi_db.delete_possibly_empty_set(set_id)
if v.KODIVERSION >= 17:
@ -1149,8 +1146,7 @@ class TVShows(Items):
"""
kodicursor = self.kodicursor
self.kodi_db.modify_people(kodi_id, v.KODI_TYPE_EPISODE)
self.kodi_db.modify_streams(file_id)
self.kodi_db.delete_playstate(file_id)
self.kodi_db.remove_file(file_id)
self.artwork.delete_artwork(kodi_id, "episode", kodicursor)
kodicursor.execute("DELETE FROM episode WHERE idEpisode = ?",
(kodi_id,))

View file

@ -686,12 +686,6 @@ class KodiDBMethods(object):
'',
1))
def delete_playstate(self, file_id):
"""
Removes all playstates/bookmarks for the file with file_id
"""
self.cursor.execute('DELETE FROM bookmark where idFile = ?', (file_id,))
def createTag(self, name):
# This will create and return the tag_id
query = ' '.join((