info: reset container and duration fields if file is not discoverable

Before the previous text was left.
This commit is contained in:
Stefan Sauer 2011-01-29 14:41:28 +02:00
parent a6a1ae2f63
commit 46ecfa08ae

View file

@ -329,8 +329,12 @@ public class MediaInfo.Info : VPaned
if (e != null) { if (e != null) {
debug ("Failed to extract metadata from %s: %s: %s", uri, e.domain.to_string (), e.message); 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) { if (info == null) {
container_name.set_text ("");
duration.set_text ("");
return; return;
} }
@ -340,7 +344,7 @@ public class MediaInfo.Info : VPaned
(uint) ((dur / (SECOND * 60)) % 60), (uint) ((dur / (SECOND * 60)) % 60),
(uint) ((dur / SECOND) % 60), (uint) ((dur / SECOND) % 60),
(uint) ((dur) % SECOND)); (uint) ((dur) % SECOND));
this.duration.set_text (str); duration.set_text (str);
//stdout.printf ("Duration: %s\n", dur_str); //stdout.printf ("Duration: %s\n", dur_str);
/* /*