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