Update duration from feed if there is none yet (#6322)

This commit is contained in:
ByteHamster 2023-02-16 21:51:58 +01:00 committed by GitHub
parent 7a2f4771ec
commit caf49c5da8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,9 @@ public class FeedMedia extends FeedFile implements Playable {
if (other.size > 0) {
size = other.size;
}
if (other.duration > 0 && duration <= 0) { // Do not overwrite duration that we measured after downloading
duration = other.duration;
}
if (other.mime_type != null) {
mime_type = other.mime_type;
}
@ -145,6 +148,9 @@ public class FeedMedia extends FeedFile implements Playable {
if (other.size > 0 && other.size != size) {
return true;
}
if (other.duration > 0 && duration <= 0) {
return true;
}
return false;
}