mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
fixed updates from websocket
This commit is contained in:
parent
6d191fef1d
commit
2eac7bbcb4
2 changed files with 10 additions and 7 deletions
|
@ -11,8 +11,8 @@ from ClientInformation import ClientInformation
|
|||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||
|
||||
# Disable requests logging
|
||||
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
logging.getLogger("requests").setLevel(logging.WARNING)
|
||||
# requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
||||
# logging.getLogger("requests").setLevel(logging.WARNING)
|
||||
|
||||
class DownloadUtils():
|
||||
|
||||
|
|
|
@ -180,12 +180,15 @@ class WebSocketThread(threading.Thread):
|
|||
|
||||
def remove_items(self, itemsRemoved):
|
||||
for item in itemsRemoved:
|
||||
connection = utils.KodiSQL()
|
||||
cursor = connection.cursor()
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteEpisodeFromKodiLibraryByMbId: " + item, 0)
|
||||
WriteKodiDB().deleteEpisodeFromKodiLibraryByMbId(item)
|
||||
WriteKodiDB().deleteEpisodeFromKodiLibrary(item, connection, cursor)
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteMovieFromKodiLibrary: " + item, 0)
|
||||
WriteKodiDB().deleteMovieFromKodiLibrary(item)
|
||||
WriteKodiDB().deleteMovieFromKodiLibrary(item, connection, cursor)
|
||||
self.logMsg("Message : Doing LibraryChanged : Items Removed : Calling deleteMusicVideoFromKodiLibrary: " + item, 0)
|
||||
WriteKodiDB().deleteMusicVideoFromKodiLibrary(item)
|
||||
WriteKodiDB().deleteMusicVideoFromKodiLibrary(item, connection, cursor)
|
||||
cursor.close()
|
||||
|
||||
def update_items(self, itemsToUpdate):
|
||||
# doing adds and updates
|
||||
|
@ -193,8 +196,8 @@ class WebSocketThread(threading.Thread):
|
|||
self.logMsg("Message : Doing LibraryChanged : Processing Added and Updated : " + str(itemsToUpdate), 0)
|
||||
connection = utils.KodiSQL()
|
||||
cursor = connection.cursor()
|
||||
LibrarySync().MoviesSync(connection, cursor, fullsync = False, installFirstRun = False, itemList = itemsToUpdate)
|
||||
LibrarySync().TvShowsSync(connection, cursor, fullsync = False, installFirstRun = False, itemList = itemsToUpdate)
|
||||
LibrarySync().MoviesSync(connection, cursor, False, itemsToUpdate)
|
||||
LibrarySync().TvShowsSync(connection, cursor, False, itemsToUpdate)
|
||||
cursor.close()
|
||||
|
||||
def user_data_update(self, userDataList):
|
||||
|
|
Loading…
Reference in a new issue