diff --git a/README.md b/README.md
index 2477c2b..9bef7a9 100644
--- a/README.md
+++ b/README.md
@@ -311,6 +311,14 @@ will be ignored.
## Searching
+### Search Query
+The search query is determined as follows:
+
+- For album downloads: If the album field is non-empty, search for 'Artist Album'
+ Otherwise, search for 'Artist Title'
+- For all other download types: If the title field is non-empty, search for 'Artist Title'
+ Otherwise, search for 'Artist Album'
+
### Soulseek's rate limits
The server will ban you for 30 minutes if too many searches are performed within a short
timespan. The program has a search limiter which can be adjusted with --searches-per-time
@@ -492,13 +500,20 @@ sldl test.csv
```
-Download spotify likes while skipping songs that already exist in the output folder:
+Download spotify likes:
```
-sldl spotify-likes --skip-existing
+sldl spotify-likes
```
-Download from a youtube playlist with fallback to yt-dlp in case it is not found on soulseek, and retrieve deleted video titles from wayback machine:
+Download albums for every song in a spotify playlist:
+```
+sldl https://spotify/playlist/url --album --skip-existing
+```
+
+
+
+Retrieve deleted video names, then download from a youtube playlist with fallback to yt-dlp:
```
sldl "https://www.youtube.com/playlist?list=PLI_eFW8NAFzYAXZ5DrU6E6mQ_XfhaLBUX" --get-deleted --yt-dlp
```
@@ -522,7 +537,7 @@ sldl "artist=MC MENTAL" --aggregate --skip-existing --music-dir "path/to/music"
```
-Download all albums:
+Download all albums by an artist that are on soulseek:
```
sldl "artist=MC MENTAL" --aggregate --album
```
diff --git a/slsk-batchdl/Config.cs b/slsk-batchdl/Config.cs
index fee2d51..b8613f2 100644
--- a/slsk-batchdl/Config.cs
+++ b/slsk-batchdl/Config.cs
@@ -225,10 +225,16 @@ static class Config
if (DoNotDownload)
m3uOption = M3uOption.None;
- else if (!hasConfiguredM3uMode && inputType == InputType.String)
- m3uOption = M3uOption.None;
- else if (!hasConfiguredM3uMode && Program.trackLists != null && !aggregate &&!Program.trackLists.Flattened(true, false, true).Skip(1).Any())
- m3uOption = M3uOption.None;
+ else if (!hasConfiguredM3uMode)
+ {
+ if (inputType == InputType.String)
+ m3uOption = M3uOption.None;
+ else if (!aggregate && !(skipExisting && (skipMode == SkipMode.M3u || skipMode == SkipMode.M3uCond))
+ && Program.trackLists != null && !Program.trackLists.Flattened(true, false, true).Skip(1).Any())
+ {
+ m3uOption = M3uOption.None;
+ }
+ }
parentFolder = Utils.ExpandUser(parentFolder);
m3uFilePath = Utils.ExpandUser(m3uFilePath);
diff --git a/slsk-batchdl/Data.cs b/slsk-batchdl/Data.cs
index fe6d716..298283c 100644
--- a/slsk-batchdl/Data.cs
+++ b/slsk-batchdl/Data.cs
@@ -51,7 +51,10 @@ namespace Data
public string ToKey()
{
- return $"{Artist};{Album};{Title};{Length};{(int)Type}";
+ if (Type == TrackType.Album)
+ return $"{Artist};{Album};{(int)Type}";
+ else
+ return $"{Artist};{Album};{Title};{Length};{(int)Type}";
}
public override string ToString()
@@ -103,7 +106,7 @@ namespace Data
public bool needSkipExistingAfterSearch = false;
public bool gotoNextAfterSearch = false;
public bool placeInSubdir = false;
- public string? subdirOverride;
+ public bool useRemoteDirname = false;
public TrackListEntry()
{
@@ -138,12 +141,13 @@ namespace Data
}
public TrackListEntry(List> list, Track source, bool needSearch, bool placeInSubdir,
- bool canBeSkipped, bool needSkipExistingAfterSearch, bool gotoNextAfterSearch)
+ bool useRemoteDirname, bool canBeSkipped, bool needSkipExistingAfterSearch, bool gotoNextAfterSearch)
{
this.list = list;
this.source = source;
this.needSourceSearch = needSearch;
this.placeInSubdir = placeInSubdir;
+ this.useRemoteDirname = useRemoteDirname;
this.sourceCanBeSkipped = canBeSkipped;
this.needSkipExistingAfterSearch = needSkipExistingAfterSearch;
this.gotoNextAfterSearch = gotoNextAfterSearch;
@@ -183,10 +187,9 @@ namespace Data
res.AddTrackToLast(enumerator.Current);
}
- if (hasNext && enumerator.Current.Type != TrackType.Normal)
- res.AddEntry(new TrackListEntry(track));
- else if (!hasNext)
- break;
+ if (hasNext)
+ res.AddEntry(new TrackListEntry(enumerator.Current));
+ else break;
}
}
@@ -280,11 +283,26 @@ namespace Data
lists = newLists;
}
+ public void SetListEntryOptions()
+ {
+ // place downloads in subdirs if there is more than one special (album/aggregate) download
+ bool placeInSubdirs = Flattened(true, false, true).Skip(1).Any();
+
+ if (placeInSubdirs)
+ {
+ foreach(var tle in lists)
+ {
+ if (tle.source.Type != TrackType.Normal)
+ tle.placeInSubdir = true;
+ }
+ }
+ }
+
public IEnumerable