mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-02 14:26:14 +00:00
add episodes/tvshows uniqueid/rating
This commit is contained in:
parent
87501eedea
commit
aceecdfe5e
3 changed files with 82 additions and 1 deletions
|
@ -281,6 +281,7 @@ class TVShows(Items):
|
|||
title = item['Name']
|
||||
plot = API.get_overview()
|
||||
rating = item.get('CommunityRating')
|
||||
votecount = item.get('VoteCount')
|
||||
premieredate = API.get_premiere_date()
|
||||
tvdb = API.get_provider('Tvdb')
|
||||
sorttitle = item['SortName']
|
||||
|
@ -403,6 +404,18 @@ class TVShows(Items):
|
|||
all_episodes = emby.getEpisodesbyShow(itemid)
|
||||
self.add_episodes(all_episodes['Items'], None)
|
||||
|
||||
# update new ratings Kodi 17 - todo get ratingid for updates from embydb
|
||||
if self.kodi_version > 16:
|
||||
ratingid = self.kodi_db.create_entry_rating()
|
||||
|
||||
self.kodi_db.add_ratings(ratingid, showid, "tvshow", "default", rating, votecount)
|
||||
|
||||
# update new uniqueid Kodi 17 - todo get uniqueid_id for updates from embydb
|
||||
if self.kodi_version > 16:
|
||||
uniqueid = self.kodi_db.create_entry_uniqueid()
|
||||
|
||||
self.kodi_db.add_uniqueid(uniqueid, showid, "tvshow", tvdb, "tvdb")
|
||||
|
||||
return True
|
||||
|
||||
def add_updateSeason(self, item, showid=None):
|
||||
|
@ -489,6 +502,9 @@ class TVShows(Items):
|
|||
runtime = API.get_runtime()
|
||||
premieredate = API.get_premiere_date()
|
||||
|
||||
votecount = item.get('VoteCount')
|
||||
tvdb = API.get_provider('Tvdb')
|
||||
|
||||
# episode details
|
||||
try:
|
||||
seriesId = item['SeriesId']
|
||||
|
@ -636,6 +652,18 @@ class TVShows(Items):
|
|||
self.kodi_db.update_file(tempfileid, filename, temppathid, dateadded)
|
||||
self.kodi_db.add_playstate(tempfileid, resume, total, playcount, dateplayed)
|
||||
|
||||
# update new ratings Kodi 17 - todo get ratingid for updates from embydb
|
||||
if self.kodi_version > 16:
|
||||
ratingid = self.kodi_db.create_entry_rating()
|
||||
|
||||
self.kodi_db.add_ratings(ratingid, showid, "episode", "default", rating, votecount)
|
||||
|
||||
# update new uniqueid Kodi 17 - todo get uniqueid_id for updates from embydb
|
||||
if self.kodi_version > 16:
|
||||
uniqueid = self.kodi_db.create_entry_uniqueid()
|
||||
|
||||
self.kodi_db.add_uniqueid(uniqueid, showid, "episode", tvdb, "tvdb")
|
||||
|
||||
return True
|
||||
|
||||
def updateUserdata(self, item):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue