Fix possible AttributeError

This commit is contained in:
Croneter 2018-05-02 17:59:06 +02:00
parent c3b649c1b1
commit 3016c9747f

View file

@ -466,6 +466,7 @@ class PlaylistEventhandler(FileSystemEventHandler):
LOG.debug('on_modified: %s', event.src_path)
old_playlist = playlist_object_from_db(path=event.src_path)
new_playlist = PL.Playlist_Object()
if old_playlist:
# Retain the name! Might've vom from Plex
new_playlist.plex_name = old_playlist.plex_name
new_playlist.kodi_path = event.src_path