mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +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.artist = intent.getStringExtra("artist");
|
||||
musicSpec.album = intent.getStringExtra("album");
|
||||
musicSpec.track = intent.getStringExtra("track");
|
||||
if (intent.hasExtra("track")) {
|
||||
musicSpec.track = intent.getStringExtra("track");
|
||||
}
|
||||
else if (intent.hasExtra("title")) {
|
||||
musicSpec.track = intent.getStringExtra("title");
|
||||
}
|
||||
|
||||
musicSpec.duration = intent.getIntExtra("duration", 0) / 1000;
|
||||
|
||||
if (!lastMusicSpec.equals(musicSpec)) {
|
||||
|
@ -576,6 +576,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
|
||||
mMusicPlaybackReceiver = new MusicPlaybackReceiver();
|
||||
IntentFilter filter = new IntentFilter();
|
||||
filter.addAction("com.android.music.metachanged");
|
||||
filter.addAction("net.sourceforge.subsonic.androidapp.EVENT_META_CHANGED");
|
||||
//filter.addAction("com.android.music.playstatechanged");
|
||||
registerReceiver(mMusicPlaybackReceiver, filter);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user