mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Merge pull request #597 from librespot-org/config-update
Update CI MSRV, remove Travis. Minor tweaks to device discovery.
This commit is contained in:
commit
ea8ece36d9
5 changed files with 36 additions and 80 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -41,7 +41,7 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
toolchain:
|
toolchain:
|
||||||
- 1.40.0 # MSRV (Minimum supported rust version)
|
- 1.42.0 # MSRV (Minimum supported rust version)
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
|
|
73
.travis.yml
73
.travis.yml
|
@ -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
|
|
|
@ -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://github.com/librespot-org/librespot/workflows/test/badge.svg)](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)
|
|
||||||
[![Gitter chat](https://badges.gitter.im/librespot-org/librespot.png)](https://gitter.im/librespot-org/spotify-connect-resources)
|
[![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)
|
[![Crates.io](https://img.shields.io/crates/v/librespot.svg)](https://crates.io/crates/librespot)
|
||||||
|
|
||||||
|
@ -111,4 +110,3 @@ functionality.
|
||||||
- [librespot-java](https://github.com/devgianlu/librespot-java) - A Java port of librespot.
|
- [librespot-java](https://github.com/devgianlu/librespot-java) - A Java port of librespot.
|
||||||
- [ncspot](https://github.com/hrkfdn/ncspot) - Cross-platform ncurses Spotify client.
|
- [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.
|
- [ansible-role-librespot](https://github.com/xMordax/ansible-role-librespot/tree/master) - Ansible role that will build, install and configure Librespot.
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ impl Discovery {
|
||||||
"status": 101,
|
"status": 101,
|
||||||
"statusString": "ERROR-OK",
|
"statusString": "ERROR-OK",
|
||||||
"spotifyError": 0,
|
"spotifyError": 0,
|
||||||
"version": "2.1.0",
|
"version": "2.7.1",
|
||||||
"deviceID": (self.0.device_id),
|
"deviceID": (self.0.device_id),
|
||||||
"remoteName": (self.0.config.name),
|
"remoteName": (self.0.config.name),
|
||||||
"activeUser": "",
|
"activeUser": "",
|
||||||
|
@ -85,6 +85,9 @@ impl Discovery {
|
||||||
"accountReq": "PREMIUM",
|
"accountReq": "PREMIUM",
|
||||||
"brandDisplayName": "librespot",
|
"brandDisplayName": "librespot",
|
||||||
"modelDisplayName": "librespot",
|
"modelDisplayName": "librespot",
|
||||||
|
"resolverVersion": "0",
|
||||||
|
"groupStatus": "NONE",
|
||||||
|
"voiceSupport": "NO",
|
||||||
});
|
});
|
||||||
|
|
||||||
let body = result.to_string();
|
let body = result.to_string();
|
||||||
|
|
|
@ -36,6 +36,16 @@ pub enum DeviceType {
|
||||||
AVR = 6,
|
AVR = 6,
|
||||||
STB = 7,
|
STB = 7,
|
||||||
AudioDongle = 8,
|
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 {
|
impl FromStr for DeviceType {
|
||||||
|
@ -51,6 +61,14 @@ impl FromStr for DeviceType {
|
||||||
"avr" => Ok(AVR),
|
"avr" => Ok(AVR),
|
||||||
"stb" => Ok(STB),
|
"stb" => Ok(STB),
|
||||||
"audiodongle" => Ok(AudioDongle),
|
"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(()),
|
_ => Err(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +87,16 @@ impl fmt::Display for DeviceType {
|
||||||
AVR => f.write_str("AVR"),
|
AVR => f.write_str("AVR"),
|
||||||
STB => f.write_str("STB"),
|
STB => f.write_str("STB"),
|
||||||
AudioDongle => f.write_str("AudioDongle"),
|
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"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue