Merge pull request #231 from mcarlton00/musicvideo-resume

Add play option to music video context menu
This commit is contained in:
mcarlton00 2022-10-11 14:47:13 -04:00 committed by GitHub
commit 362760d3ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -68,6 +68,9 @@ def get_content(url, params):
content_type = 'episodes'
elif media_type == "playlists":
view_type = "Playlists"
elif media_type == "musicvideos":
view_type = "Music Videos"
content_type = 'musicvideos'
elif media_type == "mixed":
content_type = 'videos'

View File

@ -343,7 +343,7 @@ def show_menu(params):
action_items = []
if result["Type"] in ["Episode", "Movie", "Music", "Video", "Audio", "TvChannel", "Program"]:
if result["Type"] in ["Episode", "Movie", "Music", "Video", "Audio", "TvChannel", "Program", "MusicVideo"]:
li = xbmcgui.ListItem(translate_string(30314), offscreen=True)
li.setProperty('menu_id', 'play')
action_items.append(li)
@ -353,12 +353,12 @@ def show_menu(params):
li.setProperty('menu_id', 'play_all')
action_items.append(li)
if result["Type"] in ["Episode", "Movie", "Video", "TvChannel", "Program"]:
if result["Type"] in ["Episode", "Movie", "Video", "TvChannel", "Program", "MusicVideo"]:
li = xbmcgui.ListItem(translate_string(30275), offscreen=True)
li.setProperty('menu_id', 'transcode')
action_items.append(li)
if result["Type"] in ["Episode", "Movie", "Music", "Video", "Audio", "MusicArtist", "MusicAlbum"]:
if result["Type"] in ["Episode", "Movie", "Music", "Video", "Audio", "MusicArtist", "MusicAlbum", "MusicVideo"]:
li = xbmcgui.ListItem(translate_string(30402), offscreen=True)
li.setProperty('menu_id', 'add_to_playlist')
action_items.append(li)

View File

@ -503,6 +503,8 @@ def add_gui_item(url, item_details, display_options, folder=True, default_sort=F
mediatype = 'artist'
elif item_type == 'audio' or item_type == 'music':
mediatype = 'song'
elif item_type == 'musicvideo':
mediatype = 'musicvideo'
info_labels["mediatype"] = mediatype