mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +01:00
Merge branch 'master' into feature-weather
This commit is contained in:
commit
bcb522d2d0
@ -29,7 +29,13 @@ public class MusicPlaybackReceiver extends BroadcastReceiver {
|
|||||||
MusicSpec musicSpec = new MusicSpec();
|
MusicSpec musicSpec = new MusicSpec();
|
||||||
musicSpec.artist = intent.getStringExtra("artist");
|
musicSpec.artist = intent.getStringExtra("artist");
|
||||||
musicSpec.album = intent.getStringExtra("album");
|
musicSpec.album = intent.getStringExtra("album");
|
||||||
|
if (intent.hasExtra("track")) {
|
||||||
musicSpec.track = intent.getStringExtra("track");
|
musicSpec.track = intent.getStringExtra("track");
|
||||||
|
}
|
||||||
|
else if (intent.hasExtra("title")) {
|
||||||
|
musicSpec.track = intent.getStringExtra("title");
|
||||||
|
}
|
||||||
|
|
||||||
musicSpec.duration = intent.getIntExtra("duration", 0) / 1000;
|
musicSpec.duration = intent.getIntExtra("duration", 0) / 1000;
|
||||||
|
|
||||||
if (!lastMusicSpec.equals(musicSpec)) {
|
if (!lastMusicSpec.equals(musicSpec)) {
|
||||||
|
@ -576,6 +576,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
|||||||
mMusicPlaybackReceiver = new MusicPlaybackReceiver();
|
mMusicPlaybackReceiver = new MusicPlaybackReceiver();
|
||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction("com.android.music.metachanged");
|
filter.addAction("com.android.music.metachanged");
|
||||||
|
filter.addAction("net.sourceforge.subsonic.androidapp.EVENT_META_CHANGED");
|
||||||
//filter.addAction("com.android.music.playstatechanged");
|
//filter.addAction("com.android.music.playstatechanged");
|
||||||
registerReceiver(mMusicPlaybackReceiver, filter);
|
registerReceiver(mMusicPlaybackReceiver, filter);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user