Elijas / auto-youtube-subscription-playlist-2

Script automatically adds videos to playlists from Youtube channels and/or subscriptions (Youtube Collections alternative).
MIT License
248 stars 54 forks source link

Correct number of videos added. #45

Closed JesperDramsch closed 4 years ago

JesperDramsch commented 4 years ago

Changed the log to include the total number of videos found and how many could be added.

victorjzsun commented 4 years ago

Looks good, (that was my original intention but it slipped my mind), except the Found videoIds.length videos is unnecessary since I log it on line 93

JesperDramsch commented 4 years ago

Oh! I did not make that connection.

victorjzsun commented 4 years ago

What do you think of changing

i -= j;
Logger.log("Added "+i+" videos to playlist. Error for "+j+" videos.")

to just

Logger.log("Added "+(videoIds.length - j)+" videos to playlist. Error for "+j+" videos.")

It's a bit clearer this way and i = videoIds.length anyways

victorjzsun commented 4 years ago

Also maybe change j to errorCount for clarity?

victorjzsun commented 4 years ago

Thanks for your help

JesperDramsch commented 4 years ago

Changing the variable is fine of course. I changed i, as I figured we might be able to use that later for successful additions, because you rightly pointed out it would be redundant with videoIds.length.