Git Product home page Git Product logo

spotify-player's Introduction

spotify_player

Table of Contents

Introduction

spotify_player is a fast, easy to use, and configurable terminal music player.

Features

Important Notice

spotify-player throws error "Login failed with reason: Bad credentials" when authenticating from 7/29/2024 because Spotify removed username & password authentication from API through Mercury/Hermes. Please use librespot-auth repository. For more details, see #520

Examples

A demo of spotify_player v0.5.0-pre-release on youtube or on asciicast:

Checkout examples/README.md for more examples.

Installation

By default, the application's installed binary is spotify_player.

Requirements

A Spotify Premium account is required.

Dependencies

Windows and MacOS
Linux
  • Rust and cargo as the build dependencies

  • install openssl, alsa-lib (streaming feature), libdbus (media-control feature).

    • For example, on Debian based systems, run the below command to install application's dependencies:

      sudo apt install libssl-dev libasound2-dev libdbus-1-dev

Binaries

Application's prebuilt binaries can be found in the Releases Page.

Note: to run the application, Linux systems need to install additional dependencies as specified in the Dependencies section.

Homebrew

Run brew install spotify_player to install the application.

Scoop

Run scoop install spotify-player to install the application.

Cargo

Run cargo install spotify_player to install the application from crates.io.

AUR

Run yay -S spotify-player to install the application as an AUR package.

Alternatively, run yay -S spotify-player-full-pipe to install an AUR package compiled with full feature support and Pulseaudio/Pipewire instead of rodio.

Void Linux

Run xbps-install -S spotify-player to install the application.

FreeBSD

Run pkg install spotify-player to install the spotify_player binary from FreeBSD ports.

NetBSD

Using the package manager, run pkgin install spotify-player to install from the official repositories.

Building from source,

cd /usr/pkgsrc/audio/spotify-player
make install

Docker

Note: streaming feature is disabled when using the docker image.

You can download the binary image of the latest build from the master branch by running

docker pull aome510/spotify_player:latest

then run

docker run --rm -it aome510/spotify_player:latest

to run the application.

You can also use your local config folder to configure the application or your local cache folder to store the application's cache data when running the docker image:

docker run --rm \
-v $APP_CONFIG_FOLDER:/app/config/ \
-v $APP_CACHE_FOLDER:/app/cache/ \
-it aome510/spotify_player:latest

Features

Spotify Connect

To enable a full Spotify connect support, user will need to register a Spotify application and specify the application's client_id in the general configuration file as described in the configuration documentation.

More details about registering a Spotify application can be found in the official Spotify documentation.

When spotify_player runs with your own client_id, press D (default shortcut for SwitchDevice command) to get the list of available devices, then press enter (default shortcut for ChooseSelected command) to connect to the selected device.

Streaming

spotify_player supports streaming, which needs to be built/installed with streaming feature (enabled by default) and with an audio backend (rodio-backend by default). The streaming feature allows to spotify_player to play music directly from terminal.

The application uses librespot library to create an integrated Spotify client while running. The integrated client will register a Spotify speaker device under the spotify-player name, which is accessible on the Spotify connect device list.

Audio backend

spotify_player uses rodio as the default audio backend. List of available audio backends:

  • alsa-backend
  • pulseaudio-backend
  • rodio-backend
  • portaudio-backend
  • jackaudio-backend
  • rodiojack-backend
  • sdl-backend
  • gstreamer-backend

User can change the audio backend when building/installing the application by specifying the --features option. For example, to install spotify_player with pulseaudio-backend, run

cargo install spotify_player --no-default-features --features pulseaudio-backend

Note:

  • needs to specify --no-default-features here because rodio-backend is one of the default features.
  • user will need to install additional dependencies depending on the selected audio backend. More details can be found in the Librespot documentation.

The streaming feature can be also disabled upon installing by running

cargo install spotify_player --no-default-features

Lyric

To enable lyric support, spotify_player needs to be built/installed with lyric-finder feature (disabled by default). To install the application with lyric-finder feature included run:

cargo install spotify_player --features lyric-finder

User can view lyric of the currently playing track by calling the LyricPage command to go the lyric page. To do this, spotify_player needs to be built with a lyric-finder feature.

Under the hood, spotify_player retrieves the song's lyric using Genius.com.

Media Control

To enable media control support, spotify_player needs to be built/installed with media-control feature (enabled by default) and set the enable_media_control config option to true in the general configuration file.

Media control support is implemented using MPRIS DBus on Linux and OS window event listener on Windows and MacOS.

Image

To enable image rendering support, spotify_player needs to be built/installed with image feature (disabled by default). To install the application with image feature included, run:

cargo install spotify_player --features image

spotify_player supports rendering image in a full resolution if the application is run on either Kitty or iTerm2. Otherwise, the image will be displayed as block characters.

spotify_player also supports rendering images with sixel behind sixel feature flag, which also enables image feature:

cargo install spotify_player --features sixel

Notes:

  • Not all terminals supported by libsixel are supported by spotify_player as it relies on a third-party library for image rendering. A possible list of supported terminals can be found in here.
  • Images rendered by sixel can have a weird scale. It's recommended to tweak the cover_img_scale config option to get the best result as the scaling works differently with different terminals and fonts.

Examples of image rendering:

  • iTerm2:

iTerm2

  • Kitty:

kitty

  • Sixel (foot terminal, cover_img_scale=1.8):

sixel

  • Others:

others

Notify

To enable desktop notification support, spotify_player needs to be built/installed with notify feature (disabled by default). To install the application with notify feature included, run:

cargo install spotify_player --features notify

Note: the notification support in MacOS and Windows are quite restricted compared to Linux.

Mouse support

Currently, the only supported use case for mouse is to seek to a position of the current playback by left-clicking to such position in the playback's progress bar.

Daemon

To enable a daemon support, spotify_player needs to be built/installed with daemon feature (disabled by default). To install the application with daemon feature included, run:

cargo install spotify_player --features daemon

You can run the application as a daemon by specifying the -d or --daemon option: spotify_player -d.

Notes:

  • daemon feature is not supported on Windows

  • daemon feature requires the streaming feature to be enabled and the application to be built with an audio backend

  • because of the OS's restrictions, daemon feature doesn't work with the media-control feature on MacOS, which is enabled by default. In other words, if you want to use the daemon feature on MacOS, you must install the application with media-control feature disabled:

    cargo install spotify_player --no-default-features --features daemon,rodio-backend

Fuzzy search

To enable fuzzy search support, spotify_player needs to be built/installed with fzf feature (disabled by default).

CLI Commands

