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

Show more than one day of "Soon offline" #388

Closed
dagwieers opened this issue Jul 16, 2019 · 7 comments · Fixed by #796
Closed

Show more than one day of "Soon offline" #388

dagwieers opened this issue Jul 16, 2019 · 7 comments · Fixed by #796
Labels
enhancement New feature or request
Milestone

Comments

@dagwieers
Copy link
Collaborator

dagwieers commented Jul 16, 2019

At the moment we only list what will go offline today because the query is by date.
It would be nice if it worked like Most recent and shows a list that extends beyond today.

Probably best to show what goes offline by date, i.e. page 1 shows today, page 2 shows tomorrow, page 3 shows the day after tomorrow. So that you have a good indication when a new day has started.

The typical More... button would then become Today (if you go back), Tomorrow, Thursday 2019-07-18, etc...

Alternatively, we could just have a continuous list like Most recent and insert placeholders stating --- Tomorrow ---, --- Thursday, 2019-07-18 ---

@dagwieers dagwieers added the enhancement New feature or request label Jul 16, 2019
@dagwieers dagwieers added this to the Future milestone Jul 16, 2019
@dagwieers dagwieers modified the milestones: Future, v2.3.0 Aug 16, 2019
@dagwieers dagwieers modified the milestones: v2.3.0, Future Aug 31, 2019
@dagwieers dagwieers added the help wanted Extra attention is needed label Sep 1, 2019
@mram65
Copy link

mram65 commented Jul 17, 2020

Personally, I think it would work best like "most recent."
I just checked this behavior, and it looks fine.
When you hover over an item (or select it), then you can see the remaining date/time on your left side.

@dagwieers
Copy link
Collaborator Author

@mram65 I agree, but the VRT NU API doesn't allow for this easily. You can only get a list of things that will disappear for a specific date AFAICT. Feel free to try this for yourself, because most of what we found was by playing around with options: https://github.com/add-ons/plugin.video.vrt.nu/wiki/VRT-NU-API

If we find a single API call that returns "soon offline" content by recent first we could integrate this easily, otherwise this requires calls, merging and keeping offsets for every page, which is quite messy and inefficient. (caching helps, but still...)

@mram65
Copy link

mram65 commented Jul 22, 2020

A continuous list like "most recent" just seemed like the best solution to me (because it is clearer in use).

But in any case, it's best to keep the implementation simple. And indeed, only use the functions of the API, even if the result looks different.

A split in one page per day, as initially explained, is then better.

@mediaminister
Copy link
Collaborator

mediaminister commented Jul 23, 2020

It's totally possible to have a continuous list. Requesting a list of all programs that will disappear the next seven days is easy and sorting this list in Python on the assetOffTime key ensures the list items are shown in the right order.

The difficulty is that the caching system uses separate files and requests to the VRT NU API for every page in the GUI. It would be easier to request the complete list in one go and cache this full list in one file and filter this list using indices in Python when the user requests a page.

@dagwieers Is there a good reason that the caching system uses separate files?

@dagwieers
Copy link
Collaborator Author

The caching system was originally designed for individual HTTP requests, and does not merge HTTP requests. The reason for this is that it is easier to keep track of cache invalidation.

@mediaminister Can you provide me with the HTTP request for e.g. the next seven days? I could not make this work, I could only make it work for a single day, which would require to either merge the output, or reprocess everything for building each new page.

@dagwieers
Copy link
Collaborator Author

@mediaminister Go for it, this works much better and probably fixes 95% of what people need.

@dagwieers dagwieers removed the help wanted Extra attention is needed label Jul 28, 2020
@dagwieers dagwieers modified the milestones: Future, v2.4.1 Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants