mirror of
https://github.com/Googolplexed0/zotify.git
synced 2026-04-25 06:15:55 +03:00
[GH-ISSUE #23] Filter album types #21
Labels
No labels
bug
considering
discussion
documentation
enhancement
enhancement
good first issue
help wanted
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/zotify#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @U2EZNeko on GitHub (Jun 13, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/23
Originally assigned to: @Googolplexed0 on GitHub.
When i grab a whole discography, especially of older artists, I end up with like 30 Live albums or compilations.
Is it possible to filter out specific album types?
@Googolplexed0 commented on GitHub (Jun 15, 2025):
I will look into this, could be a nice config flag. It will mostly depend on if the API stores some kind of LIVE album flag like they do for COMPILATION albums. Not really comfortable skipping albums using a song title regex due to very easy false positives no matter what/how a specific filter is implemented.
@U2EZNeko commented on GitHub (Jun 15, 2025):
Very much appreciated. Even skipping compilations would avoid so many duplicate tracks.
Maybe a config option for user-filters?
I wouldn't mind the occasional missing album if I can set Live at*, Live from* or something similar would be neat.
@Googolplexed0 commented on GitHub (Jun 16, 2025):
NO_COMPILATION_ALBUMS config option added with
0afa82785f, not sure how frequently the API actually uses the"album_type" = "compilation"flag though.User regex filters is something that I actually think would be a really good idea, though it would be very powerful. I'll experiment with that now.
@Googolplexed0 commented on GitHub (Jun 16, 2025):
@U2EZNeko, please check out the new branch user-regex-filters (via 3878a4e). User Regex filters are only implemented for albums right now, but it should be very easy to expand to all other items. I also included a simple example Regex for filtering out live performances in the
READMEin theExample Regex Valuessection.EDIT: Expanded functionality to tracks and podcast episodes, don't see much value in adding it for playlists or artists.
Give the branch a beta test and let me know if you find any issues.
@U2EZNeko commented on GitHub (Jun 16, 2025):
I'd love to but im running into some rather noob-ish issues.
pipx install git+https://github.com/Googolplexed0/zotify.git@user-regex-filters
doesnt seem to work, how exactly do I install the specific branch with pipx if I may ask?
@Googolplexed0 commented on GitHub (Jun 16, 2025):
Not your fault, I used an invalid version number (it had letters). Fixed with ea3f62adc795aa269094fa121a64de4215715cf6, the pipx install should work now.
@U2EZNeko commented on GitHub (Jun 17, 2025):
Pull worked this time.
Using your regex example for now.
I've got my script running, we'll see if it worked tomorrow when the downloads are finished.
On a side note because i couldn't find it in the readme.
Can I set multiple patterns? Whats the delimiter for the config file?
@Googolplexed0 commented on GitHub (Jun 17, 2025):
There is no explicit delimiter for multiple regexes, however, you can add multiple patterns into a single regex by chaining the "or" construction (
|) :(:?<first pattern here>)|(:?<second pattern here>)|(:?<third pattern here>). It can also be recursively stacked, as seen in the Live Performances example.@U2EZNeko commented on GitHub (Jun 17, 2025):
I ended up using this:
(?:(|[|{)[Ll]ive.?(?:)|]|})|[Cc]ommentary|[Rr]e-?master|(?:[Ss]potify|[Rr]adio|[Pp]aramour)\s[Ss]ession|(?:[Ll]ive\s(?:[Ff]rom|[Aa]t|[Ii]n))\s\S
Working fine so far.
EDIT: Pasted old regex
@Googolplexed0 commented on GitHub (Jun 17, 2025):
If all seems well, then I'll close the issue and start merging the branch into main (just FYI, the regex matches are case-insensitive, so you don't need to account for that if you want to make your pattern more readable).