Skip to content

Custom website search#286

Merged
marin-m merged 9 commits intomarin-m:mainfrom
leandrotlz:custom_website_search
May 4, 2026
Merged

Custom website search#286
marin-m merged 9 commits intomarin-m:mainfrom
leandrotlz:custom_website_search

Conversation

@leandrotlz
Copy link
Copy Markdown
Contributor

Adds two Preferences for advanced users to choose a custom website for the song search.

Closes #241 with the following settings:

website_search_url = "https://musicbrainz.org/search?type=recording&method=indexed&query="
website_search_text = "Search on MusicBrainz"

Known issue: I can't figure out how to update the text in the context menu; I've never used GTK before. I'm opening this PR anyway because you may have a quick fix for that. Otherwise, changing the context menu text to something generic might do the trick.

@marin-m
Copy link
Copy Markdown
Owner

marin-m commented Apr 30, 2026

Hello!

Thank you for implementing this, I'm ok with adding the features,

I think that before merging a few things should be done in order to align the code logic over the other settings present in SongRec:

  • Default string values for the setting (the YouTube URL prefix, and the search provider button label i.e "Search on YouTube") should be present in the "Preferences" class as proper default values, rather than being hardcoded elsewhere
  • The settings should be configurable in the "Settings" window of SongRec using extra Adw.ExtraRow entries, ideally in a new, dedicated section of the settings window

Also I don't know whether it could be useful to parametrize more fields as advised in issue #241 (the track name and the artist name can currently be separated through splitting after the first " - " occurrence present in the CSV format field, #282 requests to change this but this may be later/in a separate PR, in the meantime the practice of splitting the string after the first dash is already used in current code) .

Please let me know if you wish to make the changes yourself, or if you prefer that I eventually implement these.

Regards,

@leandrotlz
Copy link
Copy Markdown
Contributor Author

When it comes to the UI, it will likely be a lot less painful for you to eventually implement the changes, since I'm not familiar with GTK.

I originally had done the name splitting into {artist} and {title} in order to match the URL posted in #241, but then I found that MusicBrainz allowed the same search using the combined string so it didn't seem worth it. Maybe later, if someone opens an issue mentioning a specific website that won't work unless they get separate tags.

@marin-m marin-m force-pushed the custom_website_search branch from 9306fca to 66b2127 Compare May 4, 2026 15:19
@marin-m marin-m marked this pull request as draft May 4, 2026 18:39
@marin-m marin-m marked this pull request as ready for review May 4, 2026 20:32
@marin-m
Copy link
Copy Markdown
Owner

marin-m commented May 4, 2026

Thanks for your contribution!

@marin-m marin-m merged commit a38cd65 into marin-m:main May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants