Update:Remove sort index from podcast episodes

This commit is contained in:
advplyr 2023-07-22 09:24:46 -05:00
parent d5da4441cd
commit daa8c4cd67
4 changed files with 8 additions and 27 deletions

View file

@ -50,7 +50,7 @@ class PodcastManager {
}
async downloadPodcastEpisodes(libraryItem, episodesToDownload, isAutoDownload) {
let index = libraryItem.media.episodes.length + 1
let index = Math.max(...libraryItem.media.episodes.filter(ep => ep.index == null || isNaN(ep.index)).map(ep => Number(ep.index))) + 1
for (const ep of episodesToDownload) {
const newPe = new PodcastEpisode()
newPe.setData(ep, index++)