From 0b6303a667362bfb18d33604733ea3e26a58dd61 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Mon, 8 Nov 2010 11:52:11 +0200 Subject: [PATCH] info: improve tag filtering Hide duration as well. Also skip all tags where the name starts with "private-". --- mediainfo/src/mi-info.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index 63aa40f13d..e17881a627 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -96,8 +96,9 @@ public class MediaInfo.Info : VBox // tags to skip (already extraced to specific discoverer fields) tag_black_list = new HashSet (); tag_black_list.add ("bitrate"); - tag_black_list.add ("maximum-bitrate"); tag_black_list.add ("container-format"); + tag_black_list.add ("duration"); + tag_black_list.add ("maximum-bitrate"); // add widgets // FIXME: handle aspect ratio (AspectFrame.ratio) @@ -538,13 +539,18 @@ public class MediaInfo.Info : VBox string str, fn, vstr; Gst.Value v; - // TODO: remove some binary tags + // TODO: add special handling for certain tags + // image, uris, ... str = ""; for (i = 0; i < s.n_fields(); i++) { fn = s.nth_field_name (i); + // skip a few tags if (tag_black_list.contains (fn)) continue; + if (fn.has_prefix("private-")) + continue; + if (str.length > 0) str += "\n"; v = s.get_value (fn);