Fix IndexError for certain Plex channels

- Fixes #454
This commit is contained in:
Croneter 2018-04-23 07:39:36 +02:00
parent a376dbe2a5
commit 7bc5f3ad16

View file

@ -124,8 +124,12 @@ class API(object):
# Local path # Local path
filename = ans.rsplit("\\", 1)[1] filename = ans.rsplit("\\", 1)[1]
else: else:
try:
# Network share # Network share
filename = ans.rsplit("/", 1)[1] filename = ans.rsplit("/", 1)[1]
except IndexError:
# E.g. certain Plex channels
filename = None
return filename return filename
def file_path(self, force_first_media=False): def file_path(self, force_first_media=False):