From 3016c9747fdf96094a80a428b68378edda4ddc8a Mon Sep 17 00:00:00 2001 From: Croneter Date: Wed, 2 May 2018 17:59:06 +0200 Subject: [PATCH] Fix possible AttributeError --- resources/lib/playlists.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/lib/playlists.py b/resources/lib/playlists.py index 717c3fe2..1b0a88ed 100644 --- a/resources/lib/playlists.py +++ b/resources/lib/playlists.py @@ -466,8 +466,9 @@ 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() - # Retain the name! Might've vom from Plex - new_playlist.plex_name = old_playlist.plex_name + 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 new_playlist.kodi_hash = utils.generate_file_md5(event.src_path) try: