mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 07:42:47 +01:00
Anotha one!
This commit is contained in:
@@ -1105,17 +1105,12 @@
|
||||
}
|
||||
|
||||
try {
|
||||
let dataPromise = cache[methodName]();
|
||||
let dataPromise = Promise.resolve(cache[methodName](options));
|
||||
dataPromise = dataPromise.then(data => {
|
||||
if (!Array.isArray(data)) {
|
||||
data = [];
|
||||
}
|
||||
|
||||
// Filter studios/networks with no thumb
|
||||
if (cacheName === 'StudiosCache' && window.KefinHomeScreem?.getConfig()?.HOME_SETTINGS?.ensureThumbsForPopularTVNetworks === true) {
|
||||
data = data.filter(item => item.ImageTags?.Thumb);
|
||||
}
|
||||
|
||||
// Apply options (sorting, limits, etc.)
|
||||
if (options.SortBy === 'Random') {
|
||||
data = data.sort(() => Math.random() - 0.5);
|
||||
|
||||
Reference in New Issue
Block a user