app: only run discover for files

This commit is contained in:
Stefan Sauer 2010-10-19 22:53:28 +03:00
parent 80be4db45d
commit 869499423c
2 changed files with 5 additions and 3 deletions

View file

@ -79,9 +79,12 @@ public class MediaInfo.App : Window
private void on_update_preview ()
{
string uri = chooser.get_preview_uri();
bool res = info.discover (uri);
File file = chooser.get_preview_file();
bool res = false;
if (file.query_file_type (FileQueryInfoFlags.NONE, null) == FileType.REGULAR) {
res = info.discover (chooser.get_preview_uri());
}
chooser.set_preview_widget_active (res);
}
}

View file

@ -131,7 +131,6 @@ public class MediaInfo.Info : VBox
// stop previous playback
pb.set_state (State.NULL);
// TODO: check if uri is a regular (local file)?
if (uri != null) {
DiscovererInfo info;
bool uncertain;