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

Update frequency and "findnextrow" clash #73

Closed JesperDramsch closed 4 years ago

JesperDramsch commented 4 years ago

Using findnextrow to set the minimum row in the spreadsheet will skip processing for all preceding rows. If the update frequency of the lower rows is lower than earlier rows, this leads earlier rows to be skipped.

What is the reason to use findnextrow instead of simply setting initial iRow to reservedTableRows to process all rows reliably?

victorjzsun commented 4 years ago

I added findnextrow for 2 use cases:

  1. You have lots of rows in the sheet, and it just so happens that checking all channels leads to a script timeout, leaving later rows to not be checked. By using findnextrow, the script can pick up where it left off and continue executing, assuming you run the script enough times.
  2. You introduce a new row to the script and want to load close to 200 videos from this row. If you try to run the script, it might pick up videos from rows executed first, and then hit the API quota.

By introducing update frequency, these cases should be covered:

  1. Use update frequency to spread rows across multiple calls, heavily reducing the chance of a script timeout.
  2. When you add a row and run the script, very few rows will be also be updated, since others will still be in cooldown.

Thus, I guess it does make sense to remove findnextrow.

JesperDramsch commented 4 years ago

I can do that when we finished work on the recursive PR in #72