mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-19 22:50:31 +00:00
Move update user rating to read_embyserver
It's more appropriate
This commit is contained in:
parent
ae7131a7c1
commit
f33692f2f9
3 changed files with 44 additions and 10 deletions
|
@ -3,13 +3,19 @@
|
|||
#################################################################################################
|
||||
|
||||
import os
|
||||
import xbmc, xbmcaddon, xbmcvfs
|
||||
import utils
|
||||
|
||||
import xbmc
|
||||
import xbmcaddon
|
||||
import xbmcvfs
|
||||
|
||||
from mutagen.flac import FLAC, Picture
|
||||
from mutagen.id3 import ID3
|
||||
from mutagen import id3
|
||||
import base64
|
||||
|
||||
import read_embyserver as embyserver
|
||||
import utils
|
||||
|
||||
#################################################################################################
|
||||
|
||||
# Helper for the music library, intended to fix missing song ID3 tags on Emby
|
||||
|
@ -62,6 +68,9 @@ def getEmbyRatingFromKodiRating(rating):
|
|||
return(like, favourite, deletelike)
|
||||
|
||||
def getAdditionalSongTags(embyid, emby_rating, API, kodicursor, emby_db, enableimportsongrating, enableexportsongrating, enableupdatesongrating):
|
||||
|
||||
emby = embyserver.Read_EmbyServer()
|
||||
|
||||
previous_values = None
|
||||
filename = API.getFilePath()
|
||||
rating = 0
|
||||
|
@ -163,7 +172,7 @@ def getAdditionalSongTags(embyid, emby_rating, API, kodicursor, emby_db, enablei
|
|||
# sync details to emby server. Translation needed between ID3 rating and emby likes/favourites:
|
||||
like, favourite, deletelike = getEmbyRatingFromKodiRating(rating)
|
||||
utils.window("ignore-update-%s" %embyid, "true") #set temp windows prop to ignore the update from webclient update
|
||||
API.updateUserRating(embyid, like, favourite, deletelike)
|
||||
emby.updateUserRating(embyid, like, favourite, deletelike)
|
||||
|
||||
return (rating, comment, hasEmbeddedCover)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue