Giter Site home page Giter Site logo

tsirysndr / music-player Goto Github PK

View Code? Open in Web Editor NEW
326.0 8.0 24.0 32.19 MB

An extensible music server written in Rust ๐Ÿš€๐ŸŽตโœจ

License: MIT License

Rust 66.65% Shell 0.09% JavaScript 0.68% HTML 0.28% CSS 0.23% TypeScript 29.56% Starlark 1.92% Nix 0.59%
audio-player music music-player rust cli daemon server tokio audio graphql

music-player's Introduction

Music Player (written in Rust)

License: MIT GitHub all releases release rust-clippy discord-server

Note: This is a work in progress. ๐Ÿ—๏ธ๐Ÿšง

This is a simple music player that I made for my own use. It is written in Rust and uses rodio, symphonia, and gRPC libraries.
Music is played through the server's audio device. The daemon stores info about all available music, and this info can be easily searched and retrieved. Like mpd or Mopidy but written in Rust.

Installation

Compiling from source, without Nix:

# Install dependencies
brew install protobuf # macOS
sudo apt-get install -y libasound2-dev protobuf-compiler # Ubuntu/Debian
choco install protoc # Windows using Chocolatey Package Manager
# Compile
git clone https://github.com/tsirysndr/music-player.git
cd music-player/webui/musicplayer
nvm install # install node version specified in .nvmrc (optional on windows)
bun install && bun run build # build webui
cd ../..
cargo install --path .

With Nix:

git clone https://github.com/tsirysndr/music-player.git
cd music-player
nix develop --experimental-features "nix-command flakes"
cd webui/musicplayer
bun install && bun run build # build webui
cd ../..
cargo install --path .

macOS/Linux

Using Homebrew:

brew install tsirysndr/tap/musicplayer

Using Nix:

nix profile install --experimental-features "nix-command flakes" github:tsirysndr/music-player

Or download the latest release for your platform here.

๐Ÿ“ฆ Downloads

Latest (Desktop):

Latest (CLI):

Other version...

Start the server

music-player

Usage

USAGE:
    music-player [SUBCOMMAND]

OPTIONS:
    -h, --help       Print help information
    -V, --version    Print version information

SUBCOMMANDS:
    albums      List all albums
    artists     List all artists
    help        Print this message or the help of the given subcommand(s)
    next        Play the next song
    pause       Pause the current song
    open        Open audio file
    playlist    Manage playlists
    prev        Play the previous song
    queue       Manage the queue
    play        Resume the current song
    scan        Scan music library: $HOME/Music
    search      Search for a song, album, artist or playlist
    stop        Stop the current song
    tracks      List all tracks

GraphQL API

# Start the server
music-player

Open http://localhost:5053/graphiql in your browser.

Features

  • Play music from specified path
  • Configuration file support
  • gRPC API for controlling the player
  • Scan music library
  • Play/Pause/Stop music
  • Next/Previous track
  • Create/Delete playlists
  • Music Player Client
  • Terminal UI (using tui-rs)
  • GraphQL API
  • Web UI
  • Desktop version (using gtk-rs)
  • Android Library (See songbird-android and songbird-android-rs)
  • iOS Library
  • Mobile version (React Native)
  • Stream to Chromecast
  • Stream to Airplay
  • Stream to Kodi
  • Stream to UPnP Media Renderer
  • Stream from Youtube (audio only)
  • Stream from Spotify
  • Stream from Soundcloud
  • Stream from Deezer
  • Stream from DatPiff
  • Stream from Tidal
  • Stream from MyVazo

โœจ Star History

Star History Chart

music-player's People

Contributors

ahmedsilat44 avatar blitty-codes avatar bsinky avatar dellucifer avatar dependabot[bot] avatar himanshu-malviya15 avatar jacobstern avatar kianmeng avatar serial-ata avatar tsirysndr 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  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  avatar  avatar  avatar  avatar

music-player's Issues

add graphql server for the web ui

We can use async-graphql

Start by adding a GraphQL crate in the workspace, which consists of the basic Queries/Mutations (query Artists, Albums, Tracks, Tracklist and mutation Play, Pause, Next, Previous, LoadTrack)

homebrew sha256 mismatch

> brew install tsirysndr/tap/musicplayer

Warning: Treating tsirysndr/tap/musicplayer as a formula. For the cask, use tsirysndr/tap/musicplayer
==> Fetching tsirysndr/tap/musicplayer
==> Downloading https://github.com/tsirysndr/music-player/releases/download/v0.2.0-alpha.12
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-
######################################################################## 100.0%
Error: musicplayer: SHA256 mismatch
Expected: f2ff0115a001db28df99f4825af6a3bd3d74c6d598f465a003d5f1a031a99813
  Actual: 29c77237cd6f664b5a1cafce0d165e80c65d06d68c8727ddf5ef76b14dde975f

Music player not launching due to database connection error

I have installed the music player using the command sudo apt install ./music-player_v0.2.0-alpha.8_amd64.deb, but when I try to launch the program, it crashes with the following error message:

thread 'main' panicked at 'Could not connect to database: Conn("error returned from database: (code: 14) unable to open database file")', /home/runner/work/music-player/music-player/storage/src/lib.rs:24:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Minor issues(handlers, scan)

Hi there! It's the first time I'm really trying your app and I've encountered some small issues. Unfortunately, I can't work on a fork of your project and make a PR because of my current hardware but I hope this issue helps.

  • The TUI player panics when trying to access empty fields due to the handlers:

image

The Enter events should check if the indexed field is valid

  Key::Enter => {
         if let Some(artist) = app.artist_table.artist.get(app.artist_table.selected_index) {
                app.dispatch(IoEvent::GetArtist(artist.id.clone()));
                app.push_navigation_stack(RouteId::Artist, ActiveBlock::ArtistBlock);
         }
  }

image

  • Deleted songs still appear after re-scaning

image
image

OS: Fedora37
music-player version: v0.2.0-alpha.13

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.