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

please add filters to search functionality #110

Closed
doodhout opened this issue Dec 7, 2015 · 37 comments
Closed

please add filters to search functionality #110

doodhout opened this issue Dec 7, 2015 · 37 comments
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface requires extractor change This issue requires a change to the extractor

Comments

@doodhout
Copy link

doodhout commented Dec 7, 2015

Sometimes when I want to look for the latest (new) videos of a ongoing vlog series (e.g. Equals Three) I want the search results ordered by date.

I know that this problem will be solved when you implement the possibility to view and search in channel playlists, but I'd like the power to adjust the search results nonetheless.

Currently the results that are displayed use the default filter values, one of which is by order of relevance.

I suppose this isn't really hard to make; mostly adding extra arguments in the search() function in the file YoutubeSearchEngine.java, and a nice UI-component to let the user choose which filters he'd like to use, but I reckon it's not the smallest job ever to be done, especially if you take the time to work out a nice UI solution for this - which isn't easy.

Since I have a rough vision on how to do this, maybe I will be able to find the time during the christmas holidays to do it myself and submit a pull request.

@gregarkhipov
Copy link
Contributor

We could add filter button right next to the search bar which will pop out dropdown menu with options just like on YouTube site.
But considering device size, we can make this menu scrollable and use spinners instead of listing all options where it's possible (for instance, upload date and type).

@theScrabi theScrabi added the feature request Issue is related to a feature in the app label Dec 8, 2015
@theScrabi
Copy link
Member

Hm consider a NavigationDrawer. It's cleaner, and its also just a mater of time until this is finally coming.

@doodhout
Copy link
Author

The search function is still annoying to use if you search for the latest video in an existing series, since I (at least think that I) still cannot have the search results in chronological order.

Is there any view on whether this is a feature that is being considered?

@theScrabi
Copy link
Member

theScrabi commented Jun 23, 2016

You'd have to aplay filters on the result, which wouldn't be that complicated, but id like to focus on rather more importand features first. So unless someone else implements this it's not going to come soon.

@doodhout
Copy link
Author

doodhout commented Jun 23, 2016

Why wouldn't this be important? (I understand that this is subjective, of course) If I use the search feature in NewPipe, it will give me results in whatever order of importance YouTube deems fit, but that is far from always the best order.

Especially for youtube series (like Equals Three or any poster that regularly posts new videos in the same series or playlist), you get search results where the videos aren't ranked chronologically, so it's almost impossible to know if there is any new video you haven't watched yet. It's stupid that I have to use another client (or the website) first to actually know what to look for, because the search feature in NewPipe cannot find it for me.

Anyway, I might be able to take this up. I'll bother you with a pull request sooner or later. ;-)

@bagelcake
Copy link

bagelcake commented Sep 21, 2017

Any ETA on this @doodhout?

I too believe this is a very necessary feature. I usually search YouTube for the latest uploads and having the ability to sort by upload date (or however else including perhaps duration length) is crucial. Until then, I can't really use what would otherwise be a perfect replacement.

I can't offer help with this but if you need Photoshopping, let me know. Thanks.

@doodhout
Copy link
Author

You caught me with my pants down - I haven't picked this up yet. It's been a busy year, but I'm not here to make excuses.

I'll try and actually get things done. If and when I start, I suppose the ETA is... soon.

Tbc...

@doodhout
Copy link
Author

doodhout commented Sep 29, 2017

@theScrabi @mauriciocolli

I've cloned the repos locally and started some investigation.

Turns out the relevant bits to this problem are located in YoutubeSearchEngine in the project NewPipeExtractor:

        String url = "https://www.youtube.com/results"
                + "?q=" + URLEncoder.encode(query, CHARSET_UTF_8)
                + "&page=" + Integer.toString(page + 1);

        switch (filter) {
            case STREAM:
                url += "&sp=EgIQAVAU";
                break;
            case CHANNEL:
                url += "&sp=EgIQAlAU"; //EgIQA( lowercase L )AU
                break;
            case PLAYLIST:
                url += "&sp=EgIQA1AU"; //EgIQA( one )AU
                break;
            case ANY:
                // Don't append any parameter to search for everything
            default:
                break;
        }

The problem with the current situation is that Youtube sort of "combines" those filters into a single and seemingly random variable value, behind which I cannot see the logic.

For example:

  • only filtering by type video: sp=EgIQAVAU
  • only filtering by type channel: sp=EgIQAlAU
  • only filtering by type playlist: sp=EgIQA1AU
  • only filtering by type film: sp=EgIQBFAU
  • only filtering by type programme: sp=EgIQBVAU
  • only sorting by relevance: sp=CABQFA%3D%3D
  • only sorting by date: sp=CAJQFA%3D%3D
  • only sorting by viewcount: sp=CANQFA%3D%3D
  • only sorting by rating: sp=CAFQFA%3D%3D
  • sorting by date and filtering by type video: sp=CAASAhABUBQ%3D
    ...etc

This massive collection of all possible combinations without knowing how to generate such a value ourselves is causing this to be cumbersome and boilerplate. It can be done, of course, but it's not pretty.

Can anyone pitch in with a bright idea to tackle this?

P.S. I searched around a bit and found that the old parameter called "search_sort" still works (for now) AND works in conjunction with the new type filter parameters, so only implementing sort order using this old parameter promises to be much, much simpler.

P.P.S. Should I move this comment to a(n upcoming) Pull Request to keep it all together in one thread?

@theScrabi
Copy link
Member

Do you really want to combine those? Have you ever done that? I mean I barely use those, and wen I do I use only one at a time. What do you think.

@bagelcake
Copy link

