mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
librespot: update to 9f3a02e
This commit is contained in:
parent
38c5dcc56c
commit
a67adaac27
@ -1,3 +1,7 @@
|
||||
124
|
||||
- Update to 9f3a02e (2020-06-22)
|
||||
- Fix switching playback with Android
|
||||
|
||||
123
|
||||
- Handle non ascii track information
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="librespot"
|
||||
PKG_VERSION="66f8a98ad2f5bf35be4daecd788dad6f0d87fb7c"
|
||||
PKG_SHA256="b027c983341aa53d940412d5624cfe91392958ea9836ba597289680a4430b253"
|
||||
PKG_VERSION_DATE="2020-02-27"
|
||||
PKG_REV="123"
|
||||
PKG_VERSION="9f3a02ee8f62f8e178f714c3c63132388d90af64"
|
||||
PKG_SHA256="5b2d3c0a250fbd171ea86303b213dafc035bf32b5c6fb2e7e98d61d9140168a9"
|
||||
PKG_VERSION_DATE="2020-06-22"
|
||||
PKG_REV="124"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/librespot-org/librespot/"
|
||||
|
@ -1,6 +1,6 @@
|
||||
commit 93ad8ce6f94e51bb14547ddf9e7a234c41adc266
|
||||
commit 10489ef0b9de4241eb8e007596f3d62616120545
|
||||
Author: awiouy <awiouy@gmail.com>
|
||||
Date: Tue Dec 3 23:21:35 2019 +0100
|
||||
Date: Fri May 29 07:40:19 2020 +0200
|
||||
|
||||
Notify Kodi
|
||||
|
||||
@ -22,30 +22,30 @@ index 1a5fcd2..c670977 100644
|
||||
pub struct SpotifyId {
|
||||
pub id: u128,
|
||||
diff --git a/playback/src/config.rs b/playback/src/config.rs
|
||||
index 0f71110..931167d 100644
|
||||
index 9d65042..6d098db 100644
|
||||
--- a/playback/src/config.rs
|
||||
+++ b/playback/src/config.rs
|
||||
@@ -30,6 +30,7 @@ pub struct PlayerConfig {
|
||||
pub bitrate: Bitrate,
|
||||
@@ -31,6 +31,7 @@ pub struct PlayerConfig {
|
||||
pub normalisation: bool,
|
||||
pub normalisation_pregain: f32,
|
||||
pub gapless: bool,
|
||||
+ pub notify_kodi: bool,
|
||||
}
|
||||
|
||||
impl Default for PlayerConfig {
|
||||
@@ -38,6 +39,7 @@ impl Default for PlayerConfig {
|
||||
bitrate: Bitrate::default(),
|
||||
@@ -40,6 +41,7 @@ impl Default for PlayerConfig {
|
||||
normalisation: false,
|
||||
normalisation_pregain: 0.0,
|
||||
gapless: true,
|
||||
+ notify_kodi: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/playback/src/player.rs b/playback/src/player.rs
|
||||
index ef7484c..22ecb2c 100644
|
||||
index 2dd8f3b..67b3b28 100644
|
||||
--- a/playback/src/player.rs
|
||||
+++ b/playback/src/player.rs
|
||||
@@ -1415,6 +1415,10 @@ impl PlayerInternal {
|
||||
@@ -1442,6 +1442,10 @@ impl PlayerInternal {
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ index ef7484c..22ecb2c 100644
|
||||
fn send_event(&mut self, event: PlayerEvent) {
|
||||
let mut index = 0;
|
||||
while index < self.event_senders.len() {
|
||||
@@ -1425,6 +1429,16 @@ impl PlayerInternal {
|
||||
@@ -1452,6 +1456,16 @@ impl PlayerInternal {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -74,7 +74,7 @@ index ef7484c..22ecb2c 100644
|
||||
|
||||
fn load_track(
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index f749a52..5a9f75d 100644
|
||||
index 2efd62b..ecee2ff 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -171,6 +171,11 @@ fn setup(args: &[String]) -> Setup {
|
||||
@ -89,7 +89,7 @@ index f749a52..5a9f75d 100644
|
||||
.optflag(
|
||||
"",
|
||||
"linear-volume",
|
||||
@@ -277,6 +282,8 @@ fn setup(args: &[String]) -> Setup {
|
||||
@@ -282,6 +287,8 @@ fn setup(args: &[String]) -> Setup {
|
||||
)
|
||||
};
|
||||
|
||||
@ -98,7 +98,7 @@ index f749a52..5a9f75d 100644
|
||||
let session_config = {
|
||||
let device_id = device_id(&name);
|
||||
|
||||
@@ -320,6 +327,7 @@ fn setup(args: &[String]) -> Setup {
|
||||
@@ -325,6 +332,7 @@ fn setup(args: &[String]) -> Setup {
|
||||
.opt_str("normalisation-pregain")
|
||||
.map(|pregain| pregain.parse::<f32>().expect("Invalid pregain float value"))
|
||||
.unwrap_or(PlayerConfig::default().normalisation_pregain),
|
||||
|
@ -0,0 +1,50 @@
|
||||
From 16b83b38c1b77b34c64ad3f567e5f43bb1dc5ef0 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Green <anthony@home.coolsoft.co.uk>
|
||||
Date: Tue, 7 Jul 2020 16:23:20 +0100
|
||||
Subject: [PATCH 1/2] Issue #497 - Playing songs from android app
|
||||
|
||||
Implement the fix suggested by @Johannesd3
|
||||
---
|
||||
connect/src/spirc.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs
|
||||
index b4c657f7..88d377df 100644
|
||||
--- a/connect/src/spirc.rs
|
||||
+++ b/connect/src/spirc.rs
|
||||
@@ -790,7 +790,7 @@ impl SpircTask {
|
||||
}
|
||||
|
||||
MessageType::kMessageTypeNotify => {
|
||||
- if self.device.get_is_active() && frame.get_device_state().get_is_active() {
|
||||
+ if self.device.get_is_active() && frame.get_device_state().get_is_active() && self.device.get_became_active_at() <= frame.get_device_state().get_became_active_at() {
|
||||
self.device.set_is_active(false);
|
||||
self.state.set_status(PlayStatus::kPlayStatusStop);
|
||||
self.player.stop();
|
||||
|
||||
From 9565e4392ab6ba8d39b7714395ce3b8a58048fb6 Mon Sep 17 00:00:00 2001
|
||||
From: Anthony Green <anthony@home.coolsoft.co.uk>
|
||||
Date: Fri, 10 Jul 2020 21:17:01 +0100
|
||||
Subject: [PATCH 2/2] Fix formatting
|
||||
|
||||
---
|
||||
connect/src/spirc.rs | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs
|
||||
index 88d377df..0dd67093 100644
|
||||
--- a/connect/src/spirc.rs
|
||||
+++ b/connect/src/spirc.rs
|
||||
@@ -790,7 +790,11 @@ impl SpircTask {
|
||||
}
|
||||
|
||||
MessageType::kMessageTypeNotify => {
|
||||
- if self.device.get_is_active() && frame.get_device_state().get_is_active() && self.device.get_became_active_at() <= frame.get_device_state().get_became_active_at() {
|
||||
+ if self.device.get_is_active()
|
||||
+ && frame.get_device_state().get_is_active()
|
||||
+ && self.device.get_became_active_at()
|
||||
+ <= frame.get_device_state().get_became_active_at()
|
||||
+ {
|
||||
self.device.set_is_active(false);
|
||||
self.state.set_status(PlayStatus::kPlayStatusStop);
|
||||
self.player.stop();
|
@ -1,59 +0,0 @@
|
||||
From 389276e5d361da5f2a2116d11724c815ce4b6ec8 Mon Sep 17 00:00:00 2001
|
||||
From: Konstantin Seiler <list@kseiler.de>
|
||||
Date: Wed, 11 Mar 2020 13:49:52 +1100
|
||||
Subject: [PATCH] Enable pulseaudio device names
|
||||
|
||||
---
|
||||
playback/src/audio_backend/pulseaudio.rs | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/playback/src/audio_backend/pulseaudio.rs b/playback/src/audio_backend/pulseaudio.rs
|
||||
index e844b0d6..8a833d65 100644
|
||||
--- a/playback/src/audio_backend/pulseaudio.rs
|
||||
+++ b/playback/src/audio_backend/pulseaudio.rs
|
||||
@@ -12,6 +12,7 @@ pub struct PulseAudioSink {
|
||||
ss: pa_sample_spec,
|
||||
name: CString,
|
||||
desc: CString,
|
||||
+ device: Option<CString>,
|
||||
}
|
||||
|
||||
fn call_pulseaudio<T, F, FailCheck>(
|
||||
@@ -56,10 +57,6 @@ impl Open for PulseAudioSink {
|
||||
fn open(device: Option<String>) -> PulseAudioSink {
|
||||
debug!("Using PulseAudio sink");
|
||||
|
||||
- if device.is_some() {
|
||||
- panic!("pulseaudio sink does not support specifying a device name");
|
||||
- }
|
||||
-
|
||||
let ss = pa_sample_spec {
|
||||
format: PA_SAMPLE_S16LE,
|
||||
channels: 2, // stereo
|
||||
@@ -74,6 +71,7 @@ impl Open for PulseAudioSink {
|
||||
ss: ss,
|
||||
name: name,
|
||||
desc: description,
|
||||
+ device: device.and_then(|s| CString::new(s).ok()),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -81,13 +79,17 @@ impl Open for PulseAudioSink {
|
||||
impl Sink for PulseAudioSink {
|
||||
fn start(&mut self) -> io::Result<()> {
|
||||
if self.s == null_mut() {
|
||||
+ let device = match &self.device {
|
||||
+ None => null(),
|
||||
+ Some(device) => device.as_ptr(),
|
||||
+ };
|
||||
self.s = call_pulseaudio(
|
||||
|err| unsafe {
|
||||
pa_simple_new(
|
||||
null(), // Use the default server.
|
||||
self.name.as_ptr(), // Our application's name.
|
||||
PA_STREAM_PLAYBACK,
|
||||
- null(), // Use the default device.
|
||||
+ device,
|
||||
self.desc.as_ptr(), // desc of our stream.
|
||||
&self.ss, // Our sample format.
|
||||
null(), // Use default channel map
|
Loading…
x
Reference in New Issue
Block a user