1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix folders view

This commit is contained in:
Luke Pulverenti 2016-08-24 23:07:31 -04:00
parent 663564f766
commit 48029f4dc7
9 changed files with 49 additions and 22 deletions

View file

@ -1625,14 +1625,22 @@ var AppInfo = {};
Dashboard.navigate('home.html?tab=3');
};
function showItem(item) {
function showItem(item, serverId, options) {
if (typeof (item) === 'string') {
require(['connectionManager'], function (connectionManager) {
var apiClient = connectionManager.currentApiClient();
apiClient.getItem(apiClient.getCurrentUserId(), item).then(showItem);
apiClient.getItem(apiClient.getCurrentUserId(), item).then(function (item) {
embyRouter.showItem(item, options);
});
});
} else {
Emby.Page.show('/' + LibraryBrowser.getHref(item), { item: item });
if (arguments.length == 2) {
options = arguments[1];
}
var context = options ? options.context : null;
Emby.Page.show('/' + LibraryBrowser.getHref(item, context), { item: item });
}
}