From 46ecfa08ae8c12604a3b08a037d028d4e505e19d Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sat, 29 Jan 2011 14:41:28 +0200 Subject: [PATCH] info: reset container and duration fields if file is not discoverable Before the previous text was left. --- mediainfo/src/mi-info.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index 987140a831..74cf6eb03e 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -329,8 +329,12 @@ public class MediaInfo.Info : VPaned if (e != null) { debug ("Failed to extract metadata from %s: %s: %s", uri, e.domain.to_string (), e.message); + container_name.set_text (""); + duration.set_text (""); } if (info == null) { + container_name.set_text (""); + duration.set_text (""); return; } @@ -340,7 +344,7 @@ public class MediaInfo.Info : VPaned (uint) ((dur / (SECOND * 60)) % 60), (uint) ((dur / SECOND) % 60), (uint) ((dur) % SECOND)); - this.duration.set_text (str); + duration.set_text (str); //stdout.printf ("Duration: %s\n", dur_str); /*