fiso64 / slsk-batchdl

A batch downloader for Soulseek
GNU General Public License v3.0
216 stars 16 forks source link

Readme example sldl.conf crashes with incorrect handling of fast-search arg #37

Closed alexthewizard closed 4 months ago

alexthewizard commented 4 months ago

Platform: MacOS Intel X64

When I provide sldl with a sldl.conf file in the same directory with the following contents:

username="XYZ"
password="XYZ"
pref-format="flac"
fast-search="true"

I get the following error when I run ./sldl spotify-likes:

Unhandled exception. System.ArgumentException: Invalid argument 'spotify-likes'. Input is already set to 'true'
   at Program.Main(String[] args)
   at Program.<Main>(String[] args)

After some debugging locally this seems to happen because the "true" value from the fast-search argument is being treated as its own argument, which fails to hit anything in the arg parse case statement

I was able to fix this error by changing my fast-search line in my sldl.conf file to

fast-search

i.e no ="true"

I'm not sure whether you'd rather handle booleans differently or just update your Readme but thought I'd leave my investigation here for you to do what you need with it!

fiso64 commented 4 months ago

Thanks. Fixed

MCMXD commented 4 months ago

This is also happening with skip-existing="true" when running ./sldl spotify-likes

with .conf username= password= pref-format="mp3" name-format="{title( - )artist|filename}"
path= spotify-id= spotify-secret= skip-existing="true"

fiso64 commented 4 months ago

That shouldn't happen in the newest version anymore. I can't reproduce it with your config. Are you using the latest release?