mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Improve playlist view on info page
This commit is contained in:
parent
84207effab
commit
c5ea50d480
5 changed files with 58 additions and 12 deletions
|
@ -31,6 +31,7 @@ if plexpy.PYTHON2:
|
|||
import common
|
||||
import helpers
|
||||
import http_handler
|
||||
import libraries
|
||||
import logger
|
||||
import plextv
|
||||
import session
|
||||
|
@ -40,6 +41,7 @@ else:
|
|||
from plexpy import common
|
||||
from plexpy import helpers
|
||||
from plexpy import http_handler
|
||||
from plexpy import libraries
|
||||
from plexpy import logger
|
||||
from plexpy import plextv
|
||||
from plexpy import session
|
||||
|
@ -610,7 +612,7 @@ class PmsConnect(object):
|
|||
|
||||
return output
|
||||
|
||||
def get_metadata_details(self, rating_key='', sync_id='', plex_guid='',
|
||||
def get_metadata_details(self, rating_key='', sync_id='', plex_guid='', section_id='',
|
||||
skip_cache=False, cache_key=None, return_cache=False, media_info=True):
|
||||
"""
|
||||
Return processed and validated metadata list for requested item.
|
||||
|
@ -687,9 +689,13 @@ class PmsConnect(object):
|
|||
if metadata_main.nodeName == 'Directory' and metadata_type == 'photo':
|
||||
metadata_type = 'photo_album'
|
||||
|
||||
section_id = helpers.get_xml_attr(a, 'librarySectionID')
|
||||
section_id = helpers.get_xml_attr(a, 'librarySectionID') or section_id
|
||||
library_name = helpers.get_xml_attr(a, 'librarySectionTitle')
|
||||
|
||||
if not library_name and section_id:
|
||||
library_data = libraries.Libraries().get_details(section_id)
|
||||
library_name = library_data['section_name']
|
||||
|
||||
directors = []
|
||||
writers = []
|
||||
actors = []
|
||||
|
|
|
@ -4399,7 +4399,7 @@ class WebInterface(object):
|
|||
|
||||
@cherrypy.expose
|
||||
@requireAuth()
|
||||
def info(self, rating_key=None, guid=None, source=None, **kwargs):
|
||||
def info(self, rating_key=None, guid=None, source=None, section_id=None, **kwargs):
|
||||
if rating_key and not str(rating_key).isdigit():
|
||||
raise cherrypy.HTTPRedirect(plexpy.HTTP_ROOT)
|
||||
|
||||
|
@ -4413,7 +4413,7 @@ class WebInterface(object):
|
|||
# Try to get metadata from the Plex server first
|
||||
if rating_key:
|
||||
pms_connect = pmsconnect.PmsConnect()
|
||||
metadata = pms_connect.get_metadata_details(rating_key=rating_key)
|
||||
metadata = pms_connect.get_metadata_details(rating_key=rating_key, section_id=section_id)
|
||||
|
||||
# If the item is not found on the Plex server, get the metadata from history
|
||||
if not metadata and source == 'history':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue