mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Full Overhaul of KefinTweaks Configuration UI + Enhanced Home Screen
This commit is contained in:
1 parent
936f2f9cef
commit
60d3e532a2
20 files changed
+14165
-611
No files matched your search
+151
-1
@@ -3,7 +3,7 @@
|
||||
.spotlight-section {
|
||||
position: relative;
|
||||
width: calc(100% - (2 * max(env(safe-area-inset-left), 3.3%)));
|
||||
margin-bottom: 2em;
|
||||
margin: 2em 0;
|
||||
}
|
||||
|
||||
.spotlight-banner-container {
|
||||
@@ -85,6 +85,9 @@
|
||||
object-fit: contain;
|
||||
margin-bottom: 16px;
|
||||
margin-top: 10px;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left;
|
||||
}
|
||||
|
||||
.spotlight-clearart {
|
||||
@@ -408,3 +411,150 @@
|
||||
height: 125px;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
margin-bottom: 45px !important;
|
||||
}
|
||||
|
||||
[data-item-type="Movie"] .spotlight-item-logo {
|
||||
height: 120px;
|
||||
max-width: 310.2px;
|
||||
}
|
||||
|
||||
[data-item-type="Movie"] .spotlight-tagline {
|
||||
-webkit-line-clamp: 1;
|
||||
min-height: 30px;
|
||||
max-height: 30px;
|
||||
}
|
||||
|
||||
// Remove this if we switch back to Jellyfin's default scroll buttons
|
||||
.emby-scrollbuttons.padded-right {
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
min-height: 24px;
|
||||
min-width: 104px;
|
||||
padding-top: .85em;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* Progressive Section Reveal Animation */
|
||||
.cardbuilder-section-reveal {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
|
||||
transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
/* When section enters viewport, trigger animation */
|
||||
.cardbuilder-section-reveal.in-viewport {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.show-all-button {
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
padding: 4px 8px;
|
||||
min-width: auto;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
align-self: center;
|
||||
border: 1px solid rgba(255, 255, 255, 0.3) !important;
|
||||
color: var(--main-text, #fff) !important;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
display: none; /* Hidden by default */
|
||||
}
|
||||
|
||||
/* Show button when section is expandable */
|
||||
.emby-scroller-container[data-expandable="true"] .show-all-button {
|
||||
display: initial !important;
|
||||
}
|
||||
|
||||
/* Expanded grid view styles */
|
||||
.itemsContainer[data-expanded="true"] {
|
||||
display: flex !important;
|
||||
flex-wrap: wrap !important;
|
||||
white-space: normal !important;
|
||||
transform: none !important;
|
||||
transition: none !important;
|
||||
}
|
||||
|
||||
/* Hide scroll buttons when expanded */
|
||||
.emby-scroller-container:has(.itemsContainer[data-expanded="true"]) .emby-scrollbuttons {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Refresh Button Styles */
|
||||
.section-refresh-button {
|
||||
margin-left: 8px;
|
||||
padding: 4px;
|
||||
min-width: auto;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--main-text, rgba(255, 255, 255, 0.87));
|
||||
border-radius: 50%;
|
||||
font-size: 18px;
|
||||
transition: transform 0.3s ease, color 0.3s ease, background 0.2s ease;
|
||||
opacity: 0.65;
|
||||
}
|
||||
|
||||
.section-refresh-button:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
/* Spinning animation when refreshing */
|
||||
[data-refreshing="true"] .section-refresh-button {
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
/* Checkmark state - green color to indicate success */
|
||||
.section-refresh-button.check_circle {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
/* Smooth transition when changing icons */
|
||||
.section-refresh-button.refresh,
|
||||
.section-refresh-button.check_circle {
|
||||
transition: transform 0.3s ease, color 0.3s ease, background 0.2s ease;
|
||||
}
|
||||
|
||||
/* Fade in/out transitions for icon changes */
|
||||
.section-refresh-button::after {
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
|
||||
.section-refresh-button.icon-fade-out::after {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.section-refresh-button.icon-fade-in::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
/* Ensure button remains visible when expanded (data-expandable takes precedence, but this ensures it) */
|
||||
.emby-scroller-container:has(.itemsContainer[data-expanded="true"]) .show-all-button {
|
||||
display: initial !important;
|
||||
}
|
||||
+584
-590
File diff suppressed because it is too large.
Load diff
+137
-6
@@ -21,6 +21,7 @@
|
||||
.sections.homeSectionsContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.homeSectionsContainer > .section0 {
|
||||
@@ -96,7 +97,7 @@
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
div#discovery-loading-indicator:not(.show)::before {
|
||||
/* div#discovery-loading-indicator:not(.show)::before {
|
||||
content: 'Loading...';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -107,7 +108,7 @@ div#discovery-loading-indicator:not(.show)::before {
|
||||
visibility: visible;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
}
|
||||
} */
|
||||
|
||||
#indexPage[data-discovery-ready] div#discovery-loading-indicator:not(.show)::before {
|
||||
content: 'Discover More';
|
||||
@@ -126,13 +127,13 @@ div#discovery-loading-indicator:not(.show)::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.libraryPage:has(.load-more-discovery-btn) div#discovery-loading-indicator {
|
||||
opacity: 0;
|
||||
[data-loading-discovery="true"] div#discovery-loading-indicator {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#indexPage[data-discovery-ready]:not([data-infinite-scroll='true']) div#discovery-loading-indicator {
|
||||
/* #indexPage[data-discovery-ready]:not([data-infinite-scroll='true']) div#discovery-loading-indicator {
|
||||
display: none;
|
||||
}
|
||||
} */
|
||||
|
||||
#indexPage:not([data-discovery-ready]) div#discovery-loading-indicator:not(.show)::after {
|
||||
content: '';
|
||||
@@ -144,4 +145,134 @@ div#discovery-loading-indicator:not(.show)::after {
|
||||
}
|
||||
.spotlight-section {
|
||||
width: calc(100% - (2 * max(env(safe-area-inset-left),3.3%)));
|
||||
}
|
||||
|
||||
|
||||
.load-more-discovery-btn {
|
||||
display: block;
|
||||
visibility: visible;
|
||||
order: 99998 !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.sections.loading-discovery .load-more-discovery-btn {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
/* Discovery section loading indicator */
|
||||
.sections.loading-discovery .discovery-loading-indicator {
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.discovery-loading-indicator, .load-more-discovery-btn {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.discovery-loading-indicator {
|
||||
display: none;
|
||||
opacity: 1;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
transition: opacity 0.3s ease;
|
||||
order: 99999 !important;
|
||||
position: relative;
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.discovery-loading-indicator .spinner {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 2px solid rgba(255,255,255,0.3);
|
||||
border-top-color: var(--theme-primary-color, #3498db);
|
||||
border-radius: 50%;
|
||||
animation: discovery-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes discovery-spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Hide next up section if next up if KefinTweaks next up section is present */
|
||||
.homeSectionsContainer:has([data-section-id="nextUp"]) > div:nth-child(-n+10):has(a[href*="nextup"]) {
|
||||
display: none;
|
||||
}
|
||||
/* Hide continue watching section if continue watching if KefinTweaks continue watching section is present */
|
||||
.homeSectionsContainer:has([data-section-id="continueWatching"]) > div:nth-child(-n+10):has([data-positionticks][data-mediatype="Video"]) {
|
||||
display: none;
|
||||
}
|
||||
/* Hide recently added section if recently added if KefinTweaks recently added section is present */
|
||||
.homeSectionsContainer:has([data-section-id*="recently-added"]) > div:nth-child(-n+10):has(a[href*="movies&tab=1"]),
|
||||
.homeSectionsContainer:has([data-section-id*="recently-added"]) > div:nth-child(-n+10):has(a[href*="tv&tab=1"]),
|
||||
.homeSectionsContainer:has([data-section-id*="recently-added"]) > div:nth-child(-n+10):has(a[href*="music&tab=1"])
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide scroll buttons on mobile and tablet layouts */
|
||||
@media (max-width: 768px) {
|
||||
.emby-scrollbuttons {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide scroll buttons on mobile using Jellyfin's layout classes */
|
||||
.layout-mobile .emby-scrollbuttons,
|
||||
.layout-tv .emby-scrollbuttons {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.load-more-discovery-btn {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sections[data-loading-discovery="true"] .load-more-discovery-btn {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.sections[data-loading-discovery="true"] .discovery-loading-indicator {
|
||||
display: flex !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.discovery-loading-indicator {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
transition: opacity 0.3s ease;
|
||||
order: 99999 !important;
|
||||
position: relative;
|
||||
justify-content: start;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.discovery-loading-indicator .spinner {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 2px solid rgba(255,255,255,0.3);
|
||||
border-top-color: var(--theme-primary-color, #3498db);
|
||||
border-radius: 50%;
|
||||
animation: discovery-spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes discovery-spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.homeSectionsContainer [data-section-id="popularTVNetworks"] .card .cardText {
|
||||
visibility: hidden;
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,97 @@
|
||||
// KefinTweaks Community Home Screen Sections
|
||||
// This file contains curated collections of home screen sections submitted by the community.
|
||||
// Submit your own: [URL Placeholder]
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
const COMMUNITY_COLLECTIONS = [
|
||||
{
|
||||
"name": "Based on Your Watched History [Discovery]",
|
||||
"author": "HighImKevin",
|
||||
"sections": [
|
||||
{
|
||||
"name": "Movies You Forgot About",
|
||||
"enabled": true,
|
||||
"order": 22,
|
||||
"discoveryEnabled": true,
|
||||
"renderMode": "Normal",
|
||||
"cardFormat": "Poster",
|
||||
"queries": [
|
||||
{
|
||||
"queryOptions": {
|
||||
"IncludeItemTypes": [
|
||||
"Movie"
|
||||
],
|
||||
"SortBy": "PlayCount",
|
||||
"SortOrder": "Descending",
|
||||
"Filters": "IsResumable",
|
||||
"Limit": 20
|
||||
}
|
||||
}
|
||||
],
|
||||
"flattenSeries": false,
|
||||
"id": "custom-1768607068997",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"name": "Best Movies You've Never Seen",
|
||||
"enabled": true,
|
||||
"order": 100,
|
||||
"discoveryEnabled": true,
|
||||
"renderMode": "Normal",
|
||||
"cardFormat": "Poster",
|
||||
"queries": [
|
||||
{
|
||||
"queryOptions": {
|
||||
"IsUnplayed": true,
|
||||
"IncludeItemTypes": [
|
||||
"Movie"
|
||||
],
|
||||
"SortBy": "Random",
|
||||
"SortOrder": "Descending",
|
||||
"Limit": 20,
|
||||
"MinCommunityRating": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"flattenSeries": false,
|
||||
"id": "custom-1769640868950",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"name": "Rewatch One Of Your Favorites",
|
||||
"enabled": true,
|
||||
"order": 100,
|
||||
"discoveryEnabled": true,
|
||||
"renderMode": "Normal",
|
||||
"cardFormat": "Poster",
|
||||
"queries": [
|
||||
{
|
||||
"queryOptions": {
|
||||
"IncludeItemTypes": [
|
||||
"Movie"
|
||||
],
|
||||
"SortBy": "Random",
|
||||
"SortOrder": "Ascending",
|
||||
"Filters": "IsFavorite",
|
||||
"Limit": 20
|
||||
}
|
||||
}
|
||||
],
|
||||
"flattenSeries": false,
|
||||
"id": "custom-1769644637599",
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
}
|
||||
// Add more collections here
|
||||
];
|
||||
|
||||
// Expose to window
|
||||
window.KefinCommunityConfig = {
|
||||
collections: COMMUNITY_COLLECTIONS
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
@@ -0,0 +1,868 @@
|
||||
// KefinTweaks Home Screen Configuration 2
|
||||
// Streamlined configuration with queries array format
|
||||
// Defines default sections, discovery templates, and cache settings
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// Default Cache Configuration (times in milliseconds)
|
||||
const CACHE_CONFIG = {
|
||||
DEFAULT_TTL: 60 * 60 * 1000, // 1 hour
|
||||
VERY_SHORT_TTL: 1 * 60 * 1000, // 1 minute
|
||||
SHORT_TTL: 5 * 60 * 1000, // 5 minutes
|
||||
LONG_TTL: 24 * 60 * 60 * 1000, // 24 hours
|
||||
STATIC_TTL: 7 * 24 * 60 * 60 * 1000, // 1 week
|
||||
DISCOVERY_TTL: 6 * 60 * 60 * 1000, // 6 hours
|
||||
FORCE_REFRESH_TTL: 0 // 0
|
||||
};
|
||||
|
||||
// Standard Home Sections (non-seasonal)
|
||||
// New streamlined format with queries array, organized into groups
|
||||
const KEFINTWEAKS_HOME_SECTION_GROUPS = [
|
||||
// Continue Watching Group
|
||||
{
|
||||
id: 'home-continue-watching',
|
||||
name: 'Continue Watching',
|
||||
sections: [
|
||||
{
|
||||
id: 'continueWatching',
|
||||
name: 'Resume',
|
||||
enabled: false,
|
||||
hidden: false,
|
||||
order: 10,
|
||||
cardFormat: 'Thumb',
|
||||
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
SortBy: 'DatePlayed',
|
||||
SortOrder: 'Descending',
|
||||
Filters: 'IsResumable',
|
||||
IncludeItemTypes: ['Episode', 'Movie'],
|
||||
Limit: 24
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'nextUp',
|
||||
name: 'Next Up',
|
||||
enabled: false,
|
||||
hidden: false,
|
||||
order: 11,
|
||||
cardFormat: 'Thumb',
|
||||
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
|
||||
queries: [
|
||||
{
|
||||
path: '/Shows/NextUp',
|
||||
queryOptions: {
|
||||
Limit: 24,
|
||||
EnableResumable: 'false'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'continueWatchingAndNextUp',
|
||||
name: 'Continue Watching',
|
||||
enabled: false, // Disabled by default - only used when merge setting is enabled
|
||||
order: 10,
|
||||
hidden: true,
|
||||
cardFormat: 'Thumb',
|
||||
ttl: CACHE_CONFIG.FORCE_REFRESH_TTL,
|
||||
sortBy: 'DatePlayed', // Used to sort merged results from both queries
|
||||
sortOrder: 'Descending', // Most recent first
|
||||
queries: [
|
||||
{
|
||||
// Continue Watching (Movies only when merged)
|
||||
queryOptions: {
|
||||
SortBy: 'DatePlayed',
|
||||
SortOrder: 'Descending',
|
||||
Filters: 'IsResumable',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
Limit: 24
|
||||
}
|
||||
},
|
||||
{
|
||||
// Next Up (Episodes)
|
||||
path: '/Shows/NextUp',
|
||||
queryOptions: {
|
||||
Limit: 24,
|
||||
EnableResumable: 'true'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Upcoming Group
|
||||
{
|
||||
id: 'home-upcoming',
|
||||
name: 'Upcoming',
|
||||
sections: [
|
||||
{
|
||||
id: 'upcoming',
|
||||
name: 'Coming Soon',
|
||||
enabled: true,
|
||||
order: 60,
|
||||
cardFormat: 'Thumb',
|
||||
flattenSeries: true,
|
||||
ttl: CACHE_CONFIG.LONG_TTL,
|
||||
queries: [
|
||||
{
|
||||
path: '/Shows/Upcoming',
|
||||
queryOptions: {
|
||||
Limit: 48,
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Recently Released Group
|
||||
{
|
||||
id: 'home-recently-released',
|
||||
name: 'Recently Released',
|
||||
sections: [
|
||||
{
|
||||
id: 'recentlyReleased.movies',
|
||||
name: 'Recently Released Movies',
|
||||
enabled: true,
|
||||
order: 20,
|
||||
cardFormat: 'Poster',
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
minAge: 0,
|
||||
maxAge: 30,
|
||||
queryOptions: {
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'PremiereDate',
|
||||
SortOrder: 'Descending',
|
||||
Limit: 16,
|
||||
Fields: 'PremiereDate'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'recentlyReleased.episodes',
|
||||
name: 'Recently Aired Episodes',
|
||||
enabled: true,
|
||||
order: 21,
|
||||
cardFormat: 'Thumb',
|
||||
flattenSeries: true,
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
minAge: 0,
|
||||
maxAge: 7,
|
||||
queryOptions: {
|
||||
IncludeItemTypes: ['Episode'],
|
||||
IsMissing: 'false',
|
||||
SortBy: 'PremiereDate',
|
||||
SortOrder: 'Descending',
|
||||
Limit: 100 // Fetch more for dedupe
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// IMDb Top 250 Group
|
||||
{
|
||||
id: 'home-imdb-top-250',
|
||||
name: 'IMDb Top 250',
|
||||
sections: [
|
||||
{
|
||||
id: 'imdbTop250',
|
||||
name: 'IMDb Top 250',
|
||||
enabled: true,
|
||||
order: 70,
|
||||
cardFormat: 'Poster',
|
||||
ttl: CACHE_CONFIG.LONG_TTL,
|
||||
queries: [
|
||||
{
|
||||
dataSource: 'MoviesCache.getImdbTop250Movies',
|
||||
queryOptions: {
|
||||
Limit: 20,
|
||||
SortBy: 'Random',
|
||||
IncludeItemTypes: ['Movie']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Popular TV Networks Group
|
||||
{
|
||||
id: 'home-popular-tv-networks',
|
||||
name: 'Popular TV Networks',
|
||||
sections: [
|
||||
{
|
||||
id: 'popularTVNetworks',
|
||||
name: 'Popular TV Networks',
|
||||
enabled: true,
|
||||
order: 72,
|
||||
cardFormat: 'Thumb',
|
||||
ttl: CACHE_CONFIG.STATIC_TTL,
|
||||
queries: [
|
||||
{
|
||||
dataSource: 'StudiosCache.getPopularTVNetworks',
|
||||
queryOptions: {
|
||||
SortBy: 'SortName',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Watch Again Group
|
||||
{
|
||||
id: 'home-watch-again',
|
||||
name: 'Watch Again',
|
||||
sections: [
|
||||
{
|
||||
id: 'watchAgain',
|
||||
name: 'Watch Again',
|
||||
enabled: true,
|
||||
order: 73,
|
||||
cardFormat: 'Random',
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Filters: 'IsPlayed',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Watchlist Group
|
||||
{
|
||||
id: 'home-watchlist',
|
||||
name: 'Watchlist',
|
||||
sections: [
|
||||
{
|
||||
id: 'watchlist',
|
||||
name: 'Watchlist',
|
||||
enabled: true,
|
||||
order: 71,
|
||||
cardFormat: 'Poster',
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Filters: 'Likes',
|
||||
SortBy: 'DateCreated',
|
||||
SortOrder: 'Descending',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Resume Playlists Group
|
||||
{
|
||||
id: 'home-resume-playlists',
|
||||
name: 'Pick Up Where You Left Off',
|
||||
sections: [
|
||||
{
|
||||
id: 'resumePlaylists',
|
||||
name: 'Continue Watching Your Playlists',
|
||||
enabled: false,
|
||||
order: 74,
|
||||
cardFormat: 'Poster',
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
IsUnplayed: true,
|
||||
IncludeItemTypes: ['Playlist'],
|
||||
SortBy: 'PlayedPercentage',
|
||||
SortOrder: 'Descending',
|
||||
Limit: 0
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'completeCollections',
|
||||
name: 'Finish Watching Your Collections',
|
||||
enabled: false,
|
||||
order: 75,
|
||||
cardFormat: 'Poster',
|
||||
ttl: CACHE_CONFIG.DEFAULT_TTL,
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
IsUnplayed: true,
|
||||
IncludeItemTypes: ['BoxSet'],
|
||||
SortBy: 'PlayedPercentage',
|
||||
SortOrder: 'Descending'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
// Seasonal Sections
|
||||
// Sections that only appear during specific date ranges
|
||||
const KEFINTWEAKS_SEASONAL_SECTION_GROUPS = [
|
||||
// Seasonal Sections - Halloween
|
||||
{
|
||||
id: 'seasonal-halloween',
|
||||
name: 'Halloween',
|
||||
sections: [
|
||||
{
|
||||
id: 'seasonal.halloween.halloween-tag',
|
||||
name: 'Halloween Movies',
|
||||
enabled: true,
|
||||
startDate: '10-01',
|
||||
endDate: '10-31',
|
||||
order: 50,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Tags: 'halloween',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.halloween.halloween-horror',
|
||||
name: 'Horror Movies',
|
||||
enabled: true,
|
||||
startDate: '10-01',
|
||||
endDate: '10-31',
|
||||
order: 51,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Genres: 'Horror',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.halloween.halloween-thriller',
|
||||
name: 'Thriller Movies',
|
||||
enabled: true,
|
||||
startDate: '10-01',
|
||||
endDate: '10-31',
|
||||
order: 52,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Genres: 'Thriller',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Seasonal Sections - Christmas
|
||||
{
|
||||
id: 'seasonal-christmas',
|
||||
name: 'Christmas',
|
||||
sections: [
|
||||
{
|
||||
id: 'seasonal.christmas.christmas-movies',
|
||||
name: 'Christmas Movies',
|
||||
enabled: true,
|
||||
startDate: '12-01',
|
||||
endDate: '12-31',
|
||||
order: 50,
|
||||
cardFormat: 'Poster',
|
||||
renderMode: 'Spotlight',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Tags: 'christmas',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.christmas.christmas-episodes',
|
||||
name: 'Christmas Episodes',
|
||||
enabled: true,
|
||||
startDate: '12-01',
|
||||
endDate: '12-31',
|
||||
order: 51,
|
||||
cardFormat: 'Thumb',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
SearchTerm: 'christmas',
|
||||
IncludeItemTypes: ['Episode'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Seasonal Sections - New Year's
|
||||
{
|
||||
id: 'seasonal-new-years',
|
||||
name: 'New Year\'s',
|
||||
sections: [
|
||||
{
|
||||
id: 'seasonal.new-years.new-years-movies',
|
||||
name: 'New Year\'s Movies',
|
||||
enabled: true,
|
||||
startDate: '01-01',
|
||||
endDate: '01-02',
|
||||
order: 50,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Tags: 'new year\'s eve',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.new-years.new-years-episodes',
|
||||
name: 'New Year\'s Episodes',
|
||||
enabled: true,
|
||||
startDate: '01-01',
|
||||
endDate: '01-02',
|
||||
order: 51,
|
||||
cardFormat: 'Thumb',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
SearchTerm: 'new year',
|
||||
IncludeItemTypes: ['Episode'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Seasonal Sections - Valentine's
|
||||
{
|
||||
id: 'seasonal-valentines',
|
||||
name: 'Valentine\'s',
|
||||
sections: [
|
||||
{
|
||||
id: 'seasonal.valentines.valentines-movies',
|
||||
name: 'Valentine\'s Movies',
|
||||
enabled: true,
|
||||
startDate: '02-01',
|
||||
endDate: '02-15',
|
||||
order: 50,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Tags: 'valentine\'s day',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.valentines.valentines-episodes',
|
||||
name: 'Valentine\'s Episodes',
|
||||
enabled: true,
|
||||
startDate: '02-01',
|
||||
endDate: '02-15',
|
||||
order: 51,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
SearchTerm: 'valentine',
|
||||
IncludeItemTypes: ['Episode'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
// Seasonal Sections - Thanksgiving
|
||||
{
|
||||
id: 'seasonal-thanksgiving',
|
||||
name: 'Thanksgiving',
|
||||
sections: [
|
||||
{
|
||||
id: 'seasonal.thanksgiving.thanksgiving-movies',
|
||||
name: 'Thanksgiving Movies',
|
||||
enabled: true,
|
||||
startDate: '11-20',
|
||||
endDate: '11-30',
|
||||
order: 50,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
Tags: 'thanksgiving',
|
||||
IncludeItemTypes: ['Movie'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'seasonal.thanksgiving.thanksgiving-episodes',
|
||||
name: 'Thanksgiving Episodes',
|
||||
enabled: true,
|
||||
startDate: '11-20',
|
||||
endDate: '11-30',
|
||||
order: 51,
|
||||
cardFormat: 'Poster',
|
||||
queries: [
|
||||
{
|
||||
queryOptions: {
|
||||
SearchTerm: 'thanksgiving',
|
||||
IncludeItemTypes: ['Episode'],
|
||||
SortBy: 'Random',
|
||||
Limit: 20
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
// Discovery Templates
|
||||
// These use "Dynamic" types where 'source' is determined at runtime
|
||||
// Organized into groups
|
||||
const KEFINTWEAKS_DISCOVERY_SECTION_GROUPS = [
|
||||
// Genre Movies Group
|
||||
{
|
||||
id: 'discovery-genre-movies',
|
||||
name: 'Genre Movies',
|
||||
sections: [
|
||||
{
|
||||
id: 'genreMovies',
|
||||
type: 'Genre',
|
||||
source: 'Dynamic', // Will be filled with a random Genre ID/Name
|
||||
name: '{Genre} Movies',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'spotlightGenre',
|
||||
type: 'Genre',
|
||||
source: 'Dynamic',
|
||||
name: 'Top Rated {Genre}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'CommunityRating',
|
||||
sortOrderDirection: 'Descending',
|
||||
includeItemTypes: ['Movie'],
|
||||
renderMode: 'Spotlight', // Replaces 'type: spotlight-genre' with attribute
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// People Movies Group
|
||||
{
|
||||
id: 'discovery-people-movies',
|
||||
name: 'People Movies',
|
||||
sections: [
|
||||
{
|
||||
id: 'directedByTopDirector',
|
||||
type: 'Person',
|
||||
source: 'Dynamic', // Random Director ID
|
||||
personType: 'Director', // Extra metadata for dynamic logic
|
||||
name: 'Directed by {Person}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'writtenByTopWriter',
|
||||
type: 'Person',
|
||||
source: 'Dynamic', // Random Writer ID
|
||||
personType: 'Writer',
|
||||
name: 'Written by {Person}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'starringTopActor',
|
||||
type: 'Person',
|
||||
source: 'Dynamic', // Random Actor ID
|
||||
personType: 'Actor',
|
||||
name: 'Starring {Person}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// Recently Watched People Group
|
||||
{
|
||||
id: 'discovery-recently-watched-people',
|
||||
name: 'Recently Watched People',
|
||||
sections: [
|
||||
{
|
||||
id: 'starringActorRecentlyWatched',
|
||||
type: 'Person',
|
||||
source: 'Dynamic', // Actor from Recently Watched
|
||||
personType: 'Actor',
|
||||
sourceType: 'watched-recent', // Hint for source generator
|
||||
name: 'Starring {Person} since you watched {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'directedByDirectorRecentlyWatched',
|
||||
type: 'Person',
|
||||
source: 'Dynamic', // Director from Recently Watched
|
||||
personType: 'Director',
|
||||
sourceType: 'watched-recent',
|
||||
name: 'Directed by {Person} since you watched {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'writtenByWriterRecentlyWatched',
|
||||
type: 'Person',
|
||||
source: 'Dynamic',
|
||||
personType: 'Writer',
|
||||
sourceType: 'watched-recent',
|
||||
name: 'Written by {Person} since you watched {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// Similar to Watched Group
|
||||
{
|
||||
id: 'discovery-similar-to-watched',
|
||||
name: 'Similar to Watched',
|
||||
sections: [
|
||||
{
|
||||
id: 'becauseYouWatched',
|
||||
type: 'Similar',
|
||||
source: 'Dynamic', // Random Watched Item ID
|
||||
sourceType: 'watched',
|
||||
name: 'Because you watched {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random', // Typically 'Similarity' but usually returned sorted by API
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'becauseYouRecentlyWatched',
|
||||
type: 'Similar',
|
||||
source: 'Dynamic', // Random Recently Watched ID
|
||||
sourceType: 'watched-recent',
|
||||
name: 'Because you recently watched {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// Liked Group
|
||||
{
|
||||
id: 'discovery-liked',
|
||||
name: 'Liked',
|
||||
sections: [
|
||||
{
|
||||
id: 'becauseYouLiked',
|
||||
type: 'Similar',
|
||||
source: 'Dynamic', // Random Favorite Item ID
|
||||
sourceType: 'liked',
|
||||
name: 'Because you liked {Title}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Movie'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// Studios Group
|
||||
{
|
||||
id: 'discovery-studios',
|
||||
name: 'Studios',
|
||||
sections: [
|
||||
{
|
||||
id: 'studioShows',
|
||||
type: 'Studio',
|
||||
source: 'Dynamic', // Random Studio ID
|
||||
name: 'Shows from {Studio}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random',
|
||||
cardFormat: 'Poster',
|
||||
includeItemTypes: ['Series'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
},
|
||||
{
|
||||
id: 'spotlightNetwork',
|
||||
type: 'Studio',
|
||||
source: 'Dynamic',
|
||||
name: 'Top Rated from {Studio}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'CommunityRating',
|
||||
sortOrderDirection: 'Descending',
|
||||
includeItemTypes: ['Series'],
|
||||
renderMode: 'Spotlight',
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
},
|
||||
// Collections Group
|
||||
{
|
||||
id: 'discovery-collections',
|
||||
name: 'Collections',
|
||||
sections: [
|
||||
{
|
||||
id: 'collections',
|
||||
type: 'Collection', // Standard type, but source is dynamic here
|
||||
source: 'Dynamic',
|
||||
name: '{Collection}',
|
||||
enabled: true,
|
||||
itemLimit: 20,
|
||||
sortOrder: 'Random', // Order within the collection
|
||||
includeItemTypes: ['Movie', 'Series'],
|
||||
ttl: CACHE_CONFIG.DISCOVERY_TTL
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
const DISCOVERY_SETTINGS = {
|
||||
enabled: true,
|
||||
infiniteScroll: true,
|
||||
minPeopleAppearances: 10,
|
||||
minGenreMovieCount: 50,
|
||||
defaultItemLimit: 16,
|
||||
defaultSortOrder: "Random",
|
||||
defaultCardFormat: "Poster",
|
||||
spotlightDiscoveryChance: 0.5,
|
||||
renderSpotlightAboveMatching: false,
|
||||
spotlight: {
|
||||
autoPlay: true,
|
||||
interval: 5000,
|
||||
showDots: true,
|
||||
showNavButtons: true,
|
||||
showClearArt: true
|
||||
},
|
||||
randomizeOrder: false
|
||||
}
|
||||
|
||||
const SEASONAL_THEME_SETTINGS = {
|
||||
enabled: true,
|
||||
enableSeasonalAnimations: true,
|
||||
enableSeasonalBackground: true,
|
||||
seasonToggles: [
|
||||
{
|
||||
id: 'halloween',
|
||||
name: 'Halloween',
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'christmas',
|
||||
name: 'Christmas',
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'new-years',
|
||||
name: 'New Year\'s',
|
||||
enabled: false
|
||||
},
|
||||
{
|
||||
id: 'valentines',
|
||||
name: 'Valentine\'s Day',
|
||||
enabled: false
|
||||
}
|
||||
]
|
||||
}
|
||||
const HOME_SETTINGS = {
|
||||
minimumSeriesForPopularTVNetworks: 10,
|
||||
}
|
||||
|
||||
// Expose configuration
|
||||
window.KefinHomeConfig2 = {
|
||||
CACHE: CACHE_CONFIG,
|
||||
HOME_SECTION_GROUPS: KEFINTWEAKS_HOME_SECTION_GROUPS,
|
||||
SEASONAL_SECTION_GROUPS: KEFINTWEAKS_SEASONAL_SECTION_GROUPS,
|
||||
DISCOVERY_SECTION_GROUPS: KEFINTWEAKS_DISCOVERY_SECTION_GROUPS,
|
||||
CUSTOM_SECTION_GROUPS: [], // Empty by default - user-created/imported sections
|
||||
REMOVE_CONFLICTING_SECTIONS: true,
|
||||
MERGE_NEXT_UP: false,
|
||||
HOME_SETTINGS: HOME_SETTINGS,
|
||||
DISCOVERY_SETTINGS: DISCOVERY_SETTINGS,
|
||||
SEASONAL_THEME_SETTINGS: SEASONAL_THEME_SETTINGS
|
||||
};
|
||||
|
||||
console.log('[KefinTweaks HomeConfig2] Configuration loaded');
|
||||
|
||||
})();
|
||||
+1566
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user