Fix AttributeError for setting playlist path

This commit is contained in:
Croneter 2018-05-01 15:21:29 +02:00
parent 151c679e29
commit 892458981d

View file

@ -3,6 +3,7 @@
Collection of functions associated with Kodi and Plex playlists and playqueues
"""
from logging import getLogger
import os
from urllib import quote
from urlparse import parse_qsl, urlsplit
from re import compile as re_compile
@ -130,10 +131,7 @@ class Playlist_Object(PlaylistObjectBaseclase):
@kodi_path.setter
def kodi_path(self, path):
if '/' in path:
file = path.rsplit('/', 1)
else:
file = path.rsplit('\\', 1)
file = os.path.dirname(path)
try:
self.kodi_filename, self.kodi_extension = file.split('.', 1)[1]
except ValueError: