mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
normalize tv recording objects
This commit is contained in:
parent
740e8a62a8
commit
82382681fc
9 changed files with 40 additions and 25 deletions
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
html += '<div class="sidebarHeader">';
|
html += '<div class="sidebarHeader">';
|
||||||
html += Globalize.translate('HeaderLibrary');
|
html += Globalize.translate('HeaderMedia');
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += items.map(function (i) {
|
html += items.map(function (i) {
|
||||||
|
|
|
@ -725,8 +725,9 @@
|
||||||
contentType = 'video/' + mediaSource.Container;
|
contentType = 'video/' + mediaSource.Container;
|
||||||
|
|
||||||
if (mediaSource.enableDirectPlay) {
|
if (mediaSource.enableDirectPlay) {
|
||||||
mediaUrl = mediaSource.Path;
|
mediaUrl = FileSystem.translateFilePath(mediaSource.Path);
|
||||||
playMethod = 'DirectPlay';
|
playMethod = 'DirectPlay';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (mediaSource.SupportsDirectStream) {
|
if (mediaSource.SupportsDirectStream) {
|
||||||
|
@ -761,9 +762,9 @@
|
||||||
|
|
||||||
if (mediaSource.enableDirectPlay) {
|
if (mediaSource.enableDirectPlay) {
|
||||||
|
|
||||||
mediaUrl = mediaSource.Path;
|
mediaUrl = FileSystem.translateFilePath(mediaSource.Path);
|
||||||
|
|
||||||
playMethod = 'DirectPlay';
|
playMethod = 'DirectPlay';
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
var isDirectStream = mediaSource.SupportsDirectStream;
|
var isDirectStream = mediaSource.SupportsDirectStream;
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
$('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({
|
$('#recentlyAddedSongs', page).html(LibraryBrowser.getPosterViewHtml({
|
||||||
items: items,
|
items: items,
|
||||||
showUnplayedIndicator: false,
|
showUnplayedIndicator: false,
|
||||||
showChildCountIndicator: true,
|
|
||||||
showLatestItemsPopup: false,
|
showLatestItemsPopup: false,
|
||||||
shape: getSquareShape(),
|
shape: getSquareShape(),
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
|
|
|
@ -701,7 +701,7 @@ var Dashboard = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
ensureToolsMenu: function (page, user) {
|
ensureToolsMenu: function (page) {
|
||||||
|
|
||||||
var sidebar = $('.toolsSidebar', page);
|
var sidebar = $('.toolsSidebar', page);
|
||||||
|
|
||||||
|
@ -720,10 +720,6 @@ var Dashboard = {
|
||||||
|
|
||||||
item = items[i];
|
item = items[i];
|
||||||
|
|
||||||
if (!user.Policy.IsAdministrator) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.divider) {
|
if (item.divider) {
|
||||||
menuHtml += "<div class='sidebarDivider ui-bar-inherit'></div>";
|
menuHtml += "<div class='sidebarDivider ui-bar-inherit'></div>";
|
||||||
}
|
}
|
||||||
|
@ -738,7 +734,15 @@ var Dashboard = {
|
||||||
menuHtml += '<a data-transition="none" class="sidebarLink" href="' + item.href + '">';
|
menuHtml += '<a data-transition="none" class="sidebarLink" href="' + item.href + '">';
|
||||||
}
|
}
|
||||||
|
|
||||||
menuHtml += '<span class="fa ' + item.icon + ' sidebarLinkIcon"' + style + '></span>';
|
var icon = item.icon;
|
||||||
|
|
||||||
|
if (icon) {
|
||||||
|
if (icon.indexOf('fa') == 0) {
|
||||||
|
menuHtml += '<span class="fa ' + icon + ' sidebarLinkIcon"' + style + '></span>';
|
||||||
|
} else {
|
||||||
|
menuHtml += '<i class="material-icons sidebarLinkIcon"' + style + '>' + icon + '</i>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menuHtml += '<span class="sidebarLinkText">';
|
menuHtml += '<span class="sidebarLinkText">';
|
||||||
menuHtml += item.name;
|
menuHtml += item.name;
|
||||||
|
@ -1969,19 +1973,19 @@ $(document).on('pagecreate', ".page", function () {
|
||||||
|
|
||||||
if (apiClient && apiClient.accessToken() && Dashboard.getCurrentUserId()) {
|
if (apiClient && apiClient.accessToken() && Dashboard.getCurrentUserId()) {
|
||||||
|
|
||||||
Dashboard.getCurrentUser().done(function (user) {
|
var isSettingsPage = page.hasClass('type-interior');
|
||||||
|
|
||||||
var isSettingsPage = page.hasClass('type-interior');
|
if (isSettingsPage) {
|
||||||
|
Dashboard.ensureToolsMenu(page);
|
||||||
|
|
||||||
if (!user.Policy.IsAdministrator && isSettingsPage) {
|
Dashboard.getCurrentUser().done(function (user) {
|
||||||
Dashboard.logout();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isSettingsPage) {
|
if (!user.Policy.IsAdministrator) {
|
||||||
Dashboard.ensureToolsMenu(page, user);
|
Dashboard.logout();
|
||||||
}
|
return;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
if (connectionMode == MediaBrowser.ConnectionMode.Local && currentServerInfo.RemoteAddress) {
|
if (connectionMode == MediaBrowser.ConnectionMode.Local && currentServerInfo.RemoteAddress) {
|
||||||
newConnectionMode = MediaBrowser.ConnectionMode.Remote;
|
newConnectionMode = MediaBrowser.ConnectionMode.Remote;
|
||||||
}
|
}
|
||||||
else if (connectionMode == MediaBrowser.ConnectionMode.Remote && currentServerInfo.LocalAddress) {
|
else if (connectionMode != MediaBrowser.ConnectionMode.Local && currentServerInfo.LocalAddress) {
|
||||||
newConnectionMode = MediaBrowser.ConnectionMode.Local;
|
newConnectionMode = MediaBrowser.ConnectionMode.Local;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -204,6 +204,7 @@
|
||||||
|
|
||||||
function tryReconnectInternal(deferred, connectionMode, currentRetryCount) {
|
function tryReconnectInternal(deferred, connectionMode, currentRetryCount) {
|
||||||
|
|
||||||
|
connectionMode = switchConnectionMode(connectionMode);
|
||||||
var url = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), connectionMode);
|
var url = MediaBrowser.ServerInfo.getServerAddress(self.serverInfo(), connectionMode);
|
||||||
|
|
||||||
logger.log("Attempting reconnection to " + url);
|
logger.log("Attempting reconnection to " + url);
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
fileExists: function (path) {
|
fileExists: function (path) {
|
||||||
return NativeFileSystem.fileExists(path);
|
return NativeFileSystem.fileExists(path);
|
||||||
|
},
|
||||||
|
|
||||||
|
translateFilePath: function (path) {
|
||||||
|
return NativeFileSystem.translateFilePath(path);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function beginPurchase(id) {
|
function beginPurchase(id) {
|
||||||
return NativeIapManager.beginPurchase(id);
|
return MainActivity.beginPurchase(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
window.IapManager = {
|
window.IapManager = {
|
||||||
|
|
|
@ -4,8 +4,11 @@
|
||||||
|
|
||||||
fileExists: function (path) {
|
fileExists: function (path) {
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
translateFilePath: function (path) {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
5
dashboard-ui/thirdparty/filesystem.js
vendored
5
dashboard-ui/thirdparty/filesystem.js
vendored
|
@ -4,8 +4,11 @@
|
||||||
|
|
||||||
fileExists: function (path) {
|
fileExists: function (path) {
|
||||||
return false;
|
return false;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
translateFilePath: function (path) {
|
||||||
|
return path;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})();
|
})();
|
Loading…
Add table
Add a link
Reference in a new issue