mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-08-31 18:07:57 +00:00
Removed useless check for livestreams
This commit is contained in:
@@ -150,10 +150,10 @@ public class MediaSessionManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if the current metadata is valid
|
||||
// Check if the currently set metadata is valid
|
||||
if (getMetadataTitle() == null
|
||||
|| getMetadataArtist() == null
|
||||
|| getMetadataDuration() <= 1
|
||||
// Note that the duration can be <= 0 for live streams
|
||||
) {
|
||||
if (DEBUG) {
|
||||
if (getMetadataTitle() == null) {
|
||||
@@ -162,9 +162,6 @@ public class MediaSessionManager {
|
||||
} else if (getMetadataArtist() == null) {
|
||||
Log.d(TAG,
|
||||
"N_getMetadataArtist: artist == null");
|
||||
} else if (getMetadataDuration() <= 1) {
|
||||
Log.d(TAG,
|
||||
"N_getMetadataDuration: duration <= 1; " + getMetadataDuration());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -200,11 +197,6 @@ public class MediaSessionManager {
|
||||
.getString(MediaMetadataCompat.METADATA_KEY_ARTIST);
|
||||
}
|
||||
|
||||
private long getMetadataDuration() {
|
||||
return mediaSession.getController().getMetadata()
|
||||
.getLong(MediaMetadataCompat.METADATA_KEY_DURATION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should be called on player destruction to prevent leakage.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user