mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-14 22:19:29 +01:00
Try to support "Subsonic" android app (#474)
This commit is contained in:
parent
bb8aff8c99
commit
440a5e071f
@ -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