Optimize logging
This commit is contained in:
parent
120a616331
commit
f8c6b21f51
3 changed files with 8 additions and 13 deletions
|
@ -98,8 +98,7 @@ class Movie(ItemBase):
|
||||||
api.date_created())
|
api.date_created())
|
||||||
|
|
||||||
if update_item:
|
if update_item:
|
||||||
LOG.info('UPDATE movie plex_id: %s - Title: %s',
|
LOG.info('UPDATE movie plex_id: %s - %s', plex_id, api.title())
|
||||||
plex_id, api.title())
|
|
||||||
if file_id != old_kodi_fileid:
|
if file_id != old_kodi_fileid:
|
||||||
self.kodi_db.remove_file(old_kodi_fileid)
|
self.kodi_db.remove_file(old_kodi_fileid)
|
||||||
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
||||||
|
@ -123,7 +122,7 @@ class Movie(ItemBase):
|
||||||
self.kodi_db.remove_uniqueid(kodi_id, v.KODI_TYPE_MOVIE)
|
self.kodi_db.remove_uniqueid(kodi_id, v.KODI_TYPE_MOVIE)
|
||||||
uniqueid = -1
|
uniqueid = -1
|
||||||
else:
|
else:
|
||||||
LOG.info("ADD movie plex_id: %s - Title: %s", plex_id, title)
|
LOG.info("ADD movie plex_id: %s - %s", plex_id, title)
|
||||||
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
||||||
v.KODI_TYPE_MOVIE)
|
v.KODI_TYPE_MOVIE)
|
||||||
self.kodi_db.add_ratings(rating_id,
|
self.kodi_db.add_ratings(rating_id,
|
||||||
|
|
|
@ -497,7 +497,7 @@ class Song(ItemBase, MusicMixin):
|
||||||
|
|
||||||
# UPDATE THE SONG #####
|
# UPDATE THE SONG #####
|
||||||
if update_item:
|
if update_item:
|
||||||
LOG.info("UPDATE song plex_id: %s - Title: %s", plex_id, title)
|
LOG.info("UPDATE song plex_id: %s - %s", plex_id, title)
|
||||||
# Use dummy strHash '123' for Kodi
|
# Use dummy strHash '123' for Kodi
|
||||||
query = "UPDATE path SET strPath = ?, strHash = ? WHERE idPath = ?"
|
query = "UPDATE path SET strPath = ?, strHash = ? WHERE idPath = ?"
|
||||||
self.kodicursor.execute(query, (path, '123', kodi_pathid))
|
self.kodicursor.execute(query, (path, '123', kodi_pathid))
|
||||||
|
@ -574,7 +574,7 @@ class Song(ItemBase, MusicMixin):
|
||||||
|
|
||||||
# OR ADD THE SONG #####
|
# OR ADD THE SONG #####
|
||||||
else:
|
else:
|
||||||
LOG.info("ADD song plex_id: %s - Title: %s", plex_id, title)
|
LOG.info("ADD song plex_id: %s - %s", plex_id, title)
|
||||||
# Add path
|
# Add path
|
||||||
kodi_pathid = self.kodi_db.add_music_path(path, hash_string="123")
|
kodi_pathid = self.kodi_db.add_music_path(path, hash_string="123")
|
||||||
# Get the album
|
# Get the album
|
||||||
|
|
|
@ -181,8 +181,7 @@ class Show(ItemBase, TvShowMixin):
|
||||||
id_parent_path=toppathid)
|
id_parent_path=toppathid)
|
||||||
# UPDATE THE TVSHOW #####
|
# UPDATE THE TVSHOW #####
|
||||||
if update_item:
|
if update_item:
|
||||||
LOG.info("UPDATE tvshow plex_id: %s - Title: %s",
|
LOG.info("UPDATE tvshow plex_id: %s - %s", plex_id, api.title())
|
||||||
plex_id, api.title())
|
|
||||||
# update new ratings Kodi 17
|
# update new ratings Kodi 17
|
||||||
rating_id = self.kodi_db.get_ratingid(kodi_id, v.KODI_TYPE_SHOW)
|
rating_id = self.kodi_db.get_ratingid(kodi_id, v.KODI_TYPE_SHOW)
|
||||||
self.kodi_db.update_ratings(kodi_id,
|
self.kodi_db.update_ratings(kodi_id,
|
||||||
|
@ -217,8 +216,7 @@ class Show(ItemBase, TvShowMixin):
|
||||||
kodi_id))
|
kodi_id))
|
||||||
# OR ADD THE TVSHOW #####
|
# OR ADD THE TVSHOW #####
|
||||||
else:
|
else:
|
||||||
LOG.info("ADD tvshow plex_id: %s - Title: %s",
|
LOG.info("ADD tvshow plex_id: %s - %s", plex_id, api.title())
|
||||||
plex_id, api.title())
|
|
||||||
# Link the path
|
# Link the path
|
||||||
query = "INSERT INTO tvshowlinkpath(idShow, idPath) values (?, ?)"
|
query = "INSERT INTO tvshowlinkpath(idShow, idPath) values (?, ?)"
|
||||||
self.kodicursor.execute(query, (kodi_id, kodi_pathid))
|
self.kodicursor.execute(query, (kodi_id, kodi_pathid))
|
||||||
|
@ -438,8 +436,7 @@ class Episode(ItemBase, TvShowMixin):
|
||||||
|
|
||||||
# UPDATE THE EPISODE #####
|
# UPDATE THE EPISODE #####
|
||||||
if update_item:
|
if update_item:
|
||||||
LOG.info("UPDATE episode plex_id: %s, Title: %s",
|
LOG.info("UPDATE episode plex_id: %s - %s", plex_id, api.title())
|
||||||
plex_id, api.title())
|
|
||||||
if kodi_fileid != old_kodi_fileid:
|
if kodi_fileid != old_kodi_fileid:
|
||||||
self.kodi_db.remove_file(old_kodi_fileid)
|
self.kodi_db.remove_file(old_kodi_fileid)
|
||||||
ratingid = self.kodi_db.get_ratingid(kodi_id,
|
ratingid = self.kodi_db.get_ratingid(kodi_id,
|
||||||
|
@ -475,8 +472,7 @@ class Episode(ItemBase, TvShowMixin):
|
||||||
|
|
||||||
# OR ADD THE EPISODE #####
|
# OR ADD THE EPISODE #####
|
||||||
else:
|
else:
|
||||||
LOG.info("ADD episode plex_id: %s - Title: %s",
|
LOG.info("ADD episode plex_id: %s - %s", plex_id, api.title())
|
||||||
plex_id, api.title())
|
|
||||||
# Create the episode entry
|
# Create the episode entry
|
||||||
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
rating_id = self.kodi_db.get_ratingid(kodi_id,
|
||||||
v.KODI_TYPE_EPISODE)
|
v.KODI_TYPE_EPISODE)
|
||||||
|
|
Loading…
Reference in a new issue