add music recent, frequent, latest nodes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<addon id="plugin.video.embycon"
|
||||
name="EmbyCon"
|
||||
version="1.6.14"
|
||||
version="1.6.15"
|
||||
provider-name="Team B">
|
||||
<requires>
|
||||
<import addon="xbmc.python" version="2.25.0"/>
|
||||
|
||||
@@ -610,18 +610,10 @@ msgctxt "#30318"
|
||||
msgid "Music - All Albums"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30319"
|
||||
msgid "Music - All Album Artists"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30320"
|
||||
msgid " - Albums"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30321"
|
||||
msgid " - Album Artists"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30322"
|
||||
msgid "Auto Resume"
|
||||
msgstr ""
|
||||
@@ -721,3 +713,19 @@ msgstr ""
|
||||
msgctxt "#30348"
|
||||
msgid "Add user ratings"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30349"
|
||||
msgid " - Recently Played"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30350"
|
||||
msgid "Music - Recently Added"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30351"
|
||||
msgid "Music - Recently Played"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "#30352"
|
||||
msgid "Music - Frequently Played"
|
||||
msgstr ""
|
||||
|
||||
@@ -593,17 +593,6 @@ def processDirectory(url, progress, params, use_cache_data=False):
|
||||
if gui_item:
|
||||
dir_items.append(gui_item)
|
||||
|
||||
elif item_details.item_type == "MusicArtist":
|
||||
u = ('{server}/emby/Users/{userid}/items' +
|
||||
'?ArtistIds=' + item_details.id +
|
||||
'&IncludeItemTypes=MusicAlbum' +
|
||||
'&CollapseBoxSetItems=false' +
|
||||
'&Recursive=true' +
|
||||
'&format=json')
|
||||
gui_item = add_gui_item(u, item_details, display_options)
|
||||
if gui_item:
|
||||
dir_items.append(gui_item)
|
||||
|
||||
else:
|
||||
u = item_details.id
|
||||
gui_item = add_gui_item(u, item_details, display_options, folder=False)
|
||||
@@ -668,8 +657,8 @@ def show_menu(params):
|
||||
return
|
||||
|
||||
action_items = []
|
||||
|
||||
if result["Type"] in ["Episode", "Movie", "Music", "Video"]:
|
||||
|
||||
if result["Type"] in ["Episode", "Movie", "Music", "Video", "Audio"]:
|
||||
li = xbmcgui.ListItem(string_load(30314))
|
||||
li.setProperty('menu_id', 'play')
|
||||
action_items.append(li)
|
||||
|
||||
@@ -338,19 +338,54 @@ def getCollections():
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = item_name + string_load(30321)
|
||||
item_data['title'] = item_name + string_load(30268) + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicArtists'
|
||||
item_data['path'] = ('{server}/emby/Artists/AlbumArtists' +
|
||||
'?Recursive=true' +
|
||||
item_data['media_type'] = 'MusicAlbums'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items/Latest' +
|
||||
'?IncludeItemTypes=Audio' +
|
||||
'&ParentId=' + item.get("Id") +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&SortBy=Name' +
|
||||
'&SortOrder=Ascending' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = item_name + string_load(30349) + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicAlbum'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items' +
|
||||
'?SortBy=DatePlayed' +
|
||||
'&SortOrder=Descending' +
|
||||
'&IncludeItemTypes=Audio' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&Recursive=true' +
|
||||
'&ParentId=' + item.get("Id") +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&Filters=IsPlayed' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = item_name + " - Frequently Played" + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicAlbum'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items' +
|
||||
'?SortBy=PlayCount' +
|
||||
'&SortOrder=Descending' +
|
||||
'&IncludeItemTypes=Audio' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&Recursive=true' +
|
||||
'&ParentId=' + item.get("Id") +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&Filters=IsPlayed' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
if collection_type in ["homevideos"]:
|
||||
collections.append({
|
||||
'title': item_name,
|
||||
@@ -876,17 +911,52 @@ def getCollections():
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = string_load(30319)
|
||||
item_data['media_type'] = 'MusicArtists'
|
||||
item_data['path'] = ('{server}/emby/Artists/AlbumArtists' +
|
||||
'?Recursive=true' +
|
||||
item_data['title'] = string_load(30350) + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicAlbums'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items/Latest' +
|
||||
'?IncludeItemTypes=Audio' +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&SortBy=Name' +
|
||||
'&SortOrder=Ascending' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = string_load(30351) + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicAlbum'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items' +
|
||||
'?SortBy=DatePlayed' +
|
||||
'&SortOrder=Descending' +
|
||||
'&IncludeItemTypes=Audio' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&Recursive=true' +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&Filters=IsPlayed' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
item_data = {}
|
||||
item_data['title'] = string_load(30352) + " (" + show_x_filtered_items + ")"
|
||||
item_data['art'] = art
|
||||
item_data['media_type'] = 'MusicAlbum'
|
||||
item_data['path'] = ('{server}/emby/Users/{userid}/Items' +
|
||||
'?SortBy=PlayCount' +
|
||||
'&SortOrder=Descending' +
|
||||
'&IncludeItemTypes=Audio' +
|
||||
'&Limit={ItemLimit}' +
|
||||
'&Recursive=true' +
|
||||
'&ImageTypeLimit=1' +
|
||||
'&EnableImageTypes=Primary,Backdrop,Banner,Thumb' +
|
||||
'&Filters=IsPlayed' +
|
||||
'&format=json')
|
||||
collections.append(item_data)
|
||||
|
||||
|
||||
return collections
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user