Both the search and album commands ultimately use the album command to download albums by providing a slug but there was an inconsistency between them.
In short, the index saves URL paths eg /game-soundtrack/album/<slug> and passes the one matching a search result into the album command.
The album command receives a slug by itself though so due to this mismatch, only one of the commands was working.
This PR resolves the inconsistency by stripping input from the search command down to just a slug and then builds up the proper URL internally.
I would have just updated the index to store plain slugs but doing so would break any users on an earlier version of khinsider 2.x
Both the
search
andalbum
commands ultimately use thealbum
command to download albums by providing a slug but there was an inconsistency between them.In short, the index saves URL paths eg
/game-soundtrack/album/<slug>
and passes the one matching a search result into thealbum
command.The
album
command receives a slug by itself though so due to this mismatch, only one of the commands was working.This PR resolves the inconsistency by stripping input from the
search
command down to just a slug and then builds up the proper URL internally.I would have just updated the index to store plain slugs but doing so would break any users on an earlier version of
khinsider 2.x