-
Notifications
You must be signed in to change notification settings - Fork 884
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
[Feature] Playlist: Sort videos by published date #6280
[Feature] Playlist: Sort videos by published date #6280
Conversation
Head branch was pushed to by a user without write access
@efb4f5ff-1298-471a-8973-3d47447115dc Yes, minutes or hours are fine. However, I checked the existing list view in terms of formatting, and it turned that upcoming events formatted as date and time. I did the same: |
This is probably out of scope of this PR but im going to mention it anyway. This was an upcoming video but i fetched it through my subscription page using RSS (see #3356 for more info on that) therefore it saved an incorrect publish date. The video is live now so i tried going to the video in the hope that the publish date would get updated in the playlist but it didnt. VirtualBoxVM_OSIA7fnKU9.mp4 |
@efb4f5ff-1298-471a-8973-3d47447115dc Yeah, this is a little out of scope of a simple sorting options. With regular videos (which is most cases I believe) dates work fine though... |
Everything lgtm, i sign off when @absidue does |
A few observations on the dates issue... There is a sort of mix of the "premiere" and "published" date definition in the list view (see ft-list-video.js:710-721). "publish" can become "premiere" in certain cases. One more limitation is that when you playlist a video AFAIK it actually stores it's metadata as of current moment (see ft-list-video.js:820-832), so it won't update over the time, unlike in RSS feed when each time you receive fresh metadata. |
I haven't reviewed this fully but I've noticed that instead of using the existing premiereDate or premiereTimestamp fields, this pull request does its own thing, could you please use one of the existing two properties instead. |
@efb4f5ff-1298-471a-8973-3d47447115dc That is expected we never update data in the playlists after they have been added, you are thinking of the watch history. |
Head branch was pushed to by a user without write access
Alright, I've simplified code a little by reusing the existing |
Non-blocking: I just want to point out that if we ever add support for importing the playlists from Google Takeout exports, the method we would be using to get the information would not provide the published dates (wouldn't have been a problem before this pull request as FreeTube didn't save them itself). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work on this!
concern/chore: This PR is correctly staying consistent with how we've done it in 1 or 2 other cases, but the sorting logic for when the datum isn't present for a video is debatable. If you prefer to sort by oldest, the videos missing the necessary field pollute the top presented videos.
The top alternative in my mind would be to sort the videos with the missing field at the bottom of both sort orders, thus keeping both tops clean. The main problem with that, though, is that it makes the discoverability of those missing-datum videos very poor. This isn't relevant for anything needed to be done in this PR, though, just thinking out loud.
* development: (75 commits) Bump lefthook from 1.10.0 to 1.10.1 (FreeTubeApp#6480) Bump bgutils-js from 3.1.0 to 3.1.1 (FreeTubeApp#6482) Translated using Weblate (Estonian) Translated using Weblate (Serbian) Translated using Weblate (Polish) Translated using Weblate (Czech) Translated using Weblate (English (United Kingdom)) Translated using Weblate (Hungarian) Translated using Weblate (Hungarian) Translated using Weblate (German) Translated using Weblate (Italian) Translated using Weblate (French) Translated using Weblate (Chinese (Simplified Han script)) FtRadioButton and FtCheckboxList v-model and composition API (FreeTubeApp#6463) Disable store strict mode, due to performance problems because of the amount of data in the store (FreeTubeApp#6469) [Feature] Playlist: Sort videos by published date (FreeTubeApp#6280) Migrate ChannelAbout to the composition API (FreeTubeApp#6470) Translated using Weblate (German) compress frappe svgs (FreeTubeApp#6467) Translated using Weblate (Hungarian) ...
Playlist: Sort videos by published date
Pull Request Type
Related issue
closes #6223
Description
Add new video order options in user playlists:
Screenshots
Testing
The following scenarios tested:
Side effects:
published = 0
).Desktop
Additional context
N/A