From f8d069e3ea2659f15cdbce188c0d05bf55027a4b Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 26 May 2016 22:09:13 +0200 Subject: fix kodi plugin --- mediabrowser/__init__.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mediabrowser/__init__.py') diff --git a/mediabrowser/__init__.py b/mediabrowser/__init__.py index 5faed84..139fbf3 100644 --- a/mediabrowser/__init__.py +++ b/mediabrowser/__init__.py @@ -297,20 +297,16 @@ def build(root_directory, cache): else: return {'type': 'file', 'name': filename, - 'download': url_for('mediabrowser.download', - path=os.path.join(path, filename)), 'poster': url_for('mediabrowser.poster', path=os.path.join(path, filename)), - 'trailer': url_for('mediabrowser.thumbnail_video', - path=os.path.join(path, filename)), 'm3u8': url_for('mediabrowser.m3u8', path=os.path.join(path, filename))} try: path = os.path.normpath(path) ospath = os.path.join(root_directory, path) - files = list( - map(partial(gather_fileinfo, path, ospath), os.listdir(ospath))) + files = list(filter(lambda it: it is not None, + map(partial(gather_fileinfo, path, ospath), os.listdir(ospath)))) return jsonify({'files': files}) except FileNotFoundError: abort(404) -- cgit v1.2.1