hrkfdn / ncspot

Cross-platform ncurses Spotify client written in Rust, inspired by ncmpc and the likes.
BSD 2-Clause "Simplified" License
4.93k stars 205 forks source link

`use_nerdfont` broken on MacOS #824

Closed isinyaaa closed 11 months ago

isinyaaa commented 2 years ago

Describe the bug Enabling the option with nerdfonts installed does not work properly

To Reproduce Steps to reproduce the behavior:

  1. Install nerdfonts in your system
  2. Enable the setting on ncspot
  3. Open ncspot
  4. Look at status bar icons

Expected behavior Nerdfonts should work

Screenshots

image

System (please complete the following information):

Backtrace/Debug log

stderr.log

```raw warning: unused import: `error` --> src/queue.rs:5:18 | 5 | use log::{debug, error, info}; | ^^^^^ | = note: `#[warn(unused_imports)]` on by default warning: field is never read: `notification_id` --> src/queue.rs:41:5 | 41 | notification_id: Arc, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default warning: function is never used: `cache_path_for_url` --> src/utils.rs:23:8 | 23 | pub fn cache_path_for_url(url: String) -> std::path::PathBuf { | ^^^^^^^^^^^^^^^^^^ warning: function is never used: `download` --> src/utils.rs:29:8 | 29 | pub fn download(url: String, path: std::path::PathBuf) -> Result<(), std::io::Error> { | ^^^^^^^^ warning: associated function is never used: `cover_url` --> src/model/playable.rs:85:12 | 85 | pub fn cover_url(&self) -> Option { | ^^^^^^^^^ warning: `ncspot` (bin "ncspot") generated 5 warnings Finished dev [unoptimized + debuginfo] target(s) in 0.28s Running `target/debug/ncspot -d debug.log` ```

debug.log

