From 8f73d2b917b3bb74788b88c580d66fa9882e7a4c Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Thu, 18 Jul 2019 11:51:27 -0400 Subject: [PATCH] do not add dash playlists to resources --- src/walk-manifest.js | 6 +++--- test/unit/walk-manifest.spec.js | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/walk-manifest.js b/src/walk-manifest.js index ec3b64d..d91b29d 100644 --- a/src/walk-manifest.js +++ b/src/walk-manifest.js @@ -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; diff --git a/test/unit/walk-manifest.spec.js b/test/unit/walk-manifest.spec.js index 3d7a7c9..7b2ab8b 100644 --- a/test/unit/walk-manifest.spec.js +++ b/test/unit/walk-manifest.spec.js @@ -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')) {