-
Notifications
You must be signed in to change notification settings - Fork 86
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
Catch-up videos aired on the same day are not sorted correctly #302
Comments
Thank you very munch for this complete bug report! |
Commit 49836de should fix your issue. This commit will be available in 0.2.22~beta04, can you try this modification to confirm or not that this is what you want? Thank you 😉 |
I confirm it works, thanks! I don't understand how it works though :) You use |
Yes it works thanks to the Unsorted method. Unfortunately, we can’t specify time for video date. Only the day 😕 |
Ok now I understand. |
Describe the bug
When several episodes of the same show were aired on the same day, the catch-up TV episodes are sorted in the wrong order. This use case is pretty uncommon so I don't know if it occurs for several channels but at least I encountered the bug on France 2.
To Reproduce
Steps to reproduce the behavior:
Go in Replay TV -> France -> France 2 -> Jeux & Divertissements -> N'oubliez pas les paroles -> Replay. For each day there are 2 episodes.
Expected behavior
When sorting by date, the order follows the original aired date and time.
Actual behavior
When sorting by date, the first episode listed is always the one that was aired last.
Your environment
Android
iOS
Linux
OSX
Raspberry-Pi
Windows
Other
Operating system version/name: OSMC
Kodi version: Kodi Leia v18.3
Catch-up TV & More version: 0.2.20
Installation method: Catch-up TV & More repo
Additional context
I wanted to submit a pull request to fix the issue but I was not able to find a solution...
Here is what I have found:
I think the issue comes from this line: the date saved in
item.info.date
contains only the date and the time is stripped.Actually it was probably done like this because it seems Kodi does not support a date which includes time as per the documentation.
I think
item.info.date
is provided by CodeQuick and since I am not familiar with this library I can't tell if it offers a way to deal with this issue.Maybe a solution then would be to retrieve the list of videos with the sort criteria
begin_date:asc
instead ofbegin_date:desc
to ensure the video that was aired first is also processed first. I was not able to make it work though (I don't know if it is because "asc" is a wrong value or because the sorting simply does not work) so I cannot tell if it is bad idea :)And one improvement idea: maybe it would be better to use
video['content_has_medias'][0]['media']['begin_date']
for the date rather thanvideo['first_publication_date']
to ensure the date used is the actual aired date (in case the video is not published the same day as it was aired for instance).The text was updated successfully, but these errors were encountered: