Skip to content

Commit

Permalink
do not add dash playlists to resources
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonocasey committed Jul 18, 2019
1 parent 9f8ffa3 commit 8f73d2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/walk-manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ const walkPlaylist = function(options) {
return onError(manifestError, manifest.uri, resources, resolve, reject);
}
// Only push manifest uris that get a non 200 and don't timeout
resources.push(manifest);
visitedUrls.push(manifest.uri);

let dash;

if (!dashPlaylist) {
resources.push(manifest);
visitedUrls.push(manifest.uri);

manifest.content = response.body;
if ((/^application\/dash\+xml/i).test(response.headers['content-type']) || (/^\<\?xml/i).test(response.body)) {
dash = true;
Expand Down
5 changes: 1 addition & 4 deletions test/unit/walk-manifest.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,8 @@ describe('walk-manifest', function() {
const setResources = new Set(resources);
const count = {mp4: 0, m4v: 0, m4a: 0, mpd: 0};

assert.equal(setResources.size, 44);
assert.equal(setResources.size, 37);
setResources.forEach(function(item) {
if (!item.uri) {
return;
}
if (item.uri.includes('.mp4')) {
count.mp4 += 1;
} else if (item.uri.includes('.m4v')) {
Expand Down

0 comments on commit 8f73d2b

Please sign in to comment.