spotify_player offers several CLI commands to interact with Spotify:

  • get: Get Spotify data (playlist/album/artist data, user's data, etc)
  • playback: Interact with the playback (start a playback, play-pause, next, etc)
  • connect: Connect to a Spotify device
  • like: Like currently playing track
  • authenticate: Authenticate the application
  • playlist: Playlist editing (new, delete, import, fork, etc)

For more details, run spotify_player -h or spotify_player {command} -h, in which {command} is a CLI command.

Notes

  • When using the CLI for the first time, you'll need to run spotify_player authenticate to authenticate the application beforehand.
  • Under the hood, CLI command is handled by sending requests to a spotify_player client socket running on port client_port, a general application configuration with a default value of 8080. If there is no running application's instance, a new client will be created upon handling the CLI commands, which increases the latency of the command.

Commands

To go to the shortcut help page, press ? or C-h (default shortcuts for OpenCommandHelp command).

Tips:

  • you can search in the shortcut help page (and some other pages) using Search command
  • RefreshPlayback can be used to manually update the playback status.
  • RestartIntegratedClient is useful when user wants to switch to another audio device (headphone, earphone, etc) without restarting the application, as the integrated client will be re-initialized with the new device.

List of supported commands:

Command Description Default shortcuts
NextTrack next track n
PreviousTrack previous track p
ResumePause resume/pause based on the current playback space
PlayRandom play a random track in the current context .
Repeat cycle the repeat mode C-r
ToggleFakeTrackRepeatMode toggle fake track repeat mode M-r
Shuffle toggle the shuffle mode C-s
VolumeUp increase playback volume by 5% +
VolumeDown decrease playback volume by 5% -
Mute toggle playback volume between 0% and previous level _
SeekForward seek forward by 5s >
SeekBackward seek backward by 5s <
Quit quit the application C-c, q
ClosePopup close a popup esc
SelectNextOrScrollDown select the next item in a list/table or scroll down j, C-n, down
SelectPreviousOrScrollUp select the previous item in a list/table or scroll up k, C-p, up
PageSelectNextOrScrollDown select the next page item in a list/table or scroll a page down page_down, C-f
PageSelectPreviousOrScrollUp select the previous page item in a list/table or scroll a page up page_up, C-b
SelectFirstOrScrollToTop select the first item in a list/table or scroll to the top g g, home
SelectLastOrScrollToBottom select the last item in a list/table or scroll to the bottom G, end
ChooseSelected choose the selected item enter
RefreshPlayback manually refresh the current playback r
RestartIntegratedClient restart the integrated client (streaming feature only) R
ShowActionsOnSelectedItem open a popup showing actions on a selected item g a, C-space
ShowActionsOnCurrentTrack open a popup showing actions on the current track a
AddSelectedItemToQueue add the selected item to queue Z, C-z
FocusNextWindow focus the next focusable window (if any) tab
FocusPreviousWindow focus the previous focusable window (if any) backtab
SwitchTheme open a popup for switching theme T
SwitchDevice open a popup for switching device D
Search open a popup for searching in the current page /
BrowseUserPlaylists open a popup for browsing user's playlists u p
BrowseUserFollowedArtists open a popup for browsing user's followed artists u a
BrowseUserSavedAlbums open a popup for browsing user's saved albums u A
CurrentlyPlayingContextPage go to the currently playing context page g space
TopTrackPage go to the user top track page g t
RecentlyPlayedTrackPage go to the user recently played track page g r
LikedTrackPage go to the user liked track page g y
LyricPage go to the lyric page of the current track (lyric-finder feature only) g L, l
LibraryPage go to the user library page g l
SearchPage go to the search page g s
BrowsePage go to the browse page g b
Queue go to the queue page z
OpenCommandHelp go to the command help page ?, C-h
PreviousPage go to the previous page backspace, C-q
OpenSpotifyLinkFromClipboard open a Spotify link from clipboard O
SortTrackByTitle sort the track table (if any) by track's title s t
SortTrackByArtists sort the track table (if any) by track's artists s a
SortTrackByAlbum sort the track table (if any) by track's album s A
SortTrackByAddedDate sort the track table (if any) by track's added date s D
SortTrackByDuration sort the track table (if any) by track's duration s d
ReverseOrder reverse the order of the track table (if any) s r
MovePlaylistItemUp move playlist item up one position C-k
MovePlaylistItemDown move playlist item down one position C-j
CreatePlaylist create a new playlist N
JumpToCurrentTrackInContext jump to the current track in the context g c

To add new shortcuts or modify the default shortcuts, please refer to the keymaps section in the configuration documentation.

Actions

A general list of actions is available; however, not all Spotify items (track, album, artist, or playlist) implement each action. To get the list of available actions on an item, call the ShowActionsOnCurrentTrack command or the ShowActionsOnSelectedItem command, then press enter (default binding for the ChooseSelected command) to initiate the selected action. Some actions may not appear in the popup but can be bound to a shortcut.

List of available actions:

  • GoToArtist
  • GoToAlbum
  • GoToRadio
  • AddToLibrary
  • AddToPlaylist
  • AddToQueue
  • AddToLiked
  • DeleteFromLiked
  • DeleteFromLibrary
  • DeleteFromPlaylist
  • ShowActionsOnAlbum
  • ShowActionsOnArtist
  • ToggleLiked
  • CopyLink
  • Follow
  • Unfollow

These actions can also be bound to a shortcut. To add new shortcuts, please refer to the actions section in the configuration documentation.

Search Page

When first entering the search page, the application focuses on the search input. User can then input text, delete one character backward using backspace, or search the text using enter.

To move the focus from the search input to the other windows such as track results, album results, etc, use FocusNextWindow or FocusPreviousWindow.

Configurations

By default, spotify_player will look into $HOME/.config/spotify-player for application's configuration files. This can be changed by either specifying -c <FOLDER_PATH> or --config-folder <FOLDER_PATH> option.

If an application configuration file is not found, one will be created with default values.

Please refer to the configuration documentation for more details on the configuration options.

Caches

By default, spotify_player will look into $HOME/.cache/spotify-player for application's cache files, which include log files, Spotify's authorization credentials, audio cache files, etc. This can be changed by either specifying -C <FOLDER_PATH> or --cache-folder <FOLDER_PATH> option.

Logging

The application stores logs inside the $APP_CACHE_FOLDER/spotify-player-*.log file. For debugging or submitting an issue, user can also refer to the backtrace file in $APP_CACHE_FOLDER/spotify-player-*.backtrace, which includes the application's backtrace in case of panics/unexpected errors.

spotify_player uses RUST_LOG environment variable to define the application's logging level. RUST_LOG is default to be spotify_player=INFO, which only shows the application's logs.

Acknowledgement

spotify_player is written in Rust and is built on top of awesome libraries such as tui-rs, rspotify, librespot, and many more. It's highly inspired by spotify-tui and ncspot.

spotify-player's People

Contributors

0323pin avatar annimon avatar aome510 avatar apprehensions avatar arouene avatar braheezy avatar cobbinma avatar deauthe avatar dod-101 avatar felixkroemer avatar fuyukai avatar hyperpuncher avatar juliamertz avatar justjokiing avatar lucasfa avatar m-torhan avatar maniarasteh avatar maxiwee69 avatar micleo2 avatar nikosavola avatar puuuuh avatar rashil2000 avatar rileyallyn avatar robko23 avatar rubenvandeven avatar schnouki avatar sebrollen avatar venmolom avatar viniciusandr avatar yerke 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

spotify-player's Issues

How to shuffle

This is probably stupid, but when I press shuffle keybind (C-s), it opens up a shortcut menu and there is no shuffle option. Can someone please clarify the shortcut?

playback_progress_bar option is ignored

@aome510 Sorry to bother you again :(

Describe the bug
playback_progress_bar doesn't respect configuration options set by the user.

To Reproduce
Set the variable playback_progress_bar in theme.toml to anything but the default. Start the player and watch the default values being applied to the UI progress bar.

Expected behavior
The options in the config file should be honored.

Log and backtrace
Reference log, https://pastebin.com/4bn7Qcxx

Screenshots

2023-02-05-093855_1366x768_scrot

2023-02-05-094018_1366x768_scrot

The config file is shown in the screenshots but, if you want to look closer you can find it here
Notice in the screenshots, that if I reverse fg and bg (screenshot 1 and 2) the UI looks exactly the same.

Environment

  • OS: NetBSD
  • Application version: 0.11.0
  • Application features: portaudio

EDIT

Actually, it doesn't respect the defaults either. The foreground should be Green on defaults but, it's White.

Playerctl Volume Control + Possible Podcast Support?

Hi, I've been using spotify-player for quite a while now, I think everything is great but podcast support would make the app even more complete in my opinion. The other thing I had a question about was volume control through playerctl, or any other way to control volume through the command line, I'm aware of an easy way to manage volume using https://gitlab.com/axdsop/nix-dotfiles/-/blob/master/Configs/polybar/scripts/mpris_player/mpris_player_control and the command "mpris_player_control -p spotify_player -V 100". However the volume adjustments aren't reflected in the spotify-player interface. My current workaround is just using xdotool but it's not perfect:

WINDOW=$(xdotool search --name spotify_player)

xdotool key --window "$WINDOW" minus

Thanks for your continued support of this project :)

MPRIS position/duration data not being exported properly(?)

Describe the bug
the MPRIS data for the duration of the song, and the position and the remaining is unknown.

To Reproduce

~ teapot$ playerctl metadata --format "{{ position }}"
62
~ teapot$ playerctl metadata --format "{{ position }}"
15
~ teapot$ playerctl metadata --format "{{ position }}"
110
~ teapot$ playerctl metadata --format "{{ position }}"
33
~ teapot$ playerctl metadata --format "{{ position }}"
85
~ teapot$ playerctl metadata --format "{{ position }}"
14
~ teapot$ playerctl metadata --format "{{ position }}"
80
~ teapot$ playerctl metadata --format "{{ duration(position) }}"
0:00

Expected behavior
Metadata about the duration and position is properly shown.

Screenshots
The most useless video ever:

20230117_211236_sc.mp4

now, it may look like the wmusic dockapp is getting the 'information', but in reality it is guessing it.

Environment

  • Application version: cc0fde5
  • Application features: alsa-backend,media-control

media-control is not really cross platform

Hi @aome510

I've finally enabled the lyric-finder option and built the package locally. It works really well, thanks!
I've asked internally if https://genius.com/ is an acceptable source of lyrics or, if we have any license concerns with it.
If all is ok, I'll merge an update later enabling this feature.

As for media-control, it will need to be off and not even possible to enable as an optional build feature for now.
Although we do support dbus, souvlaki does not support our OS, according to Cargo-toml,

[target.'cfg(target_os = "windows")'.dependencies]
raw-window-handle = "0.3.3"

[target.'cfg(target_os = "windows")'.dependencies.windows]
version = "0.29.0"
features = [
    "alloc",
	"Foundation",
	"Media",
	"Win32_Foundation",
	"Win32_System_WinRT",
	"Storage_Streams",
]

[target.'cfg(target_os = "macos")'.dependencies]
block = "0.1.6"
cocoa = "0.24.0"
core-graphics = "0.22.2"
dispatch = "0.2.0"
objc = "0.2.7"

[target.'cfg(target_os = "linux")'.dependencies]
dbus = "0.9.5"
dbus-crossroads = "0.5.0"

It's probably possible to fix this by simply adding a target definition but, I haven't looked into this yet.
Looking forward to the cover feature, the viuer and image crates work on NetBSD and should not be a problem to enable this option.

Please keep media-control as an optional feature.
Thanks

terminal ansi colors

by default, it seems that spotify_player uses it's own colors. for a CLI/TUI application i don't think this is a very good idea. spotify_player should use the terminal's colors - aka ANSI colors.

Release `v0.3.0`

TODO List for v0.3.0

  • improve search page usability
  • add scroll shortcuts for the shortcut help page (#11)
  • clean up event handler codes (#12)

Background

Hi,

I couldn't wait for a new release to try the search functionality, so I've built the software from the git-HEAD on my NetBSD system.

I'm having trouble using the search function on my keyboard layout, though.
"g / " is an easy shortcut on an us keyboard but, on a Swedish keyboard it's kind of hard as " / " needs a modifier and " g Shift 7 " doesn't do it.

Yes, "Shift 7" outputs " / " on my keyboard.

Guess, I can define custom key-bindings but, I haven't done that yet and thought I'd let you know anyway.

Regards,
[email protected]

Show correct track position on MPRIS

Hi :)
It looks like MPRIS always shows the track position as 0, is it possible to output the correct position to MPRIS?
image
Track position is always a value similar to this.

API for consume/dispatch actions from third-party applications

Is your feature request related to a problem? Please describe.
Not a problem. is possible to dispose of a simple API to consume in order to dispatch actions from third-party applications, actions like:

  • get current song title that's playing
  • get the current playlist that's playing
  • play a specific song of the current playlist
  • go to next/previous song of the current playlist

Describe the solution you'd like
This would work sending commands to any existent instance of spotify-player running.
I would like to write a neovim plugin to control spotify-player while coding, as a widget of spotify-player for neovim, but it needs an API exposed.

E.g.

spotify_player --cmd="get-playlist"
spotify_player --cmd="play-song id"

I'm not sure if I can do this by using the service that spotify_player is using in background.
I don't know if that will get sync with spotify_player either (without hit an API for auth, etc)

I would like to get this idea working hand to hand with spotify-player, because I think is an app with a great future ahead.

Sounds crazy?

naming binary/project

i noticed that the spotify-player binary is named spotify_player; i think this is pretty inconsistent with the project name which has a dash in it. you could rename the project to a better name (suggestion. 'flack' - spot in swedish, 'spelare' - player in swedish, because the founders of spotify were swedish. i think 'spelare' is a cool name'.

i get confused with launching the player due to the dash or the underscore. maybe the binary can be renamed to splayer or spotifyp or sp (like spt)?

Add sharing functionality

A way to copy a link to both currently playing & currently selected track/album/artist/etc(podcast support?) would be nice. Maybe keybinds or adding the option to the action menu

Release Binaries

The current install for this program (if using Cargo) looks something like:

  • Install Rust language support
  • Install system library dependencies (openssl, alsa-lib, libdbus)
  • Install spotify_player using Cargo
    • Bunch of crates are downloaded
    • Bunch of crates are compiled
    • If you're missing a system library, this is when you find out. Restart Cargo build after you've fixed any issues
  • Add ~/.cargo/bin to $PATH

This process may be long for users that have never used Rust before (20 min? Unacceptable! ๐Ÿ˜). I thought I'd look into how things might be improved.

I found out the binary in the Docker image you provide "just works" and doesn't need all the crates installed. The first easy step could be to add that binary as a Release artifact. But...I know 100% statically linked binaries are a thing in languages like Go. Could things be even easier here?

I found this statement online:

By default, Rust will statically link all Rust code. However, if you use the standard library, it will dynamically link to the system's libc implementation.

And that's confirmed with the binary obtained from the Docker image:

$ file spotify_player
spotify_player: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=8614a73108df435bc93ac676acd49b907f730034, for GNU/Linux 3.2.0, with debug_info, not stripped

$ ldd spotify_player
        linux-vdso.so.1 (0x00007ffcd1df9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faa06fbe000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa06f9c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa06e58000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa06e52000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa06c8d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007faa07edf000)

With a few edits to the Dockerfile and spotify_player/Config.toml, a 100% statically-linked binary is possible:

$ file /tmp/spotify_player
/tmp/spotify_player: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=7289f836bdf693be7dc24b6bb26cb8e448311ffe, with debug_info, not stripped

$ ldd /tmp/spotify_player
	statically linked

Cool. As a test, I dropped the binary in a vanilla Ubuntu container to see if it would run:

$ docker run --rm -it -v /tmp:/app ubuntu

root@699340233eb9:/# /app/spotify_player --help
spotify-player 0.9.3
Thang Pham <phamducthang1234@gmail>
A command driven spotify player

USAGE:
    spotify_player [OPTIONS]

OPTIONS:
    -c, --config-folder <FOLDER>
            Path to the application's config folder (default: $HOME/.config/spotify-player)

    -C, --cache-folder <FOLDER>
            Path to the application's cache folder (default: $HOME/.cache/spotify-player)

    -h, --help
            Print help information

    -t, --theme <THEME>
            Application theme (default: dracula)

    -V, --version
            Print version information

Even cooler!

Summary of changes:

  • Dockerfile:
    • Add musl library support to build container
    • Use rustup to enable building for musl targets
    • Configure environment such that musl libraries are used during the build
  • Config.toml

I don't know anything about Rust or single line of your program but what you made is pretty sweet. Making it dead-simple to install can help more people enjoy it! I'd love to help with these type of Packaging/Release/Distribution challenges.

adding to shared playlist

I am part of a few shared playlists, by that I mean where the owner has enabled the "Collaborative Playlist" function, as seen below
image
I was wondering if there's a possibility to add songs to playlists like that in spotify-player

feature suggestions/requests

1. download the current playing song's album cover into a file or into a cache for another script to use; my usecase for this is to display the album cover with an image viewer, as i missed this feature from playing music with mpv.
2. display the album cover as braille; my usecase for this is with st boxdraw, as it can render braille characters as block. (might be replaced by sixel) viuer backend request, not spotify-player

  1. support querying of status, like in spotify-tui, with the ability for custom format:
ฮป spt playback
๐Ÿ”€ โ–ถ Warakumbla - Hypothermia
  1. support running a command on new song or supply current playing song, data, albumcover file, volume on music event to an external command via configuration, or a really over-engineered fifo.

Daemonize device ?

Currently whenever we leave the TUI, music stops playing. It would be better if music kept playing in the background.

Is such a feature in the roadmap ?

Play/Pause icon

I noticed recently spotify-player switched to this icon for me? Im not sure if im able to configure an option to switch the icon or not, just noticed it one day. I'll keep digging to see if I can change it but figured I'd ask to see if theres an easy fix.
29-07-2022-21-08-34

Default theme.toml throws error.

Describe the bug
Default UI looks horrible, wasn't able to navigate through menu so I decided to plug theme.toml to play around with

To Reproduce
I catch this behavior by creating default theme.toml

Expected behavior
Spotify player will run

Log and backtrace

spotify_player

Error: missing field `selection_background` for key `themes.palette` at line 148 column 1

Screenshots
Default settings give me this look
FastPic.Ru

Environment

  • OS: macOS BigSur 11.6
  • Application version: spotify-player 0.10.0
  • Application features: if applicable, provide cargo features used to build with spotify-player
    cargo install spotify_player --features image --locked
    Additional context

Not working after update to 0.9.0

Hi,
Unfortunately after updating to newest release 0.9.0 player freezes after start. Before updating everything worked fine.
This is what I see now:
image

When I press any key it is not working.
Here is backtrace log:

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        invalid playing context URI: InvalidType,
    ),
    location: Location {
        file: "spotify_player/src/state/player.rs",
        line: 65,
        col: 60,
    },
    can_unwind: true,
}

Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: clone

and log (I have deleted client ID after pasting here):

2022-06-19T17:44:07.311698Z  INFO spotify_player::state: General configurations: AppConfig { theme: "Catppuccin-mocha", client_id: "", app_refresh_duration_in_ms: 32, playback_refresh_duration_in_ms: 0, track_table_item_max_len: 32, enable_media_control: true, default_device: "spotify-player", device: DeviceConfig { name: "spotify-player", device_type: "speaker", volume: 100, bitrate: 160, audio_cache: false } }
2022-06-19T17:44:07.311882Z  INFO spotify_player::state: Theme configurations: ThemeConfig { themes: [Theme { name: "dracula", palette: Palette { background: Color { color: Rgb(30, 31, 41) }, foreground: Color { color: Rgb(248, 248, 242) }, selection_background: Color { color: Rgb(68, 71, 90) }, selection_foreground: Color { color: Rgb(255, 255, 255) }, black: Color { color: Rgb(0, 0, 0) }, blue: Color { color: Rgb(189, 147, 249) }, cyan: Color { color: Rgb(139, 233, 253) }, green: Color { color: Rgb(80, 250, 123) }, magenta: Color { color: Rgb(255, 121, 198) }, red: Color { color: Rgb(255, 85, 85) }, white: Color { color: Rgb(187, 187, 187) }, yellow: Color { color: Rgb(241, 250, 140) }, bright_black: Color { color: Rgb(85, 85, 85) }, bright_white: Color { color: Rgb(255, 255, 255) }, bright_red: Color { color: Rgb(255, 85, 85) }, bright_magenta: Color { color: Rgb(255, 121, 198) }, bright_green: Color { color: Rgb(80, 250, 123) }, bright_cyan: Color { color: Rgb(139, 233, 253) }, bright_blue: Color { color: Rgb(189, 147, 249) }, bright_yellow: Color { color: Rgb(241, 250, 140) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "ayu_light", palette: Palette { background: Color { color: Rgb(250, 250, 250) }, foreground: Color { color: Rgb(92, 103, 115) }, selection_background: Color { color: Rgb(240, 238, 228) }, selection_foreground: Color { color: Rgb(92, 103, 115) }, black: Color { color: Rgb(0, 0, 0) }, blue: Color { color: Rgb(65, 166, 217) }, cyan: Color { color: Rgb(77, 191, 153) }, green: Color { color: Rgb(134, 179, 0) }, magenta: Color { color: Rgb(240, 113, 120) }, red: Color { color: Rgb(255, 51, 51) }, white: Color { color: Rgb(255, 255, 255) }, yellow: Color { color: Rgb(242, 151, 24) }, bright_black: Color { color: Rgb(50, 50, 50) }, bright_white: Color { color: Rgb(255, 255, 255) }, bright_red: Color { color: Rgb(255, 101, 101) }, bright_magenta: Color { color: Rgb(255, 163, 170) }, bright_green: Color { color: Rgb(184, 229, 50) }, bright_cyan: Color { color: Rgb(127, 241, 203) }, bright_blue: Color { color: Rgb(115, 216, 255) }, bright_yellow: Color { color: Rgb(255, 201, 74) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "gruvbox_dark", palette: Palette { background: Color { color: Rgb(30, 30, 30) }, foreground: Color { color: Rgb(230, 212, 163) }, selection_background: Color { color: Rgb(230, 212, 163) }, selection_foreground: Color { color: Rgb(83, 74, 66) }, black: Color { color: Rgb(30, 30, 30) }, blue: Color { color: Rgb(55, 115, 117) }, cyan: Color { color: Rgb(87, 142, 87) }, green: Color { color: Rgb(134, 135, 21) }, magenta: Color { color: Rgb(160, 75, 115) }, red: Color { color: Rgb(190, 15, 23) }, white: Color { color: Rgb(151, 135, 113) }, yellow: Color { color: Rgb(204, 136, 26) }, bright_black: Color { color: Rgb(127, 112, 97) }, bright_white: Color { color: Rgb(230, 212, 163) }, bright_red: Color { color: Rgb(247, 48, 40) }, bright_magenta: Color { color: Rgb(199, 112, 137) }, bright_green: Color { color: Rgb(170, 176, 30) }, bright_cyan: Color { color: Rgb(125, 182, 105) }, bright_blue: Color { color: Rgb(113, 149, 134) }, bright_yellow: Color { color: Rgb(247, 177, 37) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "solarized_light", palette: Palette { background: Color { color: Rgb(253, 246, 227) }, foreground: Color { color: Rgb(101, 123, 131) }, selection_background: Color { color: Rgb(238, 232, 213) }, selection_foreground: Color { color: Rgb(88, 110, 117) }, black: Color { color: Rgb(7, 54, 66) }, blue: Color { color: Rgb(38, 139, 210) }, cyan: Color { color: Rgb(42, 161, 152) }, green: Color { color: Rgb(133, 153, 0) }, magenta: Color { color: Rgb(211, 54, 130) }, red: Color { color: Rgb(220, 50, 47) }, white: Color { color: Rgb(238, 232, 213) }, yellow: Color { color: Rgb(181, 137, 0) }, bright_black: Color { color: Rgb(0, 43, 54) }, bright_white: Color { color: Rgb(253, 246, 227) }, bright_red: Color { color: Rgb(203, 75, 22) }, bright_magenta: Color { color: Rgb(108, 113, 196) }, bright_green: Color { color: Rgb(88, 110, 117) }, bright_cyan: Color { color: Rgb(147, 161, 161) }, bright_blue: Color { color: Rgb(131, 148, 150) }, bright_yellow: Color { color: Rgb(101, 123, 131) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "Catppuccin-mocha", palette: Palette { background: Color { color: Rgb(30, 30, 46) }, foreground: Color { color: Rgb(205, 214, 244) }, selection_background: Color { color: Rgb(49, 50, 68) }, selection_foreground: Color { color: Rgb(205, 214, 244) }, black: Color { color: Rgb(30, 30, 46) }, blue: Color { color: Rgb(137, 180, 250) }, cyan: Color { color: Rgb(137, 220, 235) }, green: Color { color: Rgb(166, 227, 161) }, magenta: Color { color: Rgb(203, 166, 247) }, red: Color { color: Rgb(243, 139, 168) }, white: Color { color: Rgb(205, 214, 244) }, yellow: Color { color: Rgb(249, 226, 175) }, bright_black: Color { color: Rgb(30, 30, 46) }, bright_white: Color { color: Rgb(205, 214, 244) }, bright_red: Color { color: Rgb(243, 139, 168) }, bright_magenta: Color { color: Rgb(203, 166, 247) }, bright_green: Color { color: Rgb(166, 227, 161) }, bright_cyan: Color { color: Rgb(137, 220, 235) }, bright_blue: Color { color: Rgb(137, 180, 250) }, bright_yellow: Color { color: Rgb(249, 226, 175) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "Catppuccin-latte", palette: Palette { background: Color { color: Rgb(239, 241, 245) }, foreground: Color { color: Rgb(76, 79, 105) }, selection_background: Color { color: Rgb(204, 208, 218) }, selection_foreground: Color { color: Rgb(76, 79, 105) }, black: Color { color: Rgb(239, 241, 245) }, blue: Color { color: Rgb(30, 102, 245) }, cyan: Color { color: Rgb(4, 165, 229) }, green: Color { color: Rgb(64, 160, 43) }, magenta: Color { color: Rgb(136, 57, 239) }, red: Color { color: Rgb(210, 15, 57) }, white: Color { color: Rgb(76, 79, 105) }, yellow: Color { color: Rgb(223, 142, 29) }, bright_black: Color { color: Rgb(239, 241, 245) }, bright_white: Color { color: Rgb(76, 79, 105) }, bright_red: Color { color: Rgb(210, 15, 57) }, bright_magenta: Color { color: Rgb(136, 57, 239) }, bright_green: Color { color: Rgb(64, 160, 43) }, bright_cyan: Color { color: Rgb(4, 165, 229) }, bright_blue: Color { color: Rgb(30, 102, 245) }, bright_yellow: Color { color: Rgb(223, 142, 29) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "Catppuccin-frappe", palette: Palette { background: Color { color: Rgb(48, 52, 70) }, foreground: Color { color: Rgb(198, 208, 245) }, selection_background: Color { color: Rgb(65, 69, 89) }, selection_foreground: Color { color: Rgb(198, 208, 245) }, black: Color { color: Rgb(48, 52, 70) }, blue: Color { color: Rgb(140, 170, 238) }, cyan: Color { color: Rgb(137, 220, 235) }, green: Color { color: Rgb(166, 209, 137) }, magenta: Color { color: Rgb(202, 158, 230) }, red: Color { color: Rgb(231, 130, 132) }, white: Color { color: Rgb(198, 208, 245) }, yellow: Color { color: Rgb(229, 200, 144) }, bright_black: Color { color: Rgb(48, 52, 70) }, bright_white: Color { color: Rgb(198, 208, 245) }, bright_red: Color { color: Rgb(231, 130, 132) }, bright_magenta: Color { color: Rgb(202, 158, 230) }, bright_green: Color { color: Rgb(166, 209, 137) }, bright_cyan: Color { color: Rgb(137, 220, 235) }, bright_blue: Color { color: Rgb(140, 170, 238) }, bright_yellow: Color { color: Rgb(229, 200, 144) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }, Theme { name: "Catppuccin-macchiato", palette: Palette { background: Color { color: Rgb(36, 39, 58) }, foreground: Color { color: Rgb(202, 211, 245) }, selection_background: Color { color: Rgb(54, 58, 79) }, selection_foreground: Color { color: Rgb(202, 211, 245) }, black: Color { color: Rgb(36, 39, 58) }, blue: Color { color: Rgb(138, 173, 244) }, cyan: Color { color: Rgb(145, 215, 227) }, green: Color { color: Rgb(166, 218, 149) }, magenta: Color { color: Rgb(198, 160, 246) }, red: Color { color: Rgb(237, 135, 150) }, white: Color { color: Rgb(202, 211, 245) }, yellow: Color { color: Rgb(238, 212, 159) }, bright_black: Color { color: Rgb(36, 39, 58) }, bright_white: Color { color: Rgb(202, 211, 245) }, bright_red: Color { color: Rgb(237, 135, 150) }, bright_magenta: Color { color: Rgb(198, 160, 246) }, bright_green: Color { color: Rgb(166, 218, 149) }, bright_cyan: Color { color: Rgb(145, 215, 227) }, bright_blue: Color { color: Rgb(138, 173, 244) }, bright_yellow: Color { color: Rgb(238, 212, 159) } }, component_style: ComponentStyle { block_title: Style { fg: Some(Magenta), bg: None, modifiers: [] }, playback_track: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, playback_album: Style { fg: Some(Yellow), bg: None, modifiers: [] }, playback_metadata: Style { fg: Some(BrightBlack), bg: None, modifiers: [] }, playback_progress_bar: Style { fg: Some(Green), bg: Some(SelectionBackground), modifiers: [] }, current_playing: Style { fg: Some(Green), bg: None, modifiers: [Bold] }, page_desc: Style { fg: Some(Cyan), bg: None, modifiers: [Bold] }, table_header: Style { fg: Some(Blue), bg: None, modifiers: [] } } }] }
2022-06-19T17:44:07.311939Z  WARN spotify_player::config::keymap: Failed to open the keymap config file (path="/home/mm/.config/spotify-player/keymap.toml"): No such file or directory (os error 2). Use the default configurations instead
2022-06-19T17:44:07.311944Z  INFO spotify_player::state: Keymap configurations: KeymapConfig { keymaps: [Keymap { key_sequence: KeySequence { keys: [None(Char('n'))] }, command: NextTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('p'))] }, command: PreviousTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('.'))] }, command: PlayRandom }, Keymap { key_sequence: KeySequence { keys: [None(Char(' '))] }, command: ResumePause }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('r'))] }, command: Repeat }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('s'))] }, command: Shuffle }, Keymap { key_sequence: KeySequence { keys: [None(Char('+'))] }, command: VolumeUp }, Keymap { key_sequence: KeySequence { keys: [None(Char('-'))] }, command: VolumeDown }, Keymap { key_sequence: KeySequence { keys: [None(Enter)] }, command: ChooseSelected }, Keymap { key_sequence: KeySequence { keys: [None(Char('r'))] }, command: RefreshPlayback }, Keymap { key_sequence: KeySequence { keys: [None(Char('/'))] }, command: Search }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char(' '))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('a'))] }, command: ShowActionsOnSelectedItem }, Keymap { key_sequence: KeySequence { keys: [None(Char('a'))] }, command: ShowActionsOnCurrentTrack }, Keymap { key_sequence: KeySequence { keys: [None(Char('R'))] }, command: RestartIntegratedClient }, Keymap { key_sequence: KeySequence { keys: [None(Tab)] }, command: FocusNextWindow }, Keymap { key_sequence: KeySequence { keys: [None(BackTab)] }, command: FocusPreviousWindow }, Keymap { key_sequence: KeySequence { keys: [None(Char('T'))] }, command: SwitchTheme }, Keymap { key_sequence: KeySequence { keys: [None(Char('D'))] }, command: SwitchDevice }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('p'))] }, command: BrowseUserPlaylists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('a'))] }, command: BrowseUserFollowedArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('u')), None(Char('A'))] }, command: BrowseUserSavedAlbums }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char(' '))] }, command: CurrentlyPlayingContextPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('t'))] }, command: TopTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('r'))] }, command: RecentlyPlayedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('y'))] }, command: LikedTrackPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('l'))] }, command: LibraryPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('g')), None(Char('s'))] }, command: SearchPage }, Keymap { key_sequence: KeySequence { keys: [None(Backspace)] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('q'))] }, command: PreviousPage }, Keymap { key_sequence: KeySequence { keys: [None(Char('?'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('h'))] }, command: OpenCommandHelp }, Keymap { key_sequence: KeySequence { keys: [None(Char('q'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('c'))] }, command: Quit }, Keymap { key_sequence: KeySequence { keys: [None(Esc)] }, command: ClosePopup }, Keymap { key_sequence: KeySequence { keys: [None(Char('j'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('n'))] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Down)] }, command: SelectNextOrScrollDown }, Keymap { key_sequence: KeySequence { keys: [None(Char('k'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [Ctrl(Char('p'))] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Up)] }, command: SelectPreviousOrScrollUp }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('t'))] }, command: SortTrackByTitle }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('a'))] }, command: SortTrackByArtists }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('A'))] }, command: SortTrackByAlbum }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('d'))] }, command: SortTrackByDuration }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('D'))] }, command: SortTrackByAddedDate }, Keymap { key_sequence: KeySequence { keys: [None(Char('s')), None(Char('r'))] }, command: ReverseTrackOrder }] }
2022-06-19T17:44:07.587468Z  INFO spotify_player::auth: Use the cached credentials
2022-06-19T17:44:07.603639Z  INFO spotify_player::token: Getting new authentication token...
2022-06-19T17:44:07.749257Z  INFO spotify_player::token: Got new token: Token { access_token: "BQD6l3udfWGDBd6agpCCnvsjD9h7_fI7TPv_s4DJlesyV7xyBO4jhssN-GVhJAAA47Id32fIo3RnD0oynlh4nehCU4FFg1yn5KI9WdzEPBuieTy8y8P9XDUbcFNgcWnfVHIb-IdAPsPPHnrnCARjKzj9314WV-8nNMuKIj2MSegi0ak0YXjkQw1sctapoqyuPmpfXXq8W100DPh8OKJGLa1sihzdvXSUIEgJzMf72Jrop4tuoONfL2XDooRqXdqzxUo6uB2NOOqxHDiFPvZ6qgR8PPaujaTh5ScKhCnzkhbkwYXMegILLWc", expires_in: Duration { secs: 3600, nanos: 0 }, expires_at: Some(2022-06-19T18:44:07.749255155Z), refresh_token: None, scopes: {} }
2022-06-19T17:44:07.749285Z  INFO spotify_player::streaming: Application's connect configurations: ConnectConfig { name: "spotify-player", device_type: Speaker, initial_volume: Some(65535), has_volume_ctrl: true, autoplay: false }
2022-06-19T17:44:07.749301Z  INFO spotify_player::streaming: Initializing a new integrated player with device_id=bec59faf-81e9-45c2-bd89-7d198649c74a
2022-06-19T17:44:07.749346Z  INFO spotify_player::streaming: Starting an integrated Spotify player using librespot's spirc protocol
2022-06-19T17:44:07.888671Z  INFO spotify_player: No playing device found on startup, trying to connect to an available device
2022-06-19T17:44:07.953870Z  INFO spotify_player::client: Available devices: [Device { id: Some("53151708a54fdc8c7022f0469236644793d75e83"), is_active: false, is_private_session: false, is_restricted: false, name: "SONY KD-65XH9096", _type: Tv, volume_percent: Some(0) }, Device { id: Some("9508fd4e797ec74f0e569750c492d42f3764b108"), is_active: false, is_private_session: false, is_restricted: false, name: "Denon AVR-X1300W", _type: Avr, volume_percent: Some(50) }, Device { id: Some("bec59faf-81e9-45c2-bd89-7d198649c74a"), is_active: false, is_private_session: false, is_restricted: false, name: "spotify-player", _type: Speaker, volume_percent: Some(100) }, Device { id: Some("db7508f61a6fe30e1de35a21a26e08469058a872"), is_active: false, is_private_session: false, is_restricted: false, name: "Maciej's 2nd Fire TV", _type: Tv, volume_percent: Some(100) }]
2022-06-19T17:44:07.953890Z  INFO spotify_player::client: Found an available device: Device { id: Some("bec59faf-81e9-45c2-bd89-7d198649c74a"), is_active: false, is_private_session: false, is_restricted: false, name: "spotify-player", _type: Speaker, volume_percent: Some(100) }
2022-06-19T17:44:07.954171Z  INFO spotify_player::media_control: Initializing application's media control event watcher...
2022-06-19T17:44:08.004573Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 65535 }
2022-06-19T17:44:08.104388Z  INFO Client_request{request=GetCurrentUser}: spotify_player::client: successfully handled the client request, took: 149ms
2022-06-19T17:44:08.113469Z  INFO Client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 159ms
2022-06-19T17:44:08.118630Z  INFO Client_request{request=GetUserFollowedArtists}: spotify_player::client: successfully handled the client request, took: 164ms
2022-06-19T17:44:08.161509Z  INFO Client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 156ms
2022-06-19T17:44:08.184191Z  INFO spotify_player::streaming: Got an event from the integrated player: Started { play_request_id: 0, track_id: SpotifyId { id: 266562458141538119225433542773929850682, audio_type: Track }, position_ms: 80189 }
2022-06-19T17:44:08.184203Z  INFO spotify_player::streaming: Got an event from the integrated player: Loading { play_request_id: 0, track_id: SpotifyId { id: 266562458141538119225433542773929850682, audio_type: Track }, position_ms: 80189 }
2022-06-19T17:44:08.185875Z  INFO Client_request{request=GetUserPlaylists}: spotify_player::client: successfully handled the client request, took: 231ms
2022-06-19T17:44:08.187375Z  INFO Client_request{request=Player(TransferPlayback("bec59faf-81e9-45c2-bd89-7d198649c74a", false))}: spotify_player::client: Transfered the playback to device with bec59faf-81e9-45c2-bd89-7d198649c74a id
2022-06-19T17:44:08.187386Z  INFO Client_request{request=Player(TransferPlayback("bec59faf-81e9-45c2-bd89-7d198649c74a", false))}: spotify_player::client: successfully handled the client request, took: 233ms
2022-06-19T17:44:08.212503Z  INFO Client_request{request=GetUserSavedAlbums}: spotify_player::client: successfully handled the client request, took: 257ms
2022-06-19T17:44:08.291245Z  INFO Client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 107ms
2022-06-19T17:44:08.313411Z  INFO Client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 129ms
2022-06-19T17:44:16.887892Z ERROR Terminal_event{event=Key(KeyEvent { code: Char('s'), modifiers: CONTROL })}: spotify_player::event: Failed to handle event: sending on a closed channel
2022-06-19T17:44:35.026998Z ERROR Terminal_event{event=Key(KeyEvent { code: Char('D'), modifiers: SHIFT })}: spotify_player::event: Failed to handle event: sending on a closed channel

