Skip to content

Commit

Permalink
Fixed kodi library update
Browse files Browse the repository at this point in the history
  • Loading branch information
CastagnaIT committed Feb 23, 2023
1 parent 6108024 commit 4b1a4ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion resources/lib/navigation/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
SPDX-License-Identifier: MIT
See LICENSES/MIT.md for more information.
"""
import xbmcvfs

import resources.lib.common as common
import resources.lib.kodi.ui as ui
import resources.lib.kodi.library_utils as lib_utils
Expand Down Expand Up @@ -162,7 +164,8 @@ def add_folders_to_library(self, pathitems): # pylint: disable=unused-argument
lib_utils.FOLDER_NAME_MOVIES))
lib_path_shows = common.check_folder_path(common.join_folders_paths(lib_utils.get_library_path(),
lib_utils.FOLDER_NAME_SHOWS))

lib_path_movies = xbmcvfs.makeLegalFilename(xbmcvfs.translatePath(lib_path_movies))
lib_path_shows = xbmcvfs.makeLegalFilename(xbmcvfs.translatePath(lib_path_shows))
# Check if the paths already exists in source tags of video content type
is_movies_source_exist = False
is_shows_source_exist = False
Expand Down
6 changes: 2 additions & 4 deletions resources/lib/services/library_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"""
from datetime import datetime, timedelta

import AddonSignals
import xbmc

from resources.lib.globals import G
Expand Down Expand Up @@ -38,9 +37,8 @@ def __init__(self):
self.scan_awaiting = False
self.clean_in_progress = False
self.clean_awaiting = False
AddonSignals.registerSlot(G.ADDON.getAddonInfo('id'),
common.Signals.REQUEST_KODI_LIBRARY_UPDATE,
self.request_kodi_library_update)
common.register_slot(self.request_kodi_library_update, common.Signals.REQUEST_KODI_LIBRARY_UPDATE,
is_signal=True)

def on_service_tick(self):
"""Check if update is due and trigger it"""
Expand Down

0 comments on commit 4b1a4ae

Please sign in to comment.