Optimize logging

This commit is contained in:
Croneter 2018-05-02 16:57:27 +02:00
parent 5fd6587ff7
commit 0baa081dc6

View file

@ -94,8 +94,7 @@ def create_kodi_playlist(plex_id=None, updated_at=None):
playlist.type = v.KODI_PLAYLIST_TYPE_FROM_PLEX[api.playlist_type()]
playlist.plex_name = api.title()
playlist.plex_updatedat = updated_at
LOG.info('Creating new Kodi playlist from Plex playlist %s: %s',
playlist.id, playlist.plex_name)
LOG.info('Creating new Kodi playlist from Plex playlist: %s', playlist)
name = utils.valid_filename(playlist.plex_name)
path = os.path.join(v.PLAYLIST_PATH, playlist.type, '%s.m3u' % name)
while exists(path) or playlist_object_from_db(path=path):
@ -116,8 +115,7 @@ def create_kodi_playlist(plex_id=None, updated_at=None):
# Derive filename close to Plex playlist name
_write_playlist_to_file(playlist, xml)
update_plex_table(playlist, update_kodi_hash=True)
LOG.info('Created Kodi playlist %s based on Plex playlist %s',
playlist.kodi_filename, playlist.plex_name)
LOG.info('Created Kodi playlist based on Plex playlist: %s', playlist)
def delete_kodi_playlist(playlist):