Use CodecID when grouping multi-part movie parts

This commit is contained in:
Reinhard Pointner 2017-11-11 00:12:18 +01:00
parent a37cce2112
commit 9ed7bbc503
1 changed files with 2 additions and 2 deletions

View File

@ -1119,8 +1119,8 @@ public class MediaDetection {
if (VIDEO_FILES.accept(f) && f.length() > ONE_MEGABYTE) { if (VIDEO_FILES.accept(f) && f.length() > ONE_MEGABYTE) {
try (MediaInfo mi = new MediaInfo().open(f)) { try (MediaInfo mi = new MediaInfo().open(f)) {
Object d = Duration.ofMillis(Long.parseLong(mi.get(StreamKind.General, 0, "Duration"))).toMinutes() < 10 ? ChronoUnit.MINUTES : ChronoUnit.HOURS; Object d = Duration.ofMillis(Long.parseLong(mi.get(StreamKind.General, 0, "Duration"))).toMinutes() < 10 ? ChronoUnit.MINUTES : ChronoUnit.HOURS;
String v = mi.get(StreamKind.Video, 0, "Codec"); String v = mi.get(StreamKind.Video, 0, "CodecID");
String a = mi.get(StreamKind.Audio, 0, "Codec"); String a = mi.get(StreamKind.Audio, 0, "CodecID");
String w = mi.get(StreamKind.Video, 0, "Width"); String w = mi.get(StreamKind.Video, 0, "Width");
String h = mi.get(StreamKind.Video, 0, "Height"); String h = mi.get(StreamKind.Video, 0, "Height");
return asList(d, v, a, w, h); return asList(d, v, a, w, h);