@doodhout Thanks for all your work, I really appreciate this especially when it gets implemented. For now I've been using search commands as a workaround. For example, to sort by upload date, I do "movie trailers, new" and so far it's been an okay workaround. Sometimes I lose the position by scrolling too far down and have to redo the search again.

@stale
Copy link

stale bot commented Dec 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 1, 2018
@doodhout
Copy link
Author

doodhout commented Dec 4, 2018

I realise I have been leaving this hanging for quite a while.

Since I now work around this problem by using (other people's) playlists (because that's more or less what I tried achieving using the search function), I don't think I really need this that hard.

Are there any takers or will this be left to die? Anything is fine for me.

@Bluesir9
Copy link

Bluesir9 commented Dec 4, 2018

@doodhout I have implemented this functionality in NewPipeExtractor here. So rest assured it will be out soon :)

@doodhout
Copy link
Author

Excellent work, @Bluesir9!

@360fun
Copy link

360fun commented Sep 30, 2020

I love NewPipe, but I always felt missing the ability to order/filter search results: this is a very needed function! 🙏

FreeTube has also implemented it:
image

@ghost
Copy link

ghost commented Dec 25, 2020

@Stypox this feature request is open since 5 years, another 5 and we'll can celebrating its birthday ahahaha.

Seriously...isn't better close these kind of requests, instead leaving them open to rot into oblivion?

I also notice a series of other similar requests opened and stacked up here, meanwhile other less important features are integrated almost immediately.

🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️

@tastytea
Copy link

@Oizaro Why? The series of similar requests prove that a lot of people want that feature. Maybe tomorrow someone is bored, notices this issue and implements it.

@ghost
Copy link

ghost commented Dec 25, 2020

@Oizaro Why? The series of similar requests prove that a lot of people want that feature. Maybe tomorrow someone is bored, notices this issue and implements it.

So we get new features, just because "someone is bored"? 🤣🤣🤣

@tastytea
Copy link

So we get new features, just because "someone is bored"?

We get features because someone who can code and has the time wants to implement them (for a variety of reasons, being bored is just an example). I'm sure you can also pay someone to implement a specific feature.

@ghost
Copy link

ghost commented Dec 25, 2020

So we get new features, just because "someone is bored"?

...I'm sure you can also pay someone to implement a specific feature.

The choice in this sense is wide and includes even easier solutions (without giving examples, I think it is already clear).

I just find very unusual that a creator always prefer to leave the task of implementing new features to others, rather to follow a own roadmap (when there's time to do it).

At this point it would be better if the app were paid rather than open source.

@MD77MD
Copy link

MD77MD commented Dec 29, 2020

@Stypox this feature request is open since 5 years, another 5 and we'll can celebrating its birthday ahahaha.

Seriously...isn't better close these kind of requests, instead leaving them open to rot into oblivion?

I also notice a series of other similar requests opened and stacked up here, meanwhile other less important features are integrated almost immediately.

🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️🤷‍♂️

exactly!! I've raised this issue before with them but nothing.

its sad to see newPipe turn into thier learning guinea pig...

this also tells me that they are probably using the YouTube app (like many of us are forced to do) otherwise how could you search for anything among the other necessary but neglected features.

that's why paid apps will always when.

just sad 🙁

@christianfl
Copy link

Just pay someone to develop this feature then.

@fairking
Copy link

fairking commented Jan 6, 2021

Just really disappointing having to go to the actual youtube to search and filter by last month/year. Please make this feature.
Everything else is very good job guys. 👍

@MichiFr
Copy link

MichiFr commented Jan 16, 2021

Me too was searching for this useful YT feature in NewPipe, since I've found this app on internet. However, the lack of sorting or filtering keeps me away from this app because I don't want to have 5 yrs old vids in my search result which are absolutely not relevant anymore.

Of course, if there are no volunteers to implement those lines of code this into the app, we won't see it anytime soo.
But as far as I've understood , someone has already done the work for us, see Bluesir9's message from 4 th Dec 2018! Or am I wrong?

@sebma
Copy link

sebma commented Jun 30, 2021

@MichiFr No, you're not wrong. And for convenience, here's the link to Bluesir9's message from 4 th Dec 2018.

@MichiFr
Copy link

MichiFr commented Jun 30, 2021

So, this leaves the question: why can't I see this option in current release?
Wasn't it merged into the main branch so far? Any reasons for this?

@christianfl
Copy link

Because you seem to confound the Newpipe extractor with the app itself. As there is support in the extractor, there is "just" the frontend support missing for adding some basic filters.

@MichiFr
Copy link

MichiFr commented Jun 30, 2021

Ah, thanks for clarification!

As I understand now, basically the main part is done in the extractor itself, the UI is missing the options to use the filters...

@opusforlife2
Copy link
Collaborator

Nope. That PR was not merged. It was closed without merging. So there is nothing yet in either Newpipe or the Extractor.

@litetex
Copy link
Member

litetex commented Oct 17, 2021

Duplicate of #2251

@litetex litetex marked this as a duplicate of #2251 Oct 17, 2021
@litetex
Copy link
Member

litetex commented Oct 20, 2021

Closing as duplicate.

Please use #2251 as it's more up-to-date.
Also maybe give it a up-vote if you want 😉

@litetex litetex closed this as completed Oct 20, 2021
@sebma
Copy link

sebma commented Oct 20, 2021

@litetex How come an older issue (#110) be marked as a duplicate of a newer issue (#2251), shouldn't it be the opposite ?

@litetex
Copy link
Member

litetex commented Oct 21, 2021

Please use #2251 as it's more up-to-date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issue is related to a feature in the app GUI Issue is related to the graphical user interface requires extractor change This issue requires a change to the extractor
Projects
None yet
Development

No branches or pull requests