Make sure segments are only generated if none exist

Makes sure that it only generates byterange segments for the mpd if there are non already present.
This commit is contained in:
AnimeDL 2024-04-11 08:29:48 -07:00
parent 44381a04be
commit 79fc6584d7

View file

@ -61,7 +61,7 @@ export async function parse(manifest: string, language?: LanguageItem, url?: str
ret[host] = { audio: [], video: [] };
if (playlist.sidx) {
if (playlist.sidx && playlist.segments.length == 0) {
const item = await fetch(playlist.sidx.uri, {
'method': 'head'
});
@ -130,7 +130,7 @@ export async function parse(manifest: string, language?: LanguageItem, url?: str
if (!Object.prototype.hasOwnProperty.call(ret, host))
ret[host] = { audio: [], video: [] };
if (playlist.sidx) {
if (playlist.sidx && playlist.segments.length == 0) {
const item = await fetch(playlist.sidx.uri, {
'method': 'head'
});