@@ -4569,6 +4593,15 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
case 'Episode':
sectionName = 'episodes';
break;
+ case 'BoxSet':
+ sectionName = 'boxsets';
+ break;
+ case 'Playlist':
+ sectionName = 'playlists';
+ break;
+ case 'Video':
+ sectionName = 'homevideos';
+ break;
default:
LOG('Unknown item type for cache update:', itemType);
return;
@@ -5106,7 +5139,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
let removedCount = 0;
// Check all watchlist sections
- const sections = ['movies', 'series', 'seasons', 'episodes'];
+ const sections = ['movies', 'series', 'seasons', 'episodes', 'boxsets', 'playlists', 'homevideos'];
for (const section of sections) {
const items = watchlistCache[section].data;
const playedItems = items.filter(item => item.UserData && item.UserData.Played);
@@ -5181,7 +5214,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
async function checkIfItemInWatchlist(itemId) {
try {
// First check if we have the item in our cache (faster)
- const sections = ['movies', 'series', 'seasons', 'episodes'];
+ const sections = ['movies', 'series', 'seasons', 'episodes', 'boxsets', 'playlists', 'homevideos'];
for (const section of sections) {
if (watchlistCache[section].data.some(item => item.Id === itemId)) {
return true;
@@ -5235,7 +5268,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
const token = apiClient.accessToken();
// Fetch movies that have been played
- const url = `${serverUrl}/Items?IncludeItemTypes=Movie&UserId=${userId}&Recursive=true&Filters=IsPlayed&Fields=UserData,ProviderIds&EnableImageTypes=Primary,Backdrop,Thumb&ImageTypeLimit=1&SortBy=DatePlayed&SortOrder=Descending`;
+ const url = `${serverUrl}/Items?IncludeItemTypes=Movie&UserId=${userId}&Recursive=true&Filters=IsPlayed&Fields=UserData,ProviderIds,People&EnableImageTypes=Primary,Backdrop,Thumb&ImageTypeLimit=1&SortBy=DatePlayed&SortOrder=Descending`;
try {
const res = await fetch(url, { headers: { "Authorization": `MediaBrowser Token=\"${token}\"` } });
@@ -6737,7 +6770,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
return;
}
- const watchlistSections = ['.watchlist-movies', '.watchlist-series', '.watchlist-seasons', '.watchlist-episodes'];
+ const watchlistSections = ['.watchlist-movies', '.watchlist-series', '.watchlist-seasons', '.watchlist-episodes', '.watchlist-boxsets', '.watchlist-playlists', '.watchlist-homevideos'];
// Check if we're currently fetching data or data hasn't been fetched yet
if (!tabStates.watchlist.isDataFetched) {
@@ -6766,7 +6799,11 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
renderCardsFromCache(watchlistSection.querySelector('.watchlist-movies'), 'movies', 'Movie'),
renderCardsFromCache(watchlistSection.querySelector('.watchlist-series'), 'series', 'Series'),
renderCardsFromCache(watchlistSection.querySelector('.watchlist-seasons'), 'seasons', 'Season'),
- renderCardsFromCache(watchlistSection.querySelector('.watchlist-episodes'), 'episodes', 'Episode')
+ renderCardsFromCache(watchlistSection.querySelector('.watchlist-episodes'), 'episodes', 'Episode'),
+ renderCardsFromCache(watchlistSection.querySelector('.watchlist-boxsets'), 'boxsets', 'BoxSet'),
+ renderCardsFromCache(watchlistSection.querySelector('.watchlist-playlists'), 'playlists', 'Playlist'),
+ renderCardsFromCache(watchlistSection.querySelector('.watchlist-homevideos'), 'homevideos', 'Video')
+
]);
// Update watchlist stats in header
@@ -6969,6 +7006,9 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
const seasonsCount = watchlistCache.seasons.data.length;
const episodesCount = watchlistCache.episodes.data.length;
const moviesCount = watchlistCache.movies.data.length;
+ const boxsetsCount = watchlistCache.boxsets.data.length;
+ const playlistsCount = watchlistCache.playlists.data.length;
+ const homevideosCount = watchlistCache.homevideos.data.length;
// Update or hide shows stats
const showsStats = getElementByIdSafe('watchlist-stats-shows');
@@ -7013,6 +7053,39 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
moviesStats.style.display = 'none';
}
}
+
+ // Update or hide boxsets stats
+ const boxsetsStats = getElementByIdSafe('watchlist-stats-boxsets');
+ if (boxsetsStats) {
+ if (boxsetsCount > 0) {
+ boxsetsStats.style.display = 'flex';
+ getElementByIdSafe('watchlist-boxsets-count').textContent = `${boxsetsCount} Box Set${boxsetsCount === 1 ? '' : 's'}`;
+ } else {
+ boxsetsStats.style.display = 'none';
+ }
+ }
+
+ // Update or hide playlists stats
+ const playlistsStats = getElementByIdSafe('watchlist-stats-playlists');
+ if (playlistsStats) {
+ if (playlistsCount > 0) {
+ playlistsStats.style.display = 'flex';
+ getElementByIdSafe('watchlist-playlists-count').textContent = `${playlistsCount} Playlist${playlistsCount === 1 ? '' : 's'}`;
+ } else {
+ playlistsStats.style.display = 'none';
+ }
+ }
+
+ // Update or hide homevideos stats
+ const homevideosStats = getElementByIdSafe('watchlist-stats-homevideos');
+ if (homevideosStats) {
+ if (homevideosCount > 0) {
+ homevideosStats.style.display = 'flex';
+ getElementByIdSafe('watchlist-homevideos-count').textContent = `${homevideosCount} Home Video${homevideosCount === 1 ? '' : 's'}`;
+ } else {
+ homevideosStats.style.display = 'none';
+ }
+ }
}
// Setup layout toggle button functionality
@@ -7312,7 +7385,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
});
// Check if item type is supported for watchlist
- if (itemType !== "Movie" && itemType !== "Series" && itemType !== "Season" && itemType !== "Episode") {
+ if (itemType !== "Movie" && itemType !== "Series" && itemType !== "Season" && itemType !== "Episode" && itemType !== "BoxSet" && itemType !== "Playlist" && itemType !== "Video") {
return;
}
@@ -7337,6 +7410,15 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
case 'Episode':
sectionName = 'episodes';
break;
+ case 'BoxSet':
+ sectionName = 'boxsets';
+ break;
+ case 'Playlist':
+ sectionName = 'playlists';
+ break;
+ case 'Video':
+ sectionName = 'homevideos';
+ break;
default:
// Unknown type, skip check
break;
@@ -7495,7 +7577,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
// Get item data to check if it should be shown and current state
ApiClient.getItem(ApiClient.getCurrentUserId(), itemId).then((item) => {
// Only show for Movies, Series, Seasons, and Episodes
- if (item.Type !== "Movie" && item.Type !== "Series" && item.Type !== "Season" && item.Type !== "Episode") {
+ if (item.Type !== "Movie" && item.Type !== "Series" && item.Type !== "Season" && item.Type !== "Episode" && item.Type !== "BoxSet" && item.Type !== "Playlist" && item.Type !== "Video") {
watchlistIcon.style.display = "none";
}
@@ -7549,7 +7631,7 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
}
// Check if item is provided and if item type is supported for watchlist
- if (item && (item.Type === "Movie" || item.Type === "Series" || item.Type === "Season" || item.Type === "Episode")) {
+ if (item && (item.Type === "Movie" || item.Type === "Series" || item.Type === "Season" || item.Type === "Episode" || item.Type === "BoxSet" || item.Type === "Playlist" || item.Type === "Video")) {
visibleItemDetailPage.dataset.watchlistButtonAdded = 'true';
addDetailPageWatchlistButton(item);
}
@@ -7745,7 +7827,10 @@ In the Custom Tabs plugin, add a new tab with the following HTML content:
{ name: 'Movies', el: watchlistSection.querySelector('.watchlist-movies') },
{ name: 'Series', el: watchlistSection.querySelector('.watchlist-series') },
{ name: 'Seasons', el: watchlistSection.querySelector('.watchlist-seasons') },
- { name: 'Episodes', el: watchlistSection.querySelector('.watchlist-episodes') }
+ { name: 'Episodes', el: watchlistSection.querySelector('.watchlist-episodes') },
+ { name: 'Box Sets', el: watchlistSection.querySelector('.watchlist-boxsets') },
+ { name: 'Playlists', el: watchlistSection.querySelector('.watchlist-playlists') },
+ { name: 'Home Videos', el: watchlistSection.querySelector('.watchlist-homevideos') }
];
containers.forEach(({ name, el }) => {