```raw [2022-06-04][17:15:55] [ncspot] [INFO] Using cached credentials [2022-06-04][17:15:55] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:15:55] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE [2022-06-04][17:15:55] [want] [TRACE] signal: Want [2022-06-04][17:15:55] [want] [TRACE] signal found waiting giver, notifying [2022-06-04][17:15:55] [want] [TRACE] poll_want: taker wants! [2022-06-04][17:15:55] [want] [TRACE] signal: Want [2022-06-04][17:15:55] [want] [TRACE] signal: Want [2022-06-04][17:15:55] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-04][17:15:55] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE [2022-06-04][17:15:55] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:15:55] [want] [TRACE] signal: Closed [2022-06-04][17:15:56] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-04][17:15:56] [librespot_core::session] [DEBUG] new Session[0] [2022-06-04][17:15:56] [librespot_core::session] [DEBUG] Session[0] strong=1 weak=1 [2022-06-04][17:15:56] [librespot_core::session] [INFO] Country: "BR" [2022-06-04][17:15:56] [librespot_core::session] [DEBUG] drop Session[0] [2022-06-04][17:15:56] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:15:56] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:15:56] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-04][17:15:56] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:15:56] [ncspot::theme] [WARN] Failed to parse color in "search_match", falling back to default [2022-06-04][17:15:56] [ncspot::spotify] [INFO] setting volume to 65535 [2022-06-04][17:18:28] [ncspot] [INFO] Using cached credentials [2022-06-04][17:18:28] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:18:28] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE [2022-06-04][17:18:28] [want] [TRACE] signal: Want [2022-06-04][17:18:28] [want] [TRACE] signal found waiting giver, notifying [2022-06-04][17:18:28] [want] [TRACE] poll_want: taker wants! [2022-06-04][17:18:28] [want] [TRACE] signal: Want [2022-06-04][17:18:28] [want] [TRACE] signal: Want [2022-06-04][17:18:28] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-04][17:18:28] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE [2022-06-04][17:18:28] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:18:28] [want] [TRACE] signal: Closed [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] writing; remaining=280 [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-04][17:18:29] [librespot_core::session] [DEBUG] new Session[0] [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [librespot_core::session] [DEBUG] Session[0] strong=1 weak=1 [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [librespot_core::session] [INFO] Country: "BR" [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:18:29] [librespot_core::session] [DEBUG] drop Session[0] [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] writing; remaining=11 [2022-06-04][17:18:29] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:18:29] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-04][17:18:29] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:18:29] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:18:29] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:18:29] [ncspot::theme] [WARN] Failed to parse color in "search_match", falling back to default [2022-06-04][17:18:29] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:18:29] [ncspot::spotify] [INFO] setting volume to 65535 [2022-06-04][17:21:48] [ncspot] [INFO] Using cached credentials [2022-06-04][17:21:48] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:21:48] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE [2022-06-04][17:21:48] [want] [TRACE] signal: Want [2022-06-04][17:21:48] [want] [TRACE] signal found waiting giver, notifying [2022-06-04][17:21:48] [want] [TRACE] poll_want: taker wants! [2022-06-04][17:21:48] [want] [TRACE] signal: Want [2022-06-04][17:21:48] [want] [TRACE] signal: Want [2022-06-04][17:21:48] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-04][17:21:48] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE [2022-06-04][17:21:48] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:21:48] [want] [TRACE] signal: Closed [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] writing; remaining=280 [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:21:49] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-04][17:21:49] [librespot_core::session] [DEBUG] new Session[0] [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:21:49] [librespot_core::session] [DEBUG] drop Session[0] [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:21:49] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:21:49] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:21:49] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:21:49] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:21:49] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:21:49] [ncspot::theme] [WARN] Failed to parse color in "search_match", falling back to default [2022-06-04][17:21:49] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:21:49] [ncspot::spotify] [INFO] setting volume to 65535 [2022-06-04][17:23:26] [ncspot] [INFO] Using cached credentials [2022-06-04][17:23:26] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:23:26] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE [2022-06-04][17:23:26] [want] [TRACE] signal: Want [2022-06-04][17:23:26] [want] [TRACE] signal found waiting giver, notifying [2022-06-04][17:23:26] [want] [TRACE] poll_want: taker wants! [2022-06-04][17:23:26] [want] [TRACE] signal: Want [2022-06-04][17:23:26] [want] [TRACE] signal: Want [2022-06-04][17:23:26] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-04][17:23:26] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE [2022-06-04][17:23:26] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:23:26] [want] [TRACE] signal: Closed [2022-06-04][17:23:26] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:23:26] [tokio_util::codec::framed_impl] [TRACE] writing; remaining=280 [2022-06-04][17:23:26] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] attempting to decode a frame [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] frame decoded from buffer [2022-06-04][17:23:27] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-04][17:23:27] [librespot_core::session] [DEBUG] new Session[0] [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:23:27] [librespot_core::session] [DEBUG] drop Session[0] [2022-06-04][17:23:27] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] flushing framed transport [2022-06-04][17:23:27] [tokio_util::codec::framed_impl] [TRACE] framed transport flushed [2022-06-04][17:23:27] [mio::poll] [TRACE] deregistering event source from poller [2022-06-04][17:23:27] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:23:27] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-04][17:23:27] [ncspot::theme] [WARN] Failed to parse color in "search_match", falling back to default [2022-06-04][17:23:27] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-04][17:23:27] [ncspot::spotify] [INFO] setting volume to 65535 [2022-06-05][22:20:54] [ncspot] [INFO] Using cached credentials [2022-06-05][22:20:54] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-05][22:20:54] [mio::poll] [TRACE] registering event source with poller: token=Token(0), interests=READABLE | WRITABLE [2022-06-05][22:20:54] [want] [TRACE] signal: Want [2022-06-05][22:20:54] [want] [TRACE] signal found waiting giver, notifying [2022-06-05][22:20:54] [want] [TRACE] poll_want: taker wants! [2022-06-05][22:20:54] [want] [TRACE] signal: Want [2022-06-05][22:20:54] [want] [TRACE] signal: Want [2022-06-05][22:20:54] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-05][22:20:54] [mio::poll] [TRACE] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE [2022-06-05][22:20:54] [mio::poll] [TRACE] deregistering event source from poller [2022-06-05][22:20:54] [want] [TRACE] signal: Closed [2022-06-05][22:20:55] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-05][22:20:55] [librespot_core::session] [DEBUG] new Session[0] [2022-06-05][22:20:55] [librespot_core::session] [DEBUG] Session[0] strong=1 weak=1 [2022-06-05][22:20:55] [librespot_core::session] [INFO] Country: "BR" [2022-06-05][22:20:55] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-05][22:20:55] [ncspot::theme] [WARN] Failed to parse color in "background", falling back to default [2022-06-05][22:20:55] [ncspot::theme] [WARN] Failed to parse color in "search_match", falling back to default [2022-06-05][22:20:55] [librespot_core::session] [DEBUG] drop Session[0] [2022-06-05][22:20:55] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-05][22:20:55] [mio::poll] [TRACE] deregistering event source from poller [2022-06-05][22:20:55] [ncspot::spotify] [DEBUG] opening spotify session [2022-06-05][22:20:55] [ncspot::spotify] [DEBUG] No HTTP proxy set [2022-06-05][22:20:55] [mio::poll] [TRACE] registering event source with poller: token=Token(16777217), interests=READABLE | WRITABLE [2022-06-05][22:20:55] [want] [TRACE] signal: Want [2022-06-05][22:20:55] [want] [TRACE] signal found waiting giver, notifying [2022-06-05][22:20:55] [want] [TRACE] poll_want: taker wants! [2022-06-05][22:20:55] [want] [TRACE] signal: Want [2022-06-05][22:20:55] [want] [TRACE] signal: Want [2022-06-05][22:20:55] [librespot_core::session] [INFO] Connecting to AP "ap-guc3.spotify.com:4070" [2022-06-05][22:20:55] [mio::poll] [TRACE] registering event source with poller: token=Token(16777216), interests=READABLE | WRITABLE [2022-06-05][22:20:55] [mio::poll] [TRACE] deregistering event source from poller [2022-06-05][22:20:55] [want] [TRACE] signal: Closed [2022-06-05][22:20:56] [librespot_core::session] [INFO] Authenticated as "isabellabdoamaral" ! [2022-06-05][22:20:56] [librespot_core::session] [DEBUG] new Session[1] [2022-06-05][22:20:56] [ncspot::spotify] [INFO] setting volume to 65535 [2022-06-05][22:20:56] [librespot_playback::mixer::softmixer] [INFO] Mixing with softvol and volume control: Log(60.0) [2022-06-05][22:20:56] [ncspot::spotify_api] [INFO] Token will expire in -PT0.930086S, renewing [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Type: Auto [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Pregain: -10.0 dB [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Threshold: -2.0 dBFS [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Method: Dynamic [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Attack: 5 ms [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Release: 100 ms [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] Normalisation Knee: 5 dB [2022-06-05][22:20:56] [ncspot::spotify] [DEBUG] worker thread ready. [2022-06-05][22:20:56] [librespot_playback::player] [DEBUG] new Player[1] [2022-06-05][22:20:56] [librespot_playback::convert] [INFO] Converting with ditherer: tpdf [2022-06-05][22:20:56] [librespot::component] [DEBUG] new MercuryManager [2022-06-05][22:20:56] [librespot_playback::audio_backend::portaudio] [INFO] Using PortAudio sink with format: S16 [2022-06-05][22:20:56] [librespot_core::session] [DEBUG] Session[1] strong=3 weak=2 [2022-06-05][22:20:56] [librespot_core::session] [INFO] Country: "BR" [2022-06-05][22:21:01] [rustls::client::hs] [DEBUG] Using ciphersuite TLS13_AES_256_GCM_SHA384 [2022-06-05][22:21:01] [rustls::client::tls13] [DEBUG] Resuming using PSK [2022-06-05][22:21:01] [rustls::conn] [TRACE] Dropping CCS [2022-06-05][22:21:01] [rustls::client::tls13] [DEBUG] TLS1.3 encrypted extensions: [] [2022-06-05][22:21:01] [rustls::client::hs] [DEBUG] ALPN protocol is None [2022-06-05][22:21:01] [ureq::stream] [DEBUG] created stream: TcpStream { addr: [2804:14c:34:220f:1d3a:cba6:5449:5eb]:63428, peer: [2600:1901:1:c36::]:443, fd: 13 } [2022-06-05][22:21:01] [ureq::unit] [DEBUG] sending request GET https://api.spotify.com/v1/me/tracks?offset=300&limit=50&market=from_token [2022-06-05][22:21:01] [ureq::unit] [DEBUG] writing prelude: GET /v1/me/tracks?offset=300&limit=50&market=from_token HTTP/1.1 Host: api.spotify.com User-Agent: ureq/2.4.0 Accept: */* authorization: *** [2022-06-05][22:21:01] [rustls::client::tls13] [DEBUG] Ticket saved [2022-06-05][22:21:01] [rustls::client::tls13] [DEBUG] Ticket saved [2022-06-05][22:21:01] [ureq::unit] [DEBUG] response 200 to GET https://api.spotify.com/v1/me/following?type=artist&limit=50&after=5kanrcJl2KaWNzmrIT58vf [2022-06-05][22:21:01] [ncspot::commands] [DEBUG] saving state, 0 items, current track: None [2022-06-05][22:21:01] [ncspot::config] [DEBUG] saving user state to /Users/isinyaaa/.config/ncspot/userstate.cbor [2022-06-05][22:21:01] [ncspot::spotify_worker] [DEBUG] Worker thread is shutting down, stopping player [2022-06-05][22:21:01] [librespot_core::session] [DEBUG] drop Dispatch [2022-06-05][22:21:01] [mio::poll] [TRACE] deregistering event source from poller [2022-06-05][22:21:01] [librespot_playback::player] [DEBUG] command=Stop [2022-06-05][22:21:01] [librespot_playback::player] [DEBUG] Shutting down player thread ... [2022-06-05][22:21:01] [librespot_playback::player] [DEBUG] drop PlayerInternal[1] [2022-06-05][22:21:01] [librespot_core::session] [DEBUG] drop Session[1] [2022-06-05][22:21:01] [librespot::component] [DEBUG] drop MercuryManager [2022-06-05][22:21:01] [librespot_playback::player] [DEBUG] PlayerInternal thread finished. ````

isinyaaa commented 2 years ago

@hrkfdn I updated this with the logs by commenting out the cache option and re-compiling :).

cfebs commented 1 year ago

@isinyaaa it's been a while, but try building latest. https://github.com/hrkfdn/ncspot/pull/1093 made it in which may help

isinyaaa commented 1 year ago

@isinyaaa it's been a while, but try building latest. #1093 made it in which may help

Hey thanks a lot for fixing this :) I'm still getting some weird behavior on the progress bar, but this may be unrelated.