Fix possible AttributeError
This commit is contained in:
parent
c3b649c1b1
commit
3016c9747f
1 changed files with 3 additions and 2 deletions
|
@ -466,8 +466,9 @@ class PlaylistEventhandler(FileSystemEventHandler):
|
||||||
LOG.debug('on_modified: %s', event.src_path)
|
LOG.debug('on_modified: %s', event.src_path)
|
||||||
old_playlist = playlist_object_from_db(path=event.src_path)
|
old_playlist = playlist_object_from_db(path=event.src_path)
|
||||||
new_playlist = PL.Playlist_Object()
|
new_playlist = PL.Playlist_Object()
|
||||||
# Retain the name! Might've vom from Plex
|
if old_playlist:
|
||||||
new_playlist.plex_name = old_playlist.plex_name
|
# 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_path = event.src_path
|
||||||
new_playlist.kodi_hash = utils.generate_file_md5(event.src_path)
|
new_playlist.kodi_hash = utils.generate_file_md5(event.src_path)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Reference in a new issue