Skip to content

Commit

Permalink
Make sure segments are only generated if none exist
Browse files Browse the repository at this point in the history
Makes sure that it only generates byterange segments for the mpd if there are non already present.
  • Loading branch information
AnimeDL committed Apr 11, 2024
1 parent 44381a0 commit 79fc658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/module.transform-mpd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
Expand Down Expand Up @@ -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'
});
Expand Down

0 comments on commit 79fc658

Please sign in to comment.