fiso64 / slsk-batchdl

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

--skip-existing downloads a variant of the same track (YouTube playlist) #6

Closed rad0jica closed 11 months ago

rad0jica commented 1 year ago

Many thanks for the build, really great.

When loading a YouTube playlist I'm having an issue where , when --skip-existing flag is added, a search is still carried out for tracks that exist in the output folder (i.e have been downloaded before when the playlist was last loaded).

A new file will be found, with a variation on the original title, and downloaded:

What I've tried

Am I missing something in the config? Does --skip-existing apply only to .csv input?

Thanks in advance

rad0jica commented 1 year ago

Works as expected when using a .csv input 👍

Does the flag only apply to .csv? Happy to close if so.

fiso64 commented 1 year ago

--skip-existing should work for any input. By default it will ignore existing tracks if they don't meet your "necessary" conditions. Does it work with --skip-mode "name"? Provide an example of a track (youtube/spotify url if you're using these) and the name of the file in the output folder you expect to be detected as that track.

rad0jica commented 1 year ago

Thanks for the response. Yesterday I was testing the functionality using a test playlist containing a single (link to track), and it might be that this single track is the issue.

As I'm now using a test playlist with three tracks (link to playlist) and the other two tracks are being correctly picked up as existing in the output folder once downloaded, where as the problem track does download twice.

The first instance downloads as Paul Woolford - Untitled, then, when the playlist is loaded again, a second instance is downloaded as Paul Woolford - Untitled [HFT030]. I would expect the first file name to be picked up — but as I say this issue might be unique to this particular track.

I'll test with a larger playlist to see to what extent the problem occurs elsewhere 👍

fiso64 commented 1 year ago

Yes, the file is redownloaded because the youtube title includes the catalog number [HFT030] and the downloaded file name does not.

I have released a new version that ignores text enclosed in square brackets when checking if a file already exists. There is also a new option --remove-brackets which will remove any text enclosed in square brackets before searching (good files don't usually contain catalog numbers in the name, although the ones that do will still be found with that option).