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

Sort videos (inside channels and playlists) by views and dates #7729

Open
3 tasks done
zolagonano opened this issue Jan 31, 2022 · 11 comments
Open
3 tasks done

Sort videos (inside channels and playlists) by views and dates #7729

zolagonano opened this issue Jan 31, 2022 · 11 comments
Labels
channel Anything to do with creator channels in the app feature request Issue is related to a feature in the app multiservice Issues related to multiple services playlist Anything to do with playlists in the app requires extractor change This issue requires a change to the extractor

Comments

@zolagonano
Copy link

zolagonano commented Jan 31, 2022

Checklist

What feature do you want?

I want to have an option for sorting videos by their dates or views.

Why do you want this feature?

Because scrolling down and finding the oldest video or most popular video is frustrating (especially if the channel/playlist has lots of videos).

@zolagonano zolagonano added the feature request Issue is related to a feature in the app label Jan 31, 2022
@litetex litetex changed the title Sort videos (inside channels and playlists) by views and dates. Sort videos (inside channels and playlists) by views and dates Mar 7, 2022
@Jel19
Copy link

Jel19 commented Jun 20, 2022

Just my 2 cents. I love the app. As a user, the issue I experience most... which is, literally, every time I search for videos through any means (text search, what's new, etc), is the returned video list is not sorted by descending date order. This order might be the most logical default to use.

@opusforlife2
Copy link
Collaborator

This order might be the most logical default to use.

The default order on all mainstream sites is to sort by relevance. The only examples of default sorting by date I know are indie/small platforms that are in beta or an in-development state.

@Jel19
Copy link

Jel19 commented Jun 27, 2022

The default order on all mainstream sites is to sort by relevance.

Ok, I assumed the user's search inputs provided relevance. Even still, having the results date sorted is very useful as it allows user's to quickly assess applicability/relevance based on video age. Product review searches (e.g car road test,etc.) provide a ready example of when a date ordered result list would be helpful.

@AudricV AudricV added requires extractor change This issue requires a change to the extractor multiservice Issues related to multiple services labels Jun 27, 2022
@AudricV
Copy link
Member

AudricV commented Jul 26, 2022

I started a while ago an implementation, but I am not sure of what I did in terms of code model. I feel that the current implementation is a bit strange (using strings for sort filters).

If you want to go ahead (I don't work on this for now, but on something else, that's not my priority for now), you can go ahead, especially because I am not able do the app implementation due to the lack of knowledge I have in Android specific development.

Here are some tips to help you:

  • for the extractor implementation:
    • this is controlled currently by LinkHandlers and LinkHandlerFactor[ies]. You will have to add support on LinkHandlerFactor[ies] of services and probably makes changes on ChannelInfos to allow passing sort filters (they are currently using string arrays, but free feel to change this (by instance to a list instead if you think keeping strings is a good idea). For more details about how this works, take a look at our documentation;

    • for YouTube channels (there is no way to sort playlists):

      • here are the protobuf parameters values you need to use in the browse requests of the InnerTube API:
        • sort by newest (default), which is current behavior: EgZ2aWRlb3M%3D
        • sort by oldest: EgZ2aWRlb3MYAiAAMAE%3D
        • sort by views: EgZ2aWRlb3MYASAAMAE%3D

      (edit: with the new layout, filters are using continuations, making sorting harder. Sort by oldest option is also removed)

    • for PeerTube accounts and channels, take a look at the API documentation: there are more possibilities than on YouTube;

    • for MediaCCC conferences: sorting videos in not supported by the API, but only on HTML pages. Because we only use the API, you would have nothing to touch (unless I missed something, but I am pretty sure that's not the case);

    • for SoundCloud users: you can popular tracks by quering the toptracks endpoint of SoundCloud's internal API, the current sort is the one of the tracks tab (tracks endpoint) (by newest);

    • for Bandcamp users: there is no ability to sort tracks uploaded by a user.

  • for the app implementation:
    • you will need to do some changes in ChannelFragment, in its view XML files, add string resources and maybe more.

If you need additional help, don't hesitate to join our IRC channel to ask questions!

@amduae

This comment was marked as resolved.

@opusforlife2

This comment was marked as resolved.

@opusforlife2 opusforlife2 added playlist Anything to do with playlists in the app channel Anything to do with creator channels in the app labels Oct 24, 2022
@dimyself

This comment was marked as off-topic.

@jcperil

This comment was marked as off-topic.

@rsmyst

This comment was marked as duplicate.

@heinrichat
Copy link

heinrichat commented Oct 11, 2023

If possible give the option show the videos inside a bookmarked playlist in original order (date when video was added) and reverse. I have a "watch later" list with almost 900 videos in them. When I want a recently added video, I have to scroll past 899 videos to get to the 900-st video. A simple switch would allow to show the recently added videos on the top.

I don't know if this is the same issue #9676 . What date? Date of video creation? Or Date of when the video was added to the playlist?

@oren-evron

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
channel Anything to do with creator channels in the app feature request Issue is related to a feature in the app multiservice Issues related to multiple services playlist Anything to do with playlists in the app requires extractor change This issue requires a change to the extractor
Projects
None yet
Development

No branches or pull requests

10 participants