Fix AttributeError for setting playlist path
This commit is contained in:
parent
151c679e29
commit
892458981d
1 changed files with 2 additions and 4 deletions
|
@ -3,6 +3,7 @@
|
||||||
Collection of functions associated with Kodi and Plex playlists and playqueues
|
Collection of functions associated with Kodi and Plex playlists and playqueues
|
||||||
"""
|
"""
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
import os
|
||||||
from urllib import quote
|
from urllib import quote
|
||||||
from urlparse import parse_qsl, urlsplit
|
from urlparse import parse_qsl, urlsplit
|
||||||
from re import compile as re_compile
|
from re import compile as re_compile
|
||||||
|
@ -130,10 +131,7 @@ class Playlist_Object(PlaylistObjectBaseclase):
|
||||||
|
|
||||||
@kodi_path.setter
|
@kodi_path.setter
|
||||||
def kodi_path(self, path):
|
def kodi_path(self, path):
|
||||||
if '/' in path:
|
file = os.path.dirname(path)
|
||||||
file = path.rsplit('/', 1)
|
|
||||||
else:
|
|
||||||
file = path.rsplit('\\', 1)
|
|
||||||
try:
|
try:
|
||||||
self.kodi_filename, self.kodi_extension = file.split('.', 1)[1]
|
self.kodi_filename, self.kodi_extension = file.split('.', 1)[1]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Reference in a new issue