Skip to content
Snippets Groups Projects
Commit a6c3b198 authored by Jens Steidl's avatar Jens Steidl :baby_chick:
Browse files

- fix: use attributes instead of dnx properties

parent cf456a04
No related branches found
No related tags found
1 merge request!1Fix handle all dnx properties of type number
...@@ -68,22 +68,22 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract ...@@ -68,22 +68,22 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
private boolean isDifferentProfile = true; private boolean isDifferentProfile = true;
private final Map<String,String> attributes = new HashMap<>(); private final Map<String,String> attributes = new HashMap<>();
//static final ExLogger log = ExLogger.getExLogger(SLUBTechnicalMetadataExtractorMediaConchPlugin.class, ExLogger.VALIDATIONSTACK); //static final ExLogger log = ExLogger.getExLogger(SLUBTechnicalMetadataExtractorMediaConchPlugin.class, ExLogger.VALIDATIONSTACK);
private final static ArrayList<String> dnxPropertiesTypeNumber = new ArrayList<String>() {{ private final static ArrayList<String> attributesMappedToDnxPropertiesOfTypeNumber = new ArrayList<String>() {{
// HINT: based on FL 7.1100 mappings for mediainfo (https://github.com/rosetta-format-library/RosettaFormatLibrary/releases/tag/7.1100) // HINT: based on FL 7.1100 mappings for mediainfo (https://github.com/rosetta-format-library/RosettaFormatLibrary/releases/tag/7.1100)
add("audio.duration"); add("mediainfo.track.Audio.Duration"); // => audio.duration
add("audio.sampling_rate"); add("mediainfo.track.Audio.SamplingRate"); // => audio.sampling_rate
add("audio.stream_size"); add("mediainfo.track.Audio.StreamSize"); // => audio.stream_size
add("general.audio_count"); add("mediainfo.track.General.AudioCount"); // => general.audio_count
add("general.menu_count"); add("mediainfo.track.General.MenuCount"); // => general.menu_count
add("general.other_count"); add("mediainfo.track.General.OtherCount"); // => general.other_count
add("general.stream_size"); add("mediainfo.track.General.StreamSize"); // => general.stream_size
add("general.text_count"); add("mediainfo.track.General.TextCount"); // => general.text_count
add("general.video_count"); add("mediainfo.track.General.VideoCount"); // => general.video_count
add("video.bit_rate"); add("mediainfo.track.Video.BitRate"); // => video.bit_rate
add("video.display_aspect_ratio"); add("mediainfo.track.Video.DisplayAspectRatio"); // => video.display_aspect_ratio
add("video.duration"); add("mediainfo.track.Video.Duration"); // => video.duration
add("video.extra.max_slices_count"); add("mediainfo.track.Video.extra.MaxSlicesCount"); // => video.extra.max_slices_count
add("video.frame_count"); add("mediainfo.track.Video.FrameCount"); // => video.frame_count
}}; }};
/** constructor */ /** constructor */
...@@ -375,7 +375,7 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract ...@@ -375,7 +375,7 @@ public class SLUBTechnicalMetadataExtractorMediaConchPlugin implements MDExtract
return attributes.get(attribute); return attributes.get(attribute);
} }
// HINT: Rosetta expects a number of specific DNX properties instead of text // HINT: Rosetta expects a number of specific DNX properties instead of text
if (dnxPropertiesTypeNumber.contains( attribute.toString() )) { if (attributesMappedToDnxPropertiesOfTypeNumber.contains( attribute.toString() )) {
return "0"; // type NUMBER return "0"; // type NUMBER
} }
return "not found"; // type TEXT & STRING return "not found"; // type TEXT & STRING
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment