mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
save additional info to recording nfo's
This commit is contained in:
parent
70994b54a6
commit
44513d8744
42 changed files with 7006 additions and 774 deletions
|
@ -324,6 +324,10 @@
|
|||
return 'secondaryitems.html?type=' + type + '&genreId=' + item.Id + '&parentId=' + params.topParentId;
|
||||
}
|
||||
|
||||
if (item.Type == 'Studio') {
|
||||
return 'secondaryitems.html?type=' + type + '&studioId=' + item.Id + '&parentId=' + params.topParentId;
|
||||
}
|
||||
|
||||
return 'secondaryitems.html?type=' + type + '&parentId=' + item.Id;
|
||||
}
|
||||
|
||||
|
|
|
@ -991,7 +991,11 @@
|
|||
if (isStatic) {
|
||||
html += ' on ' + item.Studios[0].Name;
|
||||
} else {
|
||||
html += ' on <a class="textlink" href="itemdetails.html?id=' + item.Studios[0].Id + '">' + item.Studios[0].Name + '</a>';
|
||||
|
||||
var context = inferContext(item);
|
||||
|
||||
var href = LibraryBrowser.getHref(item.Studios[i], context);
|
||||
html += ' on <a class="textlink" href="' + href + '">' + item.Studios[0].Name + '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1295,8 +1299,31 @@
|
|||
});
|
||||
}
|
||||
|
||||
function inferContext(item) {
|
||||
|
||||
if (item.Type == 'Movie' || item.Type == 'BoxSet') {
|
||||
return 'movies';
|
||||
}
|
||||
if (item.Type == 'Series' || item.Type == 'Season' || item.Type == 'Episode') {
|
||||
return 'tvshows';
|
||||
}
|
||||
if (item.Type == 'Game' || item.Type == 'GameSystem') {
|
||||
return 'games';
|
||||
}
|
||||
if (item.Type == 'Game' || item.Type == 'GameSystem') {
|
||||
return 'games';
|
||||
}
|
||||
if (item.Type == 'MusicArtist' || item.Type == 'MusicAlbum') {
|
||||
return 'music';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function renderStudios(elem, item, isStatic) {
|
||||
|
||||
var context = inferContext(item);
|
||||
|
||||
if (item.Studios && item.Studios.length && item.Type != "Series") {
|
||||
|
||||
var html = '';
|
||||
|
@ -1310,7 +1337,10 @@
|
|||
if (isStatic) {
|
||||
html += item.Studios[i].Name;
|
||||
} else {
|
||||
html += '<a class="textlink" href="itemdetails.html?id=' + item.Studios[i].Id + '">' + item.Studios[i].Name + '</a>';
|
||||
|
||||
item.Studios[i].Type = 'Studio';
|
||||
var href = LibraryBrowser.getHref(item.Studios[i], context);
|
||||
html += '<a class="textlink" href="' + href + '">' + item.Studios[i].Name + '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1328,6 +1358,8 @@
|
|||
|
||||
function renderGenres(elem, item, limit, isStatic) {
|
||||
|
||||
var context = inferContext(item);
|
||||
|
||||
var html = '';
|
||||
|
||||
var genres = item.Genres || [];
|
||||
|
@ -1351,7 +1383,23 @@
|
|||
if (isStatic) {
|
||||
html += genres[i];
|
||||
} else {
|
||||
html += '<a class="textlink" href="itemdetails.html?' + param + '=' + ApiClient.encodeName(genres[i]) + '">' + genres[i] + '</a>';
|
||||
|
||||
var type;
|
||||
switch (context) {
|
||||
case 'tvshows':
|
||||
type = 'Series';
|
||||
break;
|
||||
case 'games':
|
||||
type = 'Game';
|
||||
break;
|
||||
default:
|
||||
type = 'Movie';
|
||||
break;
|
||||
}
|
||||
|
||||
var url = "secondaryitems.html?type=" + type + "&" + param + "=" + ApiClient.encodeName(genres[i]);
|
||||
|
||||
html += '<a class="textlink" href="' + url + '">' + genres[i] + '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
};
|
||||
|
||||
require(['hammer-main'], function (hammertime) {
|
||||
|
||||
|
||||
hammertime.on('swipeleft', onSwipeLeft);
|
||||
hammertime.on('swiperight', onSwipeRight);
|
||||
|
||||
|
@ -239,24 +239,6 @@
|
|||
|
||||
getHref: function (item, context, topParentId) {
|
||||
|
||||
var href = LibraryBrowser.getHrefInternal(item, context);
|
||||
|
||||
if (context == 'tv') {
|
||||
if (!topParentId) {
|
||||
topParentId = LibraryMenu.getTopParentId();
|
||||
}
|
||||
|
||||
if (topParentId) {
|
||||
href += href.indexOf('?') == -1 ? "?topParentId=" : "&topParentId=";
|
||||
href += topParentId;
|
||||
}
|
||||
}
|
||||
|
||||
return href;
|
||||
},
|
||||
|
||||
getHrefInternal: function (item, context) {
|
||||
|
||||
if (!item) {
|
||||
throw new Error('item cannot be null');
|
||||
}
|
||||
|
@ -265,6 +247,7 @@
|
|||
return item.url;
|
||||
}
|
||||
|
||||
var url;
|
||||
// Handle search hints
|
||||
var id = item.Id || item.ItemId;
|
||||
|
||||
|
@ -348,16 +331,56 @@
|
|||
return "itemdetails.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "Genre") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
var type;
|
||||
switch (context) {
|
||||
case 'tvshows':
|
||||
type = 'Series';
|
||||
break;
|
||||
case 'games':
|
||||
type = 'Game';
|
||||
break;
|
||||
default:
|
||||
type = 'Movie';
|
||||
break;
|
||||
}
|
||||
|
||||
url = "secondaryitems.html?type=" + type + "&genreId=" + id;
|
||||
if (topParentId) {
|
||||
url += "&parentId=" + topParentId;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
if (item.Type == "MusicGenre") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "GameGenre") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
|
||||
url = "secondaryitems.html?type=Game&genreId=" + id;
|
||||
if (topParentId) {
|
||||
url += "&parentId=" + topParentId;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
if (item.Type == "Studio") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
|
||||
var type;
|
||||
switch (context) {
|
||||
case 'tvshows':
|
||||
type = 'Series';
|
||||
break;
|
||||
case 'games':
|
||||
type = 'Game';
|
||||
break;
|
||||
default:
|
||||
type = 'Movie';
|
||||
break;
|
||||
}
|
||||
|
||||
url = "secondaryitems.html?type=" + type + "&studioId=" + id;
|
||||
if (topParentId) {
|
||||
url += "&parentId=" + topParentId;
|
||||
}
|
||||
return url;
|
||||
}
|
||||
if (item.Type == "Person") {
|
||||
return "itemdetails.html?id=" + id;
|
||||
|
|
|
@ -221,12 +221,41 @@
|
|||
|
||||
view.addEventListener('click', onListItemClick);
|
||||
|
||||
function getItemPromise() {
|
||||
|
||||
var id = params.genreId || params.studioId || params.parentId;
|
||||
|
||||
if (id) {
|
||||
return ApiClient.getItem(Dashboard.getCurrentUserId(), id);
|
||||
}
|
||||
|
||||
var name = params.genre;
|
||||
|
||||
if (name) {
|
||||
return ApiClient.getGenre(name, Dashboard.getCurrentUserId());
|
||||
}
|
||||
|
||||
name = params.musicgenre;
|
||||
|
||||
if (name) {
|
||||
return ApiClient.getMusicGenre(name, Dashboard.getCurrentUserId());
|
||||
}
|
||||
|
||||
name = params.gamegenre;
|
||||
|
||||
if (name) {
|
||||
return ApiClient.getGameGenre(name, Dashboard.getCurrentUserId());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
view.addEventListener('viewbeforeshow', function (e) {
|
||||
|
||||
var parentId = params.genreId || params.parentId;
|
||||
var parentPromise = getItemPromise();
|
||||
|
||||
if (parentId) {
|
||||
ApiClient.getItem(Dashboard.getCurrentUserId(), parentId).then(function (parent) {
|
||||
if (parentPromise) {
|
||||
parentPromise.then(function (parent) {
|
||||
LibraryMenu.setTitle(parent.Name);
|
||||
|
||||
onViewStyleChange(parent);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue