Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fiso64 committed Dec 21, 2024
1 parent c639daa commit ed12ea9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Usage: sldl <input> [OPTIONS]
E.g: '1:<cmd>' will only run the command if the file is
downloaded successfully. Prepend 's:' to use the system
shell to execute the command. Prepend 'a:' to run it only
whenever an album downloads or fails.
on album downloads.
--print <option> Print tracks or search results instead of downloading:
'tracks': Print all tracks to be downloaded
Expand Down Expand Up @@ -526,11 +526,11 @@ sldl https://www.youtube.com/playlist/id --get-deleted --yt-dlp

Print all songs by an artist which are not in your library:
```
sldl "artist=MC MENTAL" --aggregate --skip-music-dir "path/to/music" --print results-full
sldl "artist=MC MENTAL" -g --skip-music-dir "path/to/music" --print results-full
```
<br>

Download all albums by an artist found on soulseek:
Download all albums by an artist interactively:
```
sldl "artist=MC MENTAL" -a -g -t
```
Expand Down
27 changes: 0 additions & 27 deletions slsk-batchdl/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ public class Config
private string[] arguments;
bool hasConfiguredIndex = false;
bool confPathChanged = false;
FileConditions? undoTempConds = null;
FileConditions? undoTempPrefConds = null;

public Config(string[] args)
{
Expand Down Expand Up @@ -182,11 +180,6 @@ public Config Copy() // deep copies all fields except configProfiles and argumen
copy.necessaryCond = new FileConditions(necessaryCond);
copy.preferredCond = new FileConditions(preferredCond);

if (undoTempConds != null)
copy.undoTempConds = new FileConditions(undoTempConds);
if (undoTempPrefConds != null)
copy.undoTempPrefConds = new FileConditions(undoTempPrefConds);

copy.regexToReplace = new Track(regexToReplace);
copy.regexReplaceBy = new Track(regexReplaceBy);

Expand Down Expand Up @@ -541,26 +534,6 @@ void ListProfiles()
}


public void AddTemporaryConditions(FileConditions? cond, FileConditions? prefCond)
{
throw new NotImplementedException("Code has been refactored; probably does not work.");
if (cond != null)
undoTempConds = necessaryCond.AddConditions(cond);
if (prefCond != null)
undoTempPrefConds = preferredCond.AddConditions(prefCond);
}


public void RestoreConditions()
{
throw new NotImplementedException("Code has been refactored; probably does not work.");
if (undoTempConds != null)
necessaryCond.AddConditions(undoTempConds);
if (undoTempPrefConds != null)
preferredCond.AddConditions(undoTempPrefConds);
}


public static FileConditions ParseConditions(string input, Track? track = null)
{
static void UpdateMinMax(string value, string condition, ref int? min, ref int? max)
Expand Down
2 changes: 1 addition & 1 deletion slsk-batchdl/Help.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ NotFoundLastTime states respectively.
E.g: '1:<cmd>' will only run the command if the file is
downloaded successfully. Prepend 's:' to use the system
shell to execute the command. Prepend 'a:' to run it only
whenever an album downloads or fails.
on album downloads.
--print <option> Print tracks or search results instead of downloading:
'tracks': Print all tracks to be downloaded
Expand Down
2 changes: 1 addition & 1 deletion slsk-batchdl/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,7 @@ static async Task Update(Config config)
foreach (var (key, val) in searches)
{
if (val == null)
searches.TryRemove(key, out _); // reminder: removing from a dict in a foreach is allowed in newer .net versions
searches.TryRemove(key, out _);
}

foreach (var (key, val) in downloads)
Expand Down

0 comments on commit ed12ea9

Please sign in to comment.