From 892458981dcc0fc21699243eb248c7507a40eda4 Mon Sep 17 00:00:00 2001 From: Croneter Date: Tue, 1 May 2018 15:21:29 +0200 Subject: [PATCH] Fix AttributeError for setting playlist path --- resources/lib/playlist_func.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/lib/playlist_func.py b/resources/lib/playlist_func.py index 87b0afa5..90ce4168 100644 --- a/resources/lib/playlist_func.py +++ b/resources/lib/playlist_func.py @@ -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: