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

search hints progress

This commit is contained in:
Luke Pulverenti 2013-04-27 09:05:33 -04:00
parent ba13b0837d
commit 5005e0d448
9 changed files with 287 additions and 40 deletions

View file

@ -282,17 +282,22 @@
return item.url;
}
itemByNameContext = itemByNameContext || "";
// Handle search hints
var id = item.Id || item.ItemId;
if (item.Type == "Series") {
return "itemdetails.html?id=" + item.Id;
return "itemdetails.html?id=" + id;
}
if (item.Type == "Season") {
return "itemdetails.html?id=" + item.Id;
return "itemdetails.html?id=" + id;
}
if (item.Type == "BoxSet") {
return "itemdetails.html?id=" + item.Id;
return "itemdetails.html?id=" + id;
}
if (item.Type == "MusicAlbum") {
return "itemdetails.html?id=" + item.Id;
return "itemdetails.html?id=" + id;
}
if (item.Type == "Genre") {
return "itembynamedetails.html?genre=" + encodeName(item.Name) + "&context=" + itemByNameContext;
@ -304,10 +309,10 @@
return "itembynamedetails.html?person=" + encodeName(item.Name) + "&context=" + itemByNameContext;
}
if (item.Type == "Artist") {
return "itembynamedetails.html?artist=" + encodeName(item.Name) + "&context=" + itemByNameContext;
return "itembynamedetails.html?artist=" + encodeName(item.Name) + "&context=" + (itemByNameContext || "music");
}
return item.IsFolder ? (item.Id ? "itemList.html?parentId=" + item.Id : "#") : "itemdetails.html?id=" + item.Id;
return item.IsFolder ? (id ? "itemList.html?parentId=" + id : "#") : "itemdetails.html?id=" + id;
},
@ -340,7 +345,8 @@
return ApiClient.getArtistImageUrl(item.Name, options);
}
return ApiClient.getImageUrl(item.Id, options);
// For search hints
return ApiClient.getImageUrl(item.Id || item.ItemId, options);
},