Git Product home page Git Product logo

psst's Introduction

Psst

A fast Spotify client with a native GUI written in Rust, without Electron. Psst is still very early in development, lacking in features, stability, and general user experience. It's fully cross-platform, supporting Windows, Linux, and macOS. Contributions are welcome!

Note: A Spotify Premium account is required.

Build

Screenshot

Download

GitHub Actions automatically creates builds when new commits are pushed to the master branch. You can download the prebuilt binaries for x86_64 Windows, Linux (Ubuntu), and macOS.

Platform
Windows
Linux (Ubuntu)
Debian Package
MacOS

Unofficial builds of Psst are also available through the AUR and Homebrew.

Building

On all platforms, the latest Rust stable (at least 1.65.0) is required. For platform-specific requirements, see the dropdowns below.

Linux

Our user-interface library, Druid, has two possible backends on Linux: GTK and pure X11, with a Wayland backend in the works. The default Linux backend is GTK. Before building on Linux, make sure the required dependencies are installed.

Debian/Ubuntu:

sudo apt-get install libssl-dev libgtk-3-dev libcairo2-dev libasound2-dev

RHEL/Fedora:

sudo dnf install openssl-devel gtk3-devel cairo-devel alsa-lib-devel
OpenBSD (WIP)

OpenBSD support is still a WIP, and things will likely not function as intended. Similar to Linux, Druid defaults to GTK while also providing a pure X11 backend. Furthermore, bindgen must be able to find LLVM through the expected environment variable. Only OpenBSD/amd64 has been tested so far.

doas pkg_add gtk+3 cairo llvm
export LIBCLANG_PATH=/usr/local/lib

In case rustc(1) fails building bigger crates

memory allocation of xxxx bytes failed
error: could not compile `gtk`
Caused by:
  process didn't exit successfully: `rustc --crate-name gtk [...]` (signal: 6, SIGABRT: process abort signal)
warning: build failed, waiting for other jobs to finish...

try increasing your user's maximum heap size:

ulimit -d $(( 2 * `ulimit -d` ))

Build from Source:

cargo build
# Append `--release` for a release build.

Run from Source:

cargo run --bin psst-gui
# Append `--release` for a release build.

Build Installation Bundle (i.e., macOS .app):

cargo install cargo-bundle
cargo bundle --release

Roadmap

  • Vorbis track playback
  • Browsing saved albums and tracks
  • Save / unsave albums and tracks
  • Browsing followed playlists
  • Search for artists, albums, and tracks
  • Podcast support
  • Media keys control
  • Open Spotify links through the search bar
  • Audio volume control
  • Audio loudness normalization
  • Genre playlists and "For You" content
  • Dark theme
  • Resilience to network errors (automatically retry timed-out requests)
  • Managing playlists
    • Follow/unfollow
    • Add/remove tracks
    • Reorder tracks
    • Rename playlist
    • Playlist folders
  • Playback queue
  • React to audio output device events
    • Pause after disconnecting headphones
    • Transfer playback after connecting headphones
  • Better caching
    • Cache as many WebAPI responses as possible
    • Visualize cache utilization
      • Total cache usage in the config dialog
      • Show time origin of cached data, allow to refresh
  • Trivia on the artist page, Wikipedia links
  • Downloading encrypted tracks
  • Reporting played tracks to Spotify servers
  • OS-specific application bundles
  • UI
    • Rethink the current design, consider a two-pane layout
      • Left pane for browsing
      • Right pane for current playback
    • Detect light/dark OS theme
    • Robust error states, ideally with a retry button
    • Correct playback highlight
      • Highlight now-playing track only in the correct album/playlist
      • Keep highlighted track in viewport
    • Paging or virtualized lists for albums and tracks
    • Grid for albums and artists
    • Robust active/inactive menu visualization
    • Save playback state

Development

Contributions are very welcome!
Here's the basic project structure:

  • /psst-core - Core library, takes care of Spotify TCP session, audio file retrieval, decoding, audio output, playback queue, etc.
  • /psst-gui - GUI application built with Druid
  • /psst-cli - Example CLI that plays a track. Credentials must be configured in the code.
  • /psst-protocol - Internal Protobuf definitions used for Spotify communication.

Privacy Policy

Psst connects only to the official Spotify servers and does not call home. Caches of various things are stored locally and can be deleted anytime. User credentials are not stored at all; instead, a re-usable authentication token from Spotify is used.

Thanks

This project would not exist without the following:

  • Big thank you to librespot, the Open Source Spotify client library for Rust. Most of psst-core is directly inspired by the ideas and code of librespot, although with a few differences:
    • Spotify Connect (remote control) is not supported yet.
    • Psst is completely synchronous, without tokio or other async runtime, although it will probably change in the future.
    • Psst is using HTTPS-based CDN audio file retrieval, similar to the official Web client or librespot-java, instead of the channel-based approach in librespot.
  • druid native GUI library for Rust.
  • ncspot cross-platform ncurses Spotify client written in Rust, using librespot.
  • ...and of course other libraries and projects.

psst's People

Contributors

jpochyla avatar insprill avatar swiesmann avatar martingoe avatar gordonshieh avatar jacksongoode avatar kethku avatar kesefon avatar itsjunetime avatar gokayokyay avatar charliethomson avatar klemensn avatar takanoro avatar tmdh avatar literallyjustroy avatar paolobarbolini avatar reynn avatar julidi avatar arch-btw avatar timgws avatar soooch avatar oleggtro avatar bivhitscar avatar brightly-salty avatar dscso avatar im-coder-lg avatar luukvanderduim avatar mtorromeo avatar brandly avatar nicolasf avatar

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.