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

Last refresh time per group? #93

Open
bernard01 opened this issue Sep 5, 2021 · 1 comment
Open

Last refresh time per group? #93

bernard01 opened this issue Sep 5, 2021 · 1 comment

Comments

@bernard01
Copy link

I know it might be a bit tricky to do this. And I don't really know how it is supposed to work at present. So I am just writing what I thought would be ideal, based on my use case as follows:

I use a large group with hundreds of videos that I can afford to refresh only every two hours because of quota and volume.

Then I use a small group that contains only a single video that I am actively watching. This one I want to refresh every 15 minutes or so.

I would expect that the time since last refresh is stored per group so I know when the 2 hours of the large group are over, when I switch from the small group to the large group. I think at present, the system does not do that, because in the large group I see the time since last refresh of the small group. I am assuming that the system cannot know whether any videos in the large group need refreshing from refreshing only the small group. I might be wrong there.

Thanks for making YCS.

@mattwright324
Copy link
Owner

mattwright324 commented Sep 5, 2021

How it works currently probably isn't the best way to do it though I am storing the last time a group item was refreshed and am using that to determine when a group was last refreshed by the most recent date on the group items in its list. So if you have two groups and they share an item (channel, playlist, video) if you refresh one it will change the date on the other too.

SELECT MAX(last_checked) AS checked FROM gitem_list
JOIN group_gitem USING (gitem_id)
WHERE group_id = ?;

It could make more sense to store a last_refreshed column on the groups table and/or display the last checked on each of the items in the group item list.

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

No branches or pull requests

2 participants