Tweaking of browse by folder
This commit is contained in:
parent
6f7d5d5d59
commit
80e2ad4908
2 changed files with 9 additions and 17 deletions
|
@ -862,7 +862,6 @@ def browse_plex(key=None, plex_section_id=None):
|
|||
log.error('Could not browse to %s' % key)
|
||||
return xbmcplugin.endOfDirectory(HANDLE, False)
|
||||
|
||||
directory = False
|
||||
photos = False
|
||||
movies = False
|
||||
clips = False
|
||||
|
@ -875,7 +874,6 @@ def browse_plex(key=None, plex_section_id=None):
|
|||
for item in xml:
|
||||
typus = item.attrib.get('type')
|
||||
if item.tag == 'Directory':
|
||||
directory = True
|
||||
__build_folder(item)
|
||||
else:
|
||||
__build_item(item)
|
||||
|
@ -899,19 +897,15 @@ def browse_plex(key=None, plex_section_id=None):
|
|||
musicvideos = True
|
||||
|
||||
# Set the correct content type
|
||||
if directory is True:
|
||||
xbmcplugin.setContent(HANDLE, 'files')
|
||||
sort_methods = v.SORT_METHODS_DIRECTORY
|
||||
elif photos is True:
|
||||
# E.g. Plex foto sections with videos (both!!)
|
||||
xbmcplugin.setContent(HANDLE, 'files')
|
||||
sort_methods = v.SORT_METHODS_PHOTOS
|
||||
if movies is True:
|
||||
xbmcplugin.setContent(HANDLE, 'movies')
|
||||
sort_methods = v.SORT_METHODS_MOVIES
|
||||
elif clips is True:
|
||||
xbmcplugin.setContent(HANDLE, 'movies')
|
||||
sort_methods = v.SORT_METHODS_CLIPS
|
||||
elif movies is True:
|
||||
xbmcplugin.setContent(HANDLE, 'movies')
|
||||
sort_methods = v.SORT_METHODS_MOVIES
|
||||
elif photos is True:
|
||||
xbmcplugin.setContent(HANDLE, 'files')
|
||||
sort_methods = v.SORT_METHODS_PHOTOS
|
||||
elif tvshows is True:
|
||||
xbmcplugin.setContent(HANDLE, 'tvshows')
|
||||
sort_methods = v.SORT_METHOD_TVSHOWS
|
||||
|
|
|
@ -314,15 +314,13 @@ SORT_METHOD_TVSHOWS = (
|
|||
SORT_METHODS_EPISODES = (
|
||||
'SORT_METHOD_UNSORTED',
|
||||
'SORT_METHOD_TITLE',
|
||||
'SORT_METHOD_EPISODE',
|
||||
'SORT_METHOD_DURATION',
|
||||
'SORT_METHOD_VIDEO_RATING',
|
||||
'SORT_METHOD_VIDEO_USER_RATING',
|
||||
'SORT_METHOD_EPISODE',
|
||||
'SORT_METHOD_VIDEO_SORT_TITLE',
|
||||
'SORT_METHOD_MPAA_RATING',
|
||||
'SORT_METHOD_COUNTRY',
|
||||
'SORT_METHOD_STUDIO',
|
||||
'SORT_METHOD_GENRE',
|
||||
'SORT_METHOD_FILE',
|
||||
'SORT_METHOD_FULLPATH',
|
||||
)
|
||||
|
||||
SORT_METHODS_SONGS = (
|
||||
|
|
Loading…
Reference in a new issue