From 48405f6215fce2a141d22418696387ee98b60b0a Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 5 Nov 2016 17:36:52 -0500 Subject: [PATCH] Fix bug --- resources/lib/views.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/lib/views.py b/resources/lib/views.py index 8a359d85..fc738c21 100644 --- a/resources/lib/views.py +++ b/resources/lib/views.py @@ -5,6 +5,7 @@ import logging import shutil import os +import unicodedata import xml.etree.ElementTree as etree import xbmc @@ -25,13 +26,6 @@ KODI = int(xbmc.getInfoLabel('System.BuildVersion')[:2]) class Views(object): - total_nodes = 0 - nodes = list() - playlists = list() - views = list() - sorted_views = list() - grouped_views = list() - media_types = { 'movies': "Movie", 'tvshows': "Series", @@ -45,6 +39,13 @@ class Views(object): self.emby_cursor = emby_cursor self.kodi_cursor = kodi_cursor + self.total_nodes = 0 + self.nodes = list() + self.playlists = list() + self.views = list() + self.sorted_views = list() + self.grouped_views = list() + self.video_nodes = VideoNodes() self.playlist = Playlist() self.emby = embyserver.Read_EmbyServer() @@ -288,7 +289,7 @@ class Views(object): # Create the video node if view_name not in self.nodes and media_type not in ('musicvideos', 'music'): index = self.sorted_views.index(view_name) - self.video_nodes.viewNode(index, view_name, media_type,view_type, view_id) + self.video_nodes.viewNode(index, view_name, media_type, view_type, view_id) if view_type == "mixed": # Change the value self.sorted_views[index] = "%ss" % view_name @@ -374,7 +375,7 @@ class Playlist(object): '' % (special_types.get(media_type, media_type), name, tag)) f.close() - log.info("successfully added playlist: %s" % tag) + log.info("successfully added playlist: %s", tag) @classmethod def _delete_playlist(cls, path): @@ -444,7 +445,6 @@ class VideoNodes(object): else: dirname = viewid - nodepath = xbmc.translatePath( "special://profile/library/video/emby/%s/" % dirname).decode('utf-8')