Skip to content

Commit

Permalink
Update Jammer README and add version command
Browse files Browse the repository at this point in the history
  • Loading branch information
jooapa committed Dec 17, 2023
1 parent 95f82c7 commit 1e446d1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ jammer [song] ... [song]
jammer soundcloud.com/username/track-name
jammer soundcloud.com/username/sets/playlist-name
jammer youtube.com/watch?v=video-id
jammer start // opens jammer folder
jammer playlist // playlist controls
jammer selfdestruct // deletes jammer
jammer --help // show help
jammer start // opens jammer folder
jammer playlist // playlist controls
jammer selfdestruct // deletes jammer
jammer start // opens jammer folder
jammer --help // show help
jamemr --version // show version

```
```
```bash
Expand Down Expand Up @@ -72,4 +76,4 @@ dotnet run -- "path/to/song.mp3"
dotnet publish -r win10-x64 -c Release /p:PublishSingleFile=true
```

![image](https://raw.githubusercontent.com/jooapa/jammer/main/jammer.png)
![image](https://raw.githubusercontent.com/jooapa/jammer/main/jammer_HQ.png)
5 changes: 5 additions & 0 deletions src/Start.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public static void Run(string[] args)
TUI.Help();
return;
}
if (args[i] == "-v" || args[i] == "--version" || args[i] == "version") {
TUI.ClearScreen();
TUI.Version();
return;
}
}

if (args.Length != 0) {
Expand Down
6 changes: 6 additions & 0 deletions src/TUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ public static void Help() {
table.AddRow("[grey]jammer[/] [green]youtube[/] <url> ...", "Play song(s) from youtube url(s)");
table.AddRow("[grey]jammer[/] [green]playlist[/]", "Show playlist commands");
table.AddRow("[grey]jammer[/] [green]selfdestruct[/]", "Uninstall Jammer");
table.AddRow("[grey]jammer[/] [green]start[/]", "Open Jammer folder");
table.AddRow("[grey]jammer[/] [green]version[/]", "Show Jammer version [grey]" + Utils.version + "[/]");

AnsiConsole.Write(table);

Expand All @@ -401,4 +403,8 @@ public static void DrawFakePlayer() {
AnsiConsole.Markup("\nPress [yellow]c[/] for settings");
AnsiConsole.Markup("\nPress [green]f[/] to show playlist");
}

public static void Version() {
AnsiConsole.MarkupLine("[green]Jammer version " + Utils.version + "[/]");
}
}
1 change: 1 addition & 0 deletions src/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public struct Utils
public static string jammerPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\jammer\\";
public static bool isDebug = false;
public static string currentPlaylist = "";
public static string version = "1.1.2";
}
}

0 comments on commit 1e446d1

Please sign in to comment.