mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update xml parsing
This commit is contained in:
parent
1137b4fd13
commit
1c0379bee1
7 changed files with 63 additions and 25 deletions
|
@ -402,7 +402,33 @@
|
|||
|
||||
return apiClient.getUserViews({}, userId).then(function (result) {
|
||||
|
||||
return result.Items;
|
||||
var items = result.Items;
|
||||
|
||||
var list = [];
|
||||
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
|
||||
var view = items[i];
|
||||
|
||||
list.push(view);
|
||||
|
||||
if (view.CollectionType == 'livetv') {
|
||||
|
||||
view.ImageTags = {};
|
||||
view.icon = 'live_tv';
|
||||
view.onclick = "LibraryBrowser.showTab('livetv.html', 0);";
|
||||
|
||||
var guideView = Object.assign({}, view);
|
||||
guideView.Name = Globalize.translate('ButtonGuide');
|
||||
guideView.ImageTags = {};
|
||||
guideView.icon = 'dvr';
|
||||
guideView.url = 'livetv.html?tab=1';
|
||||
guideView.onclick = "LibraryBrowser.showTab('livetv.html', 1);";
|
||||
list.push(guideView);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue