Got it to run, renamed some template stuff

Now onto the Jellyfin API, yay!
This commit is contained in:
2021-02-05 19:32:27 +01:00
parent ecbf38c005
commit cbee080b54
34 changed files with 80 additions and 76 deletions

View File

@@ -29,7 +29,7 @@ from jellypy import plextv
from jellypy import pmsconnect
from jellypy import session
from jellypy import users
from jellypy.plex import Plex
from jellypy.jellyfin import Jellyfin
def refresh_libraries():
@@ -132,8 +132,8 @@ def has_library_type(section_type):
def get_collections(section_id=None):
plex = Plex(jellypy.CONFIG.PMS_URL, session.get_session_user_token())
library = plex.get_library(section_id)
jf = Jellyfin(jellypy.CONFIG.PMS_URL, session.get_session_user_token())
library = jf.get_library(section_id)
if library.type not in ('movie', 'show', 'artist'):
return []
@@ -230,12 +230,12 @@ def get_playlists(section_id=None, user_id=None):
if not plex_token:
return []
plex = Plex(jellypy.CONFIG.PMS_URL, plex_token)
jf = Jellyfin(jellypy.CONFIG.PMS_URL, plex_token)
if user_id:
playlists = plex.plex.playlists()
playlists = jf.plex.playlists()
else:
library = plex.get_library(section_id)
library = jf.get_library(section_id)
playlists = library.playlist()
playlists_list = []