From a3ad8eb962effb5e4ad2657787cf44caf996cb57 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Tue, 9 Feb 2021 03:11:38 +0000 Subject: [PATCH 1/4] Remove Travis as CI test --- .travis.yml | 73 ----------------------------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6887d9f8..00000000 --- a/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -language: rust -rust: - - 1.40.0 - - stable - - beta - - nightly - -# Need to cache the whole `.cargo` directory to keep .crates.toml for -# cargo-update to work -cache: - directories: - - /home/travis/.cargo - -# But don't cache the cargo registry -before_cache: - - rm -rf /home/travis/.cargo/registry - -matrix: - # Performance tweak - fast_finish: true - # Ignore failures in nightly, not ideal, but necessary - allow_failures: - - rust: nightly - - # Only run the formatting check for stable - include: - - name: 'Rust: format check' - rust: stable - install: - - rustup component add rustfmt - script: - - cargo fmt --verbose --all -- --check - -addons: - apt: - packages: - - gcc-arm-linux-gnueabihf - - libc6-dev-armhf-cross - - libpulse-dev - - portaudio19-dev - - libasound2-dev - - libsdl2-dev - - gstreamer1.0-dev - - libgstreamer-plugins-base1.0-dev - -before_script: - - mkdir -p ~/.cargo - - echo '[target.armv7-unknown-linux-gnueabihf]' > ~/.cargo/config - - echo 'linker = "arm-linux-gnueabihf-gcc"' >> ~/.cargo/config - - rustup target add armv7-unknown-linux-gnueabihf - -script: - - cargo build --locked --no-default-features - - cargo build --locked --examples - - cargo build --locked --no-default-features --features "with-tremor" - - cargo build --locked --no-default-features --features "with-vorbis" - - cargo build --locked --no-default-features --features "alsa-backend" - - cargo build --locked --no-default-features --features "portaudio-backend" - - cargo build --locked --no-default-features --features "pulseaudio-backend" - - cargo build --locked --no-default-features --features "jackaudio-backend" - - cargo build --locked --no-default-features --features "rodio-backend" - - cargo build --locked --no-default-features --features "sdl-backend" - - cargo build --locked --no-default-features --features "gstreamer-backend" - - cargo build --locked --no-default-features --target armv7-unknown-linux-gnueabihf - -notifications: - email: false - webhooks: - urls: - - https://webhooks.gitter.im/e/780b178b15811059752e - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always From deabf1f9157559c0e01416b21f0c35a8d729f7f9 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Tue, 9 Feb 2021 03:16:40 +0000 Subject: [PATCH 2/4] Minor updates to discovery and device types --- connect/src/discovery.rs | 5 ++++- core/src/config.rs | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/connect/src/discovery.rs b/connect/src/discovery.rs index 9779e6f8..b53070d7 100644 --- a/connect/src/discovery.rs +++ b/connect/src/discovery.rs @@ -75,7 +75,7 @@ impl Discovery { "status": 101, "statusString": "ERROR-OK", "spotifyError": 0, - "version": "2.1.0", + "version": "2.7.1", "deviceID": (self.0.device_id), "remoteName": (self.0.config.name), "activeUser": "", @@ -85,6 +85,9 @@ impl Discovery { "accountReq": "PREMIUM", "brandDisplayName": "librespot", "modelDisplayName": "librespot", + "resolverVersion": "0", + "groupStatus": "NONE", + "voiceSupport": "NO", }); let body = result.to_string(); diff --git a/core/src/config.rs b/core/src/config.rs index 12c1b2ed..60cb66e0 100644 --- a/core/src/config.rs +++ b/core/src/config.rs @@ -36,6 +36,16 @@ pub enum DeviceType { AVR = 6, STB = 7, AudioDongle = 8, + GameConsole = 9, + CastAudio = 10, + CastVideo = 11, + Automobile = 12, + Smartwatch = 13, + Chromebook = 14, + UnknownSpotify = 100, + CarThing = 101, + Observer = 102, + HomeThing = 103, } impl FromStr for DeviceType { @@ -51,6 +61,14 @@ impl FromStr for DeviceType { "avr" => Ok(AVR), "stb" => Ok(STB), "audiodongle" => Ok(AudioDongle), + "gameconsole" => Ok(GameConsole), + "castaudio" => Ok(CastAudio), + "castvideo" => Ok(CastVideo), + "automobile" => Ok(Automobile), + "smartwatch" => Ok(Smartwatch), + "chromebook" => Ok(Chromebook), + "carthing" => Ok(CarThing), + "homething" => Ok(HomeThing), _ => Err(()), } } @@ -69,6 +87,16 @@ impl fmt::Display for DeviceType { AVR => f.write_str("AVR"), STB => f.write_str("STB"), AudioDongle => f.write_str("AudioDongle"), + GameConsole => f.write_str("GameConsole"), + CastAudio => f.write_str("CastAudio"), + CastVideo => f.write_str("CastVideo"), + Automobile => f.write_str("Automobile"), + Smartwatch => f.write_str("Smartwatch"), + Chromebook => f.write_str("Chromebook"), + UnknownSpotify => f.write_str("UnknownSpotify"), + CarThing => f.write_str("CarThing"), + Observer => f.write_str("Observer"), + HomeThing => f.write_str("HomeThing"), } } } From 6d15a17df8c49ec8a9ccdc8036523fbdcaa07342 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Wed, 10 Feb 2021 00:25:19 +0000 Subject: [PATCH 3/4] Bump MSRV to 1.42.0 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 09281ba3..4ad4b406 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: matrix: os: [ubuntu-latest] toolchain: - - 1.40.0 # MSRV (Minimum supported rust version) + - 1.42.0 # MSRV (Minimum supported rust version) - stable - beta experimental: [false] From 0246c049879ad501390824314082576011917c6e Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Wed, 10 Feb 2021 00:28:45 +0000 Subject: [PATCH 4/4] Remove Travis CI badge, add Github workflows badge. --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1d4e820d..e772c510 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -[![Build Status](https://img.shields.io/github/workflow/status/librespot-org/librespot/test/dev)](https://github.com/librespot-org/librespot/actions) -[![Build Status](https://travis-ci.org/librespot-org/librespot.svg?branch=dev)](https://travis-ci.org/librespot-org/librespot) +[![Build Status](https://github.com/librespot-org/librespot/workflows/test/badge.svg)](https://github.com/librespot-org/librespot/actions) [![Gitter chat](https://badges.gitter.im/librespot-org/librespot.png)](https://gitter.im/librespot-org/spotify-connect-resources) [![Crates.io](https://img.shields.io/crates/v/librespot.svg)](https://crates.io/crates/librespot) @@ -21,7 +20,7 @@ As the origin by [plietar](https://github.com/plietar/) is no longer actively ma # Documentation Documentation is currently a work in progress, contributions are welcome! -There is some brief documentation on how the protocol works in the [docs](https://github.com/librespot-org/librespot/tree/master/docs) folder, +There is some brief documentation on how the protocol works in the [docs](https://github.com/librespot-org/librespot/tree/master/docs) folder, [COMPILING.md](https://github.com/librespot-org/librespot/blob/master/COMPILING.md) contains detailed instructions on setting up a development environment, and compiling librespot. More general usage and compilation information is available on the [wiki](https://github.com/librespot-org/librespot/wiki). [CONTRIBUTING.md](https://github.com/librespot-org/librespot/blob/master/CONTRIBUTING.md) also contains our contributing guidelines. @@ -32,7 +31,7 @@ If you wish to learn more about how librespot works overall, the best way is to If you run into a bug when using librespot, please search the existing issues before opening a new one. Chances are, we've encountered it before, and have provided a resolution. If not, please open a new one, and where possible, include the backtrace librespot generates on crashing, along with anything we can use to reproduce the issue, eg. the Spotify URI of the song that caused the crash. # Building -A quick walk through of the build process is outlined here, while a detailed compilation guide can be found [here](https://github.com/librespot-org/librespot/blob/master/COMPILING.md). +A quick walk through of the build process is outlined here, while a detailed compilation guide can be found [here](https://github.com/librespot-org/librespot/blob/master/COMPILING.md). ## Additional Dependencies We recently switched to using [Rodio](https://github.com/tomaka/rodio) for audio playback by default, hence for macOS and Windows, you should just be able to clone and build librespot (with the command below). @@ -111,4 +110,3 @@ functionality. - [librespot-java](https://github.com/devgianlu/librespot-java) - A Java port of librespot. - [ncspot](https://github.com/hrkfdn/ncspot) - Cross-platform ncurses Spotify client. - [ansible-role-librespot](https://github.com/xMordax/ansible-role-librespot/tree/master) - Ansible role that will build, install and configure Librespot. -