[Feature request] Artist / album / track radio

Hi,

really love the client. However, I really miss the ability to play artist / album / track radios. To me these are really one of the top spotify features, and it would be nice if these could be added.

Thanks!

Queue track

One thing I really miss is the possibility to add a track or album to the queue.
Rspotify has support for this: documentation, so I guess it should be possible?

It would be nice to just be able to press a key (spotify-tui uses 'z' for example, but anything else would be fine) and add the currently selected item to the queue. To be honest, to me this only makes sense for tracks or albums, but maybe you have some other ideas?

Pause glyph is huge

Hi,

Just updated locally to 0.11.0 and will merge it into out repositories soon. Just a thought ...

Play glyph

2023-02-04-183318_1366x768_scrot

Paus glyph

2023-02-04-183903_1366x768_scrot

The paus glyph looks huge :(

add to a new playlist / create a playlist?

I was trying to add a song to a new playlist but I couldn't find the option. Also I think isn't possible to create a new playlist from the user playlist view.

Is there a way to do it?

Sorry for open 2 bugs in 1 day.

tui freezes when closing as a scratchpad

I have the spotify_player app integrated as a scratchpad as i find them very useful, my only problem with it so far is that it freezes when i hide the scratchpad and reopen it again.
Closing the scratchpad completely (with my kill keybind) makes it so that spotify_player won't launch again until i perform a reboot of my system
image

Image above shows me trying to launch it through the terminal (kitty)
Installed from cargo with lyric and image feature on Arch with kernel 5.19.8

Integrated device not shown up "fast enough" on startup

Lately I've noticed that spotify-player is starting without picking the default device (Which is itself). In the config file is like this:

default_device = "artorias"

[device]
name = "artorias"
device_type = "computer"
volume = 100
bitrate = 320
audio_cache = false

So whenever I open the player, I have to choose a device manually (There it's listed) and then I can play music. Is there some kind of race condition or something for picking the default device maybe?

Explicit Albums on Artists Page

Depending on the genre of music (like hip-hop), it's commonplace to release 2 versions of an album: an explicit version and an edited "radio" version. When using the Spotify desktop client, you'll see both albums under an Artist page and can pick the one you want. The Explicit songs are marked with an "E" icon.

With spotify_player, if I am viewing an Artist's page, I seem to only be shown the "radio" version. I noted I can do a global search with the Album name to find both versions and play the explicit version there.

It would be convenient to access the explicit version from the Artists' Albums page too.

Prepare for `v0.5.0` release

spotify-player has changed a lot since the version v0.1.0.

As the application has gradually become quite usable, v0.5.0 is going to be the release to be announced on public forums such as HN and Reddit.

To prepare for this release, things probably need to do:

  • add a file logger.
  • add a library page and use it as the welcoming page.
  • handle playback change events not from interactions with the application's integrated client but from interactions with other clients through Spotify connect.
  • improve README and documentations in general. Add a new demo/examples for v0.5.0-pre-release.

Unable to login

In the Requirements section of README.md it says

A Spotify Premium account is recommended to enable all application's supported features.

But without Spotify Premium account I could not log in by entering a correct password (I checked on the sporify website). The error was Failed to authenticate.

Cargo install issue

Describe the bug
Installing spotify-player via cargo gives a build error

To Reproduce
Run cargo install spotify_player --features image

Expected behavior
The build should happen successfully

Error message

Compiling viuer v0.6.2
   Compiling rspotify v0.11.6
   Compiling dirs-next v2.0.0
   Compiling rpassword v7.2.0
   Compiling config_parser2 v0.1.4
   Compiling librespot-connect v0.4.2
   Compiling toml v0.5.11
   Compiling lru v0.8.1
   Compiling spotify_player v0.10.0
error[E0053]: method `parse` has an incompatible type for trait
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/spotify_player-0.10.0/src/config/mod.rs:20:30
   |
20 | #[derive(Debug, Deserialize, ConfigParse)]
   |                              ^^^^^^^^^^^
   |                              |
   |                              expected enum `toml::value::Value`, found enum `toml::Value`
   |                              help: change the parameter type to match the trait: `toml::value::Value`
   |
   = note: expected fn pointer `fn(&mut AppConfig, toml::value::Value) -> std::result::Result<_, _>`
              found fn pointer `fn(&mut AppConfig, toml::Value) -> std::result::Result<_, _>`
   = note: this error originates in the derive macro `ConfigParse` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0053]: method `parse` has an incompatible type for trait
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/spotify_player-0.10.0/src/config/mod.rs:57:30
   |
57 | #[derive(Debug, Deserialize, ConfigParse, Clone)]
   |                              ^^^^^^^^^^^
   |                              |
   |                              expected enum `toml::value::Value`, found enum `toml::Value`
   |                              help: change the parameter type to match the trait: `toml::value::Value`
   |
   = note: expected fn pointer `fn(&mut DeviceConfig, toml::value::Value) -> std::result::Result<_, _>`
              found fn pointer `fn(&mut DeviceConfig, toml::Value) -> std::result::Result<_, _>`
   = note: this error originates in the derive macro `ConfigParse` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/spotify_player-0.10.0/src/config/mod.rs:20:30
   |
20 | #[derive(Debug, Deserialize, ConfigParse)]
   |                              ^^^^^^^^^^^
   |                              |
   |                              expected enum `toml::value::Value`, found enum `toml::Value`
   |                              arguments to this function are incorrect
   |
   = note: enum `toml::Value` and enum `toml::value::Value` have similar names, but are actually distinct types
note: enum `toml::Value` is defined in crate `toml`
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.5.11/src/value.rs:22:1
   |
22 | pub enum Value {
   | ^^^^^^^^^^^^^^
note: enum `toml::value::Value` is defined in crate `toml`
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.7.1/src/value.rs:25:1
   |
25 | pub enum Value {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `toml` are being used?
note: associated function defined here
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/config_parser2-0.1.4/src/lib.rs:4:8
   |
4  |     fn parse(&mut self, value: toml::Value) -> Result<()>;
   |        ^^^^^
   = note: this error originates in the derive macro `ConfigParse` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/spotify_player-0.10.0/src/config/mod.rs:57:30
   |
57 | #[derive(Debug, Deserialize, ConfigParse, Clone)]
   |                              ^^^^^^^^^^^
   |                              |
   |                              expected enum `toml::value::Value`, found enum `toml::Value`
   |                              arguments to this function are incorrect
   |
   = note: enum `toml::Value` and enum `toml::value::Value` have similar names, but are actually distinct types
note: enum `toml::Value` is defined in crate `toml`
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.5.11/src/value.rs:22:1
   |
22 | pub enum Value {
   | ^^^^^^^^^^^^^^
note: enum `toml::value::Value` is defined in crate `toml`
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.7.1/src/value.rs:25:1
   |
25 | pub enum Value {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `toml` are being used?
note: associated function defined here
  --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/config_parser2-0.1.4/src/lib.rs:4:8
   |
4  |     fn parse(&mut self, value: toml::Value) -> Result<()>;
   |        ^^^^^
   = note: this error originates in the derive macro `ConfigParse` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: `?` operator has incompatible types
   --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/spotify_player-0.10.0/src/config/mod.rs:135:28
    |
135 |                 self.parse(toml::from_str::<toml::Value>(&content)?)?;
    |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `toml::value::Value`, found enum `toml::Value`
    |
    = note: `?` operator cannot convert from `toml::Value` to `toml::value::Value`
    = note: enum `toml::Value` and enum `toml::value::Value` have similar names, but are actually distinct types
note: enum `toml::Value` is defined in crate `toml`
   --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.5.11/src/value.rs:22:1
    |
22  | pub enum Value {
    | ^^^^^^^^^^^^^^
note: enum `toml::value::Value` is defined in crate `toml`
   --> /Users/sloff/.cargo/registry/src/github.com-1ecc6299db9ec823/toml-0.7.1/src/value.rs:25:1
    |
25  | pub enum Value {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `toml` are being used?

Some errors have detailed explanations: E0053, E0308.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `spotify_player` due to 5 previous errors
error: failed to compile `spotify_player v0.10.0`, intermediate artifacts can be found at `/var/folders/2y/5qx2g9s551s2tcrvmvh092d00000gn/T/cargo-installiFubNE`

Environment

  • OS: MacOS
  • Application version: 0.10.0
  • Application features: image

very high cpu usage??

i have noticed that with spotify_player, it causes the cpu usage to increase and my computer fans ramp up the speed due to the usage.

image

what the fuck is spotify_player doing? i'm not even doing anything.

Allow Themes to feature Specified Background Image Files instead of Colors

Honestly, everything about this is amazing.

The only thing I can request is being able to add background Images to themes to override background colors. It's the only thing really missing from this. (Either that or have an option to default to Terminal BG)

Thanks so much for working on this project!

cannot play songs with alsa via rodio

Got a panic: PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: StreamError(BuildStreamError(BackendSpecific { err: BackendSpecificError { description: "ALSA function 'snd_pcm_sw_params' failed with error 'EINVAL: Invalid argument'" } })),
    ),
    location: Location {
        file: "/home/wael/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/librespot-playback-0.4.2/src/audio_backend/rodio.rs",
        line: 178,
        col: 53,
    },
    can_unwind: true,
}

Stack backtrace:
   0: spotify_player::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: librespot_playback::audio_backend::rodio::mk_rodio
   8: std::sys_common::backtrace::__rust_begin_short_backtrace
   9: core::ops::function::FnOnce::call_once{{vtable.shim}}
  10: std::sys::unix::thread::Thread::new::thread_start
  11: <unknown>
  12: <unknown>

using default features: "rodio-backend", "media-control"

what media control suppose to do?

It's not clear what media control suppose to do, I have activated it in macos building the application with the media-control feature flag and adding enable_media_control set to true in the app.toml file inside .config.

It's not making anything... What is supposed to do?

By the way, excellent work, the best spotify tui I could find (I have tried a lot).

Wrong image rendering aspect ratio in Kitty

Hi

I really like spotify-player. From my brief testing I think it's probably the best command-line Spotify client and fully warrants my star!

I have compiled the program with a few extras like image rendering which display as high res graphics in Kitty. But the images are displayed in the wrong aspect ratio in Kitty. They display in the correct aspect ratio in WezTerm but that terminal emulator seems to use a lot more CPU cycles when running spotify-player than Kitty does.

Just as an aside, are there keyboard shortcuts to jump forward and back in a track? I know there's mouse support to do this, but is it possible with the keyboard too? The volume defaults to 50 which seems a strange default. I have fixed this with setting volume = 90 in [device] within app.toml but is there any reason why the default is low?

Default device

Just one more question. Each time I open spotify-player it starts using my TV as a device and music starts there. Is there an option to set my computer as a default device (player detects 3 devices that I have - my computer, TV and Denon player)?

dynamic config/theme reload?

I was wondering if there is a way to have the config/theme of spotify-player reload when the app.toml file is changed? particularly when a theme is changed. I know the SwitchTheme command works great, however if there is any option to repeatedly scan for the theme and update it would be nice

Offline mode

It would be nice to add offline mode support mode for spotify-player.

Initial ideas:

  • use embedded DB (sqlite) to store song's data/metadata
    • librespot already supports download tracks via audio caches (not sure about the integrability of the feature)
  • add --offline option to run the app in offline mode

volume up and down in the TUI is slow (yes it's that slow)

To Reproduce
press + or - in the TUI.

Expected behavior
the volume is changed quickly.

Log and backtrace

2023-01-17T18:16:02.584287Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 881ms
2023-01-17T18:16:02.645004Z  INFO client_request{request=Player(Volume(65))}: spotify_player::client: successfully handled the client request, took: 1943ms
2023-01-17T18:16:02.789889Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 910ms
2023-01-17T18:16:02.794967Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:02.795170Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:02.795421Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 42598 }
2023-01-17T18:16:02.805218Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 394ms
2023-01-17T18:16:02.908913Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 872ms
2023-01-17T18:16:03.050788Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.050805Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.189504Z  INFO client_request{request=Player(Volume(70))}: spotify_player::client: successfully handled the client request, took: 868ms
2023-01-17T18:16:03.244697Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 449ms
2023-01-17T18:16:03.245835Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 450ms
2023-01-17T18:16:03.347952Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 552ms
2023-01-17T18:16:03.434754Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 383ms
2023-01-17T18:16:03.435040Z  INFO spotify_player::streaming: Got an event from the integrated player: VolumeSet { volume: 45875 }
2023-01-17T18:16:03.658299Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 607ms
2023-01-17T18:16:03.831520Z  INFO client_request{request=GetCurrentPlayback}: spotify_player::client: successfully handled the client request, took: 396ms

Additional context
I would like to point out that changing the volume from Spotify's Mobile or Web or Desktop client is very quick, compared to the TUI.

MPRIS support?

Hi there! Just found this project. It looks great! Congratulations on it.

Do you plan on adding MPRIS support so it can be controlled with media keys on Linux?

Release `v0.1.0`

TODO list

  • add a demo/examples
  • add documentation
    • installation
      • installation media
        • add an AUR package
      • setup guide for using Spotify APIs
    • commands
    • keymaps
    • other configurations
  • add application introduction
  • roadmap?

Stuck Loading Large Playlist

Firstly I would like to say that I love this project but I have this one problem with it so far.

When I try to open a larger playlist that I have I run into problems, it gets stuck loading the playlist. But playback of the last item still works.

The issue title says that there is an issue opening large playlists but from what I could determine from the log files that I was looking through this looks like an issue with parsing specific PlayableItems If there is anything that you can to to look into this that would be great here is a section of the logs that I thought was important. If you need more log info let me know.

2021-11-08T17:47:49.309565Z DEBUG reqwest::async_impl::client: response '200 OK' for https://api.spotify.com/v1/playlists/2RI4NLi6npcHfCNQQxP3nM/tracks?offset=900&limit=100    
2021-11-08T17:47:49.329055Z DEBUG hyper::proto::h1::conn: incoming body completed
2021-11-08T17:47:49.329091Z DEBUG hyper::client::pool: pooling idle connection for ("https", api.spotify.com)
2021-11-08T17:47:49.345084Z  WARN spotify_player::client::handlers: failed to handle client request: error decoding response body: data did not match any variant of untagged enum PlayableItem at line 7643 column 5

Caused by:
    data did not match any variant of untagged enum PlayableItem at line 7643 column 5
2021-11-08T17:47:51.117104Z DEBUG librespot_audio::fetch: File bbc67baf52a28dab4cfec9e348ae0135a955596b complete, saving to cache

Installing Image + Lyric_Finder Issues with Aur PKGBuild

Tried to Install spotify-player with Image and Lyric_Finder unfortunately Image does not have Binaries and is just a library and should hence be listed as a dependencies rather than as a package.

Uncertain but it should be clarified that lyric_finder is the name and not lyric-finder as the github page states.

Uncertain what the PKGBuild would look like may need to wait for an update to list Image as a dependency in cargo.lock assumedly as just adding to build():

cargo build --locked --release --features image, lyric_finder would work unless dependencies work differently

and package() adding:

cargo install --features image, lyric_finder.

Did not work.

Anyways, I wait for an update that may fix these build issues. Cheers.

I tried installing with Cargo but it got messier as I couldn't specify the playback backend and had the same issues, as well.

Also no clue if lyric_finder has the same problems as Image or not. Image is not a binary and has to be set as a [dependencies]. It would error out immediately.

Again, if you could show the modified PKGBUILD that would feature image and lyric_finder that would be appreciated unless there is an issue in the cargo.lock file as I suspect.

Repeat a single track

Hello :)

Thank you very much for this great project.

I was wondering if it's possible to repeat a single track? So far, I only found these 2 options:

  1. Repeat context
  2. Off

Thank you for your help!

Allow configuring the ap_port

The proxy at my work is really strict on outgoing ports. I see from the librespot logs that most of the time, for authentication, the ap tries to connect to a server using port 4070 (e.g. ap-gew1.spotify.com:4070). This times out in the end, because the port is blocked.

I did a quick hack here:

SessionConfig::default(),

and here:

match Session::connect(SessionConfig::default(), creds, Some(cache.clone()), true).await

To use a SessionConfig with ap_port Some(443) instead of the defaults, and now the app works.

Would it be possible to implement a possibility to configure this port in the config file?

Thanks!

Failing to start playing with a large number of tracks

Hi, I have been having an small issue with spotify-player. For some reason when I hit play in my liked tracks nothing plays at all. However if I was already playing the liked tracks playlist in some other device, like my phone, and then just change to spotify-player, the playlist continue without any hitch, which is the roundabout I have been using.

Here is the log:

spotify-player-22-09-06-11:51.log

spotify_player fails to play any track, Spotify changes?

@aome510

The player jumps through songs and when reaching the end of the list it starts over again. Killing the app is the only way out of this loop.

Attached the log file, although it generates several of these one after the other.

Backtraces are empty :(

ClientID has been hidden on the log file.

If you need to check my configurations see, https://codeberg.org/pin/leftwm-netbsd/src/branch/main/.config/spotify-player

spotify-player-22-08-04-09:32.log

EDIT: Downgraded to 0.9.3 and the bug is already present there. I've been on holiday and just pushed the updates.
Downgraded to 0.9.2 and it's the same, then downgraded to 0.9.0 and the same happens.

I'm lost, I start to think that something else is causing this. I've also built 0.8.0 just to be sure, as I know this one worked before and it does the same :(
I've no clue how to fix this or what is causing it.

StreamError - not working

I have installed player from AUR (btw it is still 0.5.1 version) and it is not working. This is what i see (look at the playlist - was not able to copy this error):
image

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.