Sort episodes to have specials at the end

This commit is contained in:
Tera 2024-03-21 23:38:46 +02:00 committed by GitHub
parent f7f8806b14
commit 6009bdaaf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2240,8 +2240,8 @@ export default class Crunchy implements ServiceClass {
// Sort episodes to have specials at the end
const specials = Object.entries(episodes).filter(a => a[0].startsWith('S')),
normal = Object.entries(episodes).filter(a => a[0].startsWith('E')),
sortedEpisodes = Object.fromEntries([...normal, ...specials]);
normal = Object.entries(episodes).filter(a => a[0].startsWith('E')),
sortedEpisodes = Object.fromEntries([...normal, ...specials]);
for (const key of Object.keys(sortedEpisodes)) {
const item = sortedEpisodes[key];