Skip to content

Commit

Permalink
v4.0.1
Browse files Browse the repository at this point in the history
 - Fixed video's to be in the correct order when downloading
 - Fixed invalidLogin's not being handled with the new API
  • Loading branch information
INSANITY\Inrix authored and INSANITY\Inrix committed Jun 9, 2018
1 parent 95ed430 commit cb33371
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
15 changes: 5 additions & 10 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v4.0.1
- Fixed video's to be in the correct order when downloading
- Fixed invalidLogin's not being handled with the new API


v4.0.0
- Updated cookies for normal login
- Added login functionality for Floatplane.com
Expand All @@ -12,16 +17,6 @@ v4.0.0
- Updated maxVideos to work with any number
- Updated posters
- Rewrote subChannel detection code
- Removed subChannelIgnore from settings.json
- Updated episode counting
- Added MOAR colours
- Removed youtube support (For videos on the form that were from youtube)
- Checked support for other Floatplane Creators
- Fixed spacing for downloading videos
- Updated printouts for downloads
- Updated ffmpeg error printouts
- Added checkForNewSubscriptions in settings.json
- Added Tech Deals artwork

v3.8.3
- Set default user-agent to identify script
Expand Down
8 changes: 4 additions & 4 deletions float.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const spawn = require('child_process').spawn;
const AdmZip = require('adm-zip');

process.on('uncaughtException', function(err) { // "Nice" Error handling, will obscure unknown errors, remove or comment for full debugging
if (err == "TypeError: Cannot read property '0' of undefined") { // If this error
console.log('\u001b[41mERROR> Using old session data is failing! Please set forceLogin to true in settings.json\u001b[0m') // Then print out what the user should do
if (err == "TypeError: JSON.parse(...).reverse is not a function") { // If this error
console.log('\u001b[41mERROR> Failed to login please check your login credentials!\u001b[0m') // Then print out what the user should do
} if (err == "ReferenceError: thisChannel is not defined") {
console.log('\u001b[41mERROR> Error with "maxVideos"! Please set "maxVideos" to something other than '+settings.maxVideos+' in settings.json\u001b[0m')
} if(err.toString().indexOf('Unexpected end of JSON input') > -1 && err.toString().indexOf('partial.json') > -1) { // If this error and the error is related to this file
Expand Down Expand Up @@ -384,7 +384,7 @@ function parseKey() { // Get the key used to download videos
Cookie: settings.cookie,
}
}, function (err, resp, body) {
if (body.includes('</html>')) { // Check if key is invalid
if (JSON.parse(body).message == "You must be logged-in to access this resource.") { // Check if key is invalid
console.log('\u001b[31mInvalid Key! Attempting to re-authenticate...\u001b[0m');
settings.cookies.__cfduid = ''
// If its invalid check authentication again, reconstruct the cookies and then try parsekey again if that goes through then resolve
Expand Down Expand Up @@ -415,7 +415,7 @@ function getVideos() {
} else { // Otherwise just log it normally
console.log('\n\n=== \u001b[38;5;8m'+subscription.title+'\u001b[0m ===')
}
JSON.parse(body).forEach(function(video, i) {
JSON.parse(body).reverse().forEach(function(video, i) {
if (i+(page*20) >= settings.maxVideos) { // Break on max videos parsed
return false
}
Expand Down
Binary file added releases/4.0.1.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "4.0.0",
"version": "4.0.1",
"videoFolder": "./videos/",
"maxVideos": 5,
"maxParallelDownloads": -1,
Expand Down

0 comments on commit cb33371

Please sign in to comment.