mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-06-23 00:20:31 +00:00
Refractor some decorators
This commit is contained in:
parent
803081f65a
commit
3ec71e89d6
7 changed files with 101 additions and 106 deletions
|
@ -41,9 +41,9 @@ class TVShows(KodiDb):
|
|||
|
||||
KodiDb.__init__(self, videodb.cursor)
|
||||
|
||||
@stop()
|
||||
@jellyfin_item()
|
||||
@library_check()
|
||||
@stop
|
||||
@jellyfin_item
|
||||
@library_check
|
||||
def tvshow(self, item, e_item, library):
|
||||
|
||||
''' If item does not exist, entry will be added.
|
||||
|
@ -201,7 +201,7 @@ class TVShows(KodiDb):
|
|||
obj['TopLevel'] = "plugin://plugin.video.jellyfin/%s/" % obj['LibraryId']
|
||||
obj['Path'] = "%s%s/" % (obj['TopLevel'], obj['Id'])
|
||||
|
||||
@stop()
|
||||
@stop
|
||||
def season(self, item, show_id=None):
|
||||
|
||||
''' If item does not exist, entry will be added.
|
||||
|
@ -235,8 +235,8 @@ class TVShows(KodiDb):
|
|||
self.artwork.add(obj['Artwork'], obj['SeasonId'], "season")
|
||||
LOG.debug("UPDATE season [%s/%s] %s: %s", obj['ShowId'], obj['SeasonId'], obj['Title'] or obj['Index'], obj['Id'])
|
||||
|
||||
@stop()
|
||||
@jellyfin_item()
|
||||
@stop
|
||||
@jellyfin_item
|
||||
def episode(self, item, e_item):
|
||||
|
||||
''' If item does not exist, entry will be added.
|
||||
|
@ -425,8 +425,8 @@ class TVShows(KodiDb):
|
|||
|
||||
return True
|
||||
|
||||
@stop()
|
||||
@jellyfin_item()
|
||||
@stop
|
||||
@jellyfin_item
|
||||
def userdata(self, item, e_item):
|
||||
|
||||
''' This updates: Favorite, LastPlayedDate, Playcount, PlaybackPositionTicks
|
||||
|
@ -486,8 +486,8 @@ class TVShows(KodiDb):
|
|||
self.jellyfin_db.update_reference(*values(obj, QUEM.update_reference_obj))
|
||||
LOG.debug("USERDATA %s [%s/%s] %s: %s", obj['Media'], obj['FileId'], obj['KodiId'], obj['Id'], obj['Title'])
|
||||
|
||||
@stop()
|
||||
@jellyfin_item()
|
||||
@stop
|
||||
@jellyfin_item
|
||||
def remove(self, item_id, e_item):
|
||||
|
||||
''' Remove showid, fileid, pathid, jellyfin reference.
|
||||
|
@ -589,7 +589,7 @@ class TVShows(KodiDb):
|
|||
self.delete_episode(kodi_id, file_id)
|
||||
LOG.debug("DELETE episode [%s/%s] %s", file_id, kodi_id, item_id)
|
||||
|
||||
@jellyfin_item()
|
||||
@jellyfin_item
|
||||
def get_child(self, item_id, e_item):
|
||||
|
||||
''' Get all child elements from tv show jellyfin id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue