Giter Site home page Giter Site logo

aome510 / spotify-player Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 68.0 2.65 MB

A Spotify player in the terminal with full feature parity

License: MIT License

Rust 99.36% Dockerfile 0.12% Python 0.40% Shell 0.05% Emacs Lisp 0.08%
cli music music-player player rust spotify spotify-api spotify-tui terminal terminal-based tui vim

spotify-player's People

Contributors

0323pin avatar aome510 avatar apprehensions avatar benecollyridam avatar bkasin avatar braheezy avatar cobbinma avatar daschw avatar drrckchng avatar f1nbar avatar felixkroemer avatar fuyukai avatar hyperpuncher avatar jesyspa avatar justjokiing avatar lucasfa avatar m-torhan avatar massivebird avatar micleo2 avatar nuugen avatar rashil2000 avatar rileyallyn avatar rubenvandeven avatar schnouki avatar sebrollen avatar toh995 avatar venmolom avatar viniciusandr avatar whiskyplausible 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

spotify-player's Issues

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.

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.

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.

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

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!

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

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 :(

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.

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]

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 :)

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.

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.

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"

[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!

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

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

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.

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?

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

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?

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.

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!

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?

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

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.

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

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

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?

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!

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

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.

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).

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

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.

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

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.

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?

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)?

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?

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 ?

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

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?

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

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)?

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

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.

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.