Giter Club home page Giter Club logo

jooapa / jammer Goto Github PK

View Code? Open in Web Editor NEW
67.0 67.0 3.0 90.09 MB

light-weight TUI music player with Soundcloud & Youtube. With Effects and Themes, Midi Support for Win & Linux

License: Other

C# 94.96% NSIS 1.48% PowerShell 0.84% Batchfile 1.07% Python 0.73% Shell 0.92%
audio audio-player cli dotnet linux midi-player mp3 mp3-player multilingual music music-player player soundcloud soundcloud-api soundcloud-downloader tui windows youtube youtube-dl youtube-downloader

jammer's Introduction

jammer's People

Contributors

antonako1 avatar jooapa avatar retroaalto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jammer's Issues

fix downlaod

i start jammer from folder C:\Users\user\jammer
I add youtube song there with shift+a
I redownload song it working
I shut down software
I go back to jammer to folder C:\Users\user\jammer
I try redownloading song and it breaks

also when i download song it shows title correctly and i go back to jammer folder it shows .mp4 in the name

Cannot add to playlist from CLI

$ jammer -c asdf
Launching Jammer...
Creating playlist: asdf.jammer
$ ls
asdf.jammer
$ jammer -a asdf "https://soundcloud.com/synthwave80s/sets/dreams"
Launching Jammer...
https://soundcloud.com/synthwave80s/sets/dreams
Adding songs to /home/ilako/jammer/playlists/asdf.jammer
Done!
$ cat asdf.jammer
$ 

[Linux] Local files won't play if there are spaces in the filename

Describe the bug
When you want to play a local mp3 file from your local drive and the filename has spaces in it, jammer won't play them.

To Reproduce
Steps to reproduce the behavior:

  1. Rename an mp3 file so it has spaces in it. Example: 01 Title Song.mp3
  2. Pass the mp3 file to jammer like this: $ jammer 01\ Title\ Song.mp3

The error should be visible now.

Expected behavior
The expectation is that local files with spaces in their names will be played the same way as files without spaces in their names.

Screenshots
image

Desktop (please complete the following information):

  • OS: ArchLinux
  • Jammer version 2.2.3.4

Code dumped if playlist file is empty

$ cat asdf.jammer
$ jammer -p asdf
Launching Jammer...
Starting up asdf.jammer
Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at jammer.Playlists.Play(String playlist, Boolean fromCli)
   at jammer.Start.Run(String[] args)
   at Program.Main(String[] args)
zsh: IOT instruction (core dumped)  jammer -p asdf

Fails to start if autosave is turned on and playlist is loaded from the net

  1. start jammer
  2. turn on autosave from config menu, quit jammer
  3. jammer https://cele.fr4nk.org/test.jammer
  4. Error
┌───────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Error                                                                                                 │
├───────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ ┌───────────────────────────────────────────────────────────────────────────────────────────────────┐ │
│ │ Can not initialize device                                                                         │ │
│ └───────────────────────────────────────────────────────────────────────────────────────────────────┘ │
└───────────────────────────────────────────────────────────────────────────────────────────────────────┘
│ Load Effects         │       │ 5 To Load Effects settings                                            │
│ Toggle Media Buttons │ False │ 6 To Toggle Media Buttons                                             │
│ Toggle Visualizer    │ True  │ 7 To Toggle Visualizer (change visualizer settings in Visualizer.ini) │
│ Load Visualizer      │       │ 8 To Load Visualizer settings                                         │
└──────────────────────┴───────┴───────────────────────────────────────────────────────────────────────┘
Press H to hide/show help
Press C for settings
Press F to show playlist

C:\Users\onethathasnoname>jammer https://cele.fr4nk.org/test.jammer
Checking https://cele.fr4nk.org/test.jammer
URL https://cele.fr4nk.org/test.jammer is valid
Downloaded 3432 of  5352 bytes (6,412.56%).
Downloaded 4812 of  5352 bytes (8,991.03%).
Downloaded 5352 of  5352 bytes (10,000.00%).
Song already in playlist
No songs in playlist

Save playlist when playlists directort doesn't exist

if $HOME/jammer/playlists doesn't exist program core dumps when saving a new playlst

│ Save as playlist                                                                                                          
│ │ Enter playlist name: asdf                                                                                             
Unhandled exception. System.IO.DirectoryNotFoundException: Could not find a part of the path '/home/ilako/jammer/playlists/asdf.jammer'.
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode, Func`4 createOpenException) 
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Func`4 createOpenException) 
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)   
   at System.IO.File.WriteAllLines(String path, IEnumerable`1 contents, Encoding encoding)
   at jammer.Playlists.Save(String playlistName, Boolean force)  
   at TUI.SaveAsPlaylist()                                
   at jammer.Start.CheckKeyboard()          
   at jammer.Start.Loop()                                                                                                   

Planned support for playback/multimedia keys?

Describe the bug
I love the tool <3, do you plan on adding support for multimedia keys from keyboards? You know - play/pause; next, prev, you know - those:

PXL_20240503_070235626

To Reproduce
Steps to reproduce the behavior:

  1. start a playlist
  2. hit pause - nothing happens
  3. het prev/next - nothing happens

Expected behavior
Hitting pause - pauses the playback, hittin play - starts it. etc .

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

$ uname -a
Linux pop-os 6.8.0-76060800daily20240311-generic #202403110203~1713206908~22.04~3a62479 SMP PREEMPT_DYNAMIC Mon A x86_64 GNU/Linux

fuix download

i download song from youtube. it takes 100minutes or gives me error:
The filename, directory name, or volume label syntax is incorrect

happens here in trycatch. fix
private static async Task DownloadYoutubeTrackAsync(string url)
{
string formattedUrl = FormatUrlForFilename(url);

        songPath = Path.Combine(
            Utils.jammerPath,
            formattedUrl
        );
        string construction = songPath;
        string value = "";
        (value, pipe) = CheckExistingSong(url);
        // Message.Data("Value: " + value, "Check Existing Song:" + formattedUrl.Substring(0, formattedUrl.Length - 4));
        if (value != "")
        {
            songPath = value;
            return;
        }

        pipe = "";
        try
        {
            var streamManifest = await youtube.Videos.Streams.GetManifestAsync(url);
            var streamInfo = streamManifest.GetAudioStreams().FirstOrDefault();
            var video = await youtube.Videos.GetAsync(url);
            
            if (streamInfo != null)
            {
                var progress = new Progress<double>(data =>
                {
                    AnsiConsole.Clear();
                    Console.WriteLine($"{Locale.OutsideItems.Downloading} {url}: {data:P}");
                });

                // metadata to pipe
                pipe = video.Title;
                pipe = Start.Sanitize(pipe);

                await youtube.Videos.Streams.DownloadAsync(streamInfo, songPath, progress);
                int pos_dot = songPath.LastIndexOf(".");
                construction = songPath[..pos_dot] + "^" + pipe + ".mp4";
                File.Move(songPath, construction);
            }
            else
            {
                Message.Data(Locale.OutsideItems.NoAudioStream, Locale.OutsideItems.Error);
            }
            songPath = construction;
        }
        catch (Exception ex)
        {
            Message.Data($"{Locale.OutsideItems.Error}: " + ex.Message, "Error");
            songPath = "";
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.