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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appSettings, userSettings, appStorage, datetime) {
|
||||
define(['appSettings', 'userSettings', 'appStorage', 'datetime', 'browser'], function (appSettings, userSettings, appStorage, datetime, browser) {
|
||||
'use strict';
|
||||
|
||||
function mediaPlayer() {
|
||||
|
@ -97,7 +97,7 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
|||
|
||||
var intervalTime = ApiClient.isWebSocketOpen() ? 1200 : 5000;
|
||||
// Ease up with safari because it doesn't perform as well
|
||||
if (browserInfo.safari) {
|
||||
if (browser.safari) {
|
||||
intervalTime = Math.max(intervalTime, 5000);
|
||||
}
|
||||
self.lastProgressReport = 0;
|
||||
|
@ -149,14 +149,20 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
|||
|
||||
function getProfileOptions(item) {
|
||||
|
||||
var disableVideoAudioCodecs = [];
|
||||
if (!AppInfo.isNativeApp && !item.RunTimeTicks) {
|
||||
disableVideoAudioCodecs.push('ac3');
|
||||
}
|
||||
|
||||
var options = {};
|
||||
|
||||
if (!AppInfo.isNativeApp) {
|
||||
var disableHlsVideoAudioCodecs = [];
|
||||
|
||||
if (!self.canPlayNativeHls()) {
|
||||
// hls.js does not support this
|
||||
disableHlsVideoAudioCodecs.push('mp3');
|
||||
}
|
||||
if (!item.RunTimeTicks) {
|
||||
// hls.js does not support this
|
||||
disableHlsVideoAudioCodecs.push('ac3');
|
||||
}
|
||||
|
||||
options.enableMkvProgressive = item.RunTimeTicks != null;
|
||||
|
||||
if (item.RunTimeTicks == null) {
|
||||
|
@ -164,7 +170,7 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
|||
}
|
||||
|
||||
options.enableMkvProgressive = false;
|
||||
options.disableVideoAudioCodecs = disableVideoAudioCodecs;
|
||||
options.disableHlsVideoAudioCodecs = disableHlsVideoAudioCodecs;
|
||||
}
|
||||
|
||||
return options;
|
||||
|
@ -1493,7 +1499,7 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime'], function (appS
|
|||
return true;
|
||||
}
|
||||
|
||||
if (browserInfo.mobile) {
|
||||
if (browser.mobile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue