codeschool-download
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -74,3 +74,3 @@ 'use strict'; | ||
_context3.next = 27; | ||
return (0, _promptCourses.promptCoursesForExtraction)(coursesList); | ||
return (0, _promptCourses.promptCoursesForExtraction)(coursesList, storedCourses); | ||
@@ -77,0 +77,0 @@ case 27: |
@@ -104,3 +104,3 @@ 'use strict'; | ||
case 0: | ||
fileName = _case2.default.kebab(video.title); | ||
fileName = index + 1 + '-' + _case2.default.kebab(video.title); | ||
filePath = basePath + fileName + '.mp4'; | ||
@@ -107,0 +107,0 @@ |
@@ -30,3 +30,9 @@ 'use strict'; | ||
case 0: | ||
choices = Object.keys(storedCourses).sort(function (titleA, titleB) { | ||
choices = Object.keys(storedCourses).filter(function (courseName) { | ||
var course = storedCourses[courseName]; | ||
var videos = course.videos.filter(function (video) { | ||
return !video.downloaded; | ||
}); | ||
return videos.length > 0; | ||
}).sort(function (titleA, titleB) { | ||
titleA = titleA.replace(/[^a-z0-9 ]/gi, '').toLowerCase(); | ||
@@ -66,2 +72,4 @@ titleB = titleB.replace(/[^a-z0-9 ]/gi, '').toLowerCase(); | ||
var _ref3 = _asyncToGenerator(_regenerator2.default.mark(function _callee2(coursesList) { | ||
var storedCourses = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _coursesList, choices, _ref4, selectedCourses; | ||
@@ -84,3 +92,3 @@ | ||
return { | ||
name: course.title | ||
name: storedCourses[course.title] ? course.title + ' (Extracted once) ' : course.title | ||
}; | ||
@@ -111,5 +119,5 @@ }); | ||
return function promptCoursesForExtraction(_x2) { | ||
return function promptCoursesForExtraction(_x3) { | ||
return _ref3.apply(this, arguments); | ||
}; | ||
}(); |
{ | ||
"name": "codeschool-download", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Script to download Code School videos.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
281391
3926