[GH-ISSUE #84] [Feature Request] Improve Search Filtering & Parameters #71

Closed
opened 2026-02-27 04:57:21 +03:00 by kerem · 9 comments
Owner

Originally created by @agenbite on GitHub (Sep 22, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/84

Originally assigned to: @Googolplexed0 on GitHub.

Related Problem/Issue
The search interface is useful, but if one knows that is looking for an album, it'd be nice to have a -sA flag which filters the output to leave only albums.

Ideal Solution
Ideally, there would be a --albums flag that would instruct zotify to ouput only albums after a search.

Considered Alternatives
The alternative today is to scroll up and look for the "Albums" section. Not a big deal, I agree, but still. ^^

Additional context
Search could actually be improved in other ways too: number of results, for instance.

Thanks for this fork!! <3

Originally created by @agenbite on GitHub (Sep 22, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/84 Originally assigned to: @Googolplexed0 on GitHub. **Related Problem/Issue** The search interface is useful, but if one knows that is looking for an album, it'd be nice to have a -sA flag which filters the output to leave only albums. **Ideal Solution** Ideally, there would be a --albums flag that would instruct zotify to ouput only albums after a search. **Considered Alternatives** The alternative today is to scroll up and look for the "Albums" section. Not a big deal, I agree, but still. ^^ **Additional context** Search could actually be improved in other ways too: number of results, for instance. Thanks for this fork!! <3
kerem 2026-02-27 04:57:21 +03:00
Author
Owner

@Googolplexed0 commented on GitHub (Oct 1, 2025):

Search could actually be improved in other ways too: number of results, for instance.

This has already been implemented (see #66).

Ideal Solution
Ideally, there would be a --albums flag that would instruct zotify to ouput only albums after a search.

Honestly, it would be a bit overly-verbose to add a new flag for each search filter. It would also be very confusing with the already-existing mode system, since -a means Followed Artists and would not be an alias for --albums like one might expect.

There already exists some level of search options/filter/specificity, but it seems poorly documented. I will do some investigation on what already exists, update the README with a new section, and then decide how to proceed from there.

<!-- gh-comment-id:3354414718 --> @Googolplexed0 commented on GitHub (Oct 1, 2025): > Search could actually be improved in other ways too: number of results, for instance. This has already been implemented (see #66). > **Ideal Solution** > Ideally, there would be a --albums flag that would instruct zotify to ouput only albums after a search. Honestly, it would be a bit overly-verbose to add a new flag for each search filter. It would also be very confusing with the already-existing mode system, since `-a` means Followed Artists and would not be an alias for `--albums` like one might expect. There already exists some level of search options/filter/specificity, but it seems poorly documented. I will do some investigation on what already exists, update the README with a new section, and then decide how to proceed from there.
Author
Owner

@agenbite commented on GitHub (Oct 1, 2025):

On 01/10/2025, 04:03, Googolplexed wrote:

Googolplexed0 left a comment (Googolplexed0/zotify#84)

Search could actually be improved in other ways too: number of results, for instance.

This has already been implemented (see #66).

Cool, thanks!

There already exists some level of search options/filter/specificity, but it seems poorly documented. I will do some investigation on what already exists, update the README with a new section, and then decide how to proceed from there.

Nice, I'll wait for that README update! :) Thanks again!

<!-- gh-comment-id:3355065644 --> @agenbite commented on GitHub (Oct 1, 2025): On 01/10/2025, 04:03, Googolplexed wrote: > Googolplexed0 left a comment (Googolplexed0/zotify#84) > >> Search could actually be improved in other ways too: number of results, for instance. > > This has already been implemented (see #66). > Cool, thanks! > There already exists some level of search options/filter/specificity, but it seems poorly documented. I will do some investigation on what already exists, update the README with a new section, and then decide how to proceed from there. > Nice, I'll wait for that README update! :) Thanks again!
Author
Owner

@Googolplexed0 commented on GitHub (Oct 9, 2025):

Updated README in 85d3acffc8. See the subsection Search Query Formatting for more details. I may want improve the filtering system later, but at least the current implementation is actually explained. I will close this issue for now but will reopen for discussion if I decide a rework is necessary.

<!-- gh-comment-id:3383970590 --> @Googolplexed0 commented on GitHub (Oct 9, 2025): Updated README in 85d3acffc834bd94302baca420c9cd5c45198d8f. See the subsection [`Search Query Formatting`](https://github.com/Googolplexed0/zotify/tree/efficient-api?tab=readme-ov-file#search-query-formatting) for more details. I may want improve the filtering system later, but at least the current implementation is actually explained. I will close this issue for now but will reopen for discussion if I decide a rework is necessary.
Author
Owner

@agenbite commented on GitHub (Oct 9, 2025):

Cooool! <3 If only I could try it... I've been bitten by #86... :(

EDIT: of course I can try this, since the filtering is previous to actually downloading. I did (after reinstalling), and I can't seem to make it work. I tried zotify -s wilco -t album and I still get the full listing with playlists and tracks and artists. Also tried -l 5 and it seems the -l flag collides with --liked. Am I doing it wrong?

<!-- gh-comment-id:3384196091 --> @agenbite commented on GitHub (Oct 9, 2025): Cooool! <3 If only I could try it... I've been bitten by #86... :( EDIT: of course I can try this, since the filtering is previous to actually downloading. I did (after reinstalling), and I can't seem to make it work. I tried `zotify -s wilco -t album` and I still get the full listing with playlists and tracks and artists. Also tried `-l 5` and it seems the `-l` flag collides with `--liked`. Am I doing it wrong?
Author
Owner

@Googolplexed0 commented on GitHub (Oct 18, 2025):

I did (after reinstalling), and I can't seem to make it work. I tried zotify -s wilco -t album and I still get the full listing with playlists and tracks and artists. Also tried -l 5 and it seems the -l flag collides with --liked. Am I doing it wrong?

I honestly don't remember if I tested it or not, and if I did, whether it worked. I mainly just read through the code and figured out how it parsed the search string. It didn't feel well-written to me. I can come back soon and give it another look.

<!-- gh-comment-id:3418371659 --> @Googolplexed0 commented on GitHub (Oct 18, 2025): > I did (after reinstalling), and I can't seem to make it work. I tried `zotify -s wilco -t album` and I still get the full listing with playlists and tracks and artists. Also tried `-l 5` and it seems the `-l` flag collides with `--liked`. Am I doing it wrong? I honestly don't remember if I tested it or not, and if I did, whether it worked. I mainly just read through the code and figured out how it parsed the search string. It didn't feel well-written to me. I can come back soon and give it another look.
Author
Owner

@Googolplexed0 commented on GitHub (Oct 19, 2025):

Completely rewrote the system for v0.10.21 and tested it myself. It now works and has a few extra features. There is a potential for more changes later but how it's written should make it easily extensible. Please leave a comment and reopen this issue if there is something you would like changed/improved.

<!-- gh-comment-id:3419504113 --> @Googolplexed0 commented on GitHub (Oct 19, 2025): Completely rewrote the system for v0.10.21 and tested it myself. It now works and has a few extra features. There is a potential for more changes later but how it's written should make it easily extensible. Please leave a comment and reopen this issue if there is something you would like changed/improved.
Author
Owner

@agenbite commented on GitHub (Oct 20, 2025):

Oh, nice!! However, I tried and the parsing of the arguments seems broken... If I try zotify -s whatever it works as expected, but if I try zotify -s whatever /t album I get an error ("zotify: error: argument urls: not allowed with argument -s/--search"). I also tried zotify whatever /t album and I get an empty response (zotify returns after login). Unfortunately, this empty response happens too with zotify whatever. :-?

<!-- gh-comment-id:3422645412 --> @agenbite commented on GitHub (Oct 20, 2025): Oh, nice!! However, I tried and the parsing of the arguments seems broken... If I try `zotify -s whatever` it works as expected, but if I try `zotify -s whatever /t album` I get an error ("zotify: error: argument urls: not allowed with argument -s/--search"). I also tried `zotify whatever /t album` and I get an empty response (zotify returns after login). Unfortunately, this empty response happens too with `zotify whatever`. :-?
Author
Owner

@Googolplexed0 commented on GitHub (Oct 28, 2025):

but if I try zotify -s whatever /t album I get an error ("zotify: error: argument urls: not allowed with argument -s/--search")

This definitely should not happen. I just fixed a bug where searches wouldn't display if you only queried one type of item. Update to v0.10.23 and double check that this should work now. :)

If I searched whatever /t album (before I just patched the bug), I got
### NO RESULTS FOUND - EXITING... ###, but not an error. What version of Python and the argparse package do you have installed?

<!-- gh-comment-id:3454421250 --> @Googolplexed0 commented on GitHub (Oct 28, 2025): > but if I try `zotify -s whatever /t album` I get an error ("zotify: error: argument urls: not allowed with argument -s/--search") This definitely should not happen. I just fixed a bug where searches wouldn't display if you only queried one type of item. Update to v0.10.23 and double check that this should work now. :) If I searched `whatever /t album` (before I just patched the bug), I got `### NO RESULTS FOUND - EXITING... ###`, but not an error. What version of Python and the argparse package do you have installed?
Author
Owner

@agenbite commented on GitHub (Oct 28, 2025):

I updated (with pipx install -f git+https://github.com/Googolplexed0/zotify.git@efficient-api) and I see no change, so something is odd. My python version is 3.13.8 and argparse's is 1.1. I'm on debian testing.

I tried deleting the executable and reinstalling, but I see no change. :-?

<!-- gh-comment-id:3455332320 --> @agenbite commented on GitHub (Oct 28, 2025): I updated (with `pipx install -f git+https://github.com/Googolplexed0/zotify.git@efficient-api`) and I see no change, so something is odd. My python version is 3.13.8 and argparse's is 1.1. I'm on debian testing. I tried deleting the executable and reinstalling, but I see no change. :-?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#71
No description provided.