Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update "Last Update (Timestamp)" Column Dynamically When Quota is Reached #127

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

davisjk
Copy link

@davisjk davisjk commented Mar 30, 2024

No description provided.

@davisjk davisjk changed the title WIP: Create New AddDays Column Create New "Max to Add (days)" Column Mar 31, 2024
@davisjk davisjk marked this pull request as ready for review March 31, 2024 01:11
@davisjk
Copy link
Author

davisjk commented Mar 31, 2024

This feature requires an update to Sheet1 in the doc in order to work. Here's my copy https://docs.google.com/spreadsheets/d/1PjrNcyTr03GPb0t5y0g9ZUsZrJIuFAJ0onB_P_AQMYc/edit?usp=sharing

not anymore

@davisjk davisjk marked this pull request as draft March 31, 2024 01:14
@davisjk davisjk marked this pull request as ready for review March 31, 2024 21:23
@davisjk davisjk marked this pull request as draft April 1, 2024 20:10
@davisjk davisjk changed the title Create New "Max to Add (days)" Column Update "Last Update (Timestamp)" Column Dynamically When Quota is Reached Apr 2, 2024
var playlistId = data[iRow][reservedColumnPlaylist];
if (!playlistId) continue;
if (!playlistId || playlistId.substring(0, 1) == "#")
Copy link
Author

@davisjk davisjk Apr 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ya I also added commenting out lines for playlists (column A) starting with # and would really love to keep this but it's a bit out of scope

@davisjk davisjk marked this pull request as ready for review April 15, 2024 02:36
@@ -41,7 +37,7 @@ If you ran into problems, here are some of the possible sources for solutions:
1. [Copy](http://bit.ly/subscriptionPlaylistsCopy) the Sheet to your Google Drive.
Afterwards you might want to update the script to the latest version of sheetScript.gs

2. Setup your playlists and channels (white cells in the Sheet):
1. Setup your playlists and channels (white cells in the Sheet):
- Clear all existing white rows, they are just examples (i.e. delete the 3 rows).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need a larger indent here, seems like it's resetting the ordered list count
image

if (nextTime && dateDiff <= nextTime) {
var lastDate = new Date(lastTimestamp);
var lastTime = lastDate.getTime();
var dateDiff = Date.now() - lastTime;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this, we can just subtract two date objects, aka new Date() - lastDate, and we don't need to create lastTime

@victorjzsun
Copy link
Collaborator

What if instead of catching the quota error everywhere, we pushed it to the top level. Since quota refreshes daily, there should be no need to continue the script if a single quota error is hit.

@victorjzsun
Copy link
Collaborator

If you can also show how you've tested these changes, it'll help me review much faster. Otherwise I'll need to test it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants