[pitivi/ges: 225/287] Do not log an error for ID3 streams when beautifying
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 225/287] Do not log an error for ID3 streams when beautifying
- Date: Thu, 15 Mar 2012 16:44:45 +0000 (UTC)
commit fb09b4d4d22c99d32fe78f60ec682f02d6245dbf
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Sat Jan 14 17:50:20 2012 -0500
Do not log an error for ID3 streams when beautifying
pitivi/utils/ui.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index 1510843..037687b 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -205,9 +205,13 @@ def beautify_stream(stream):
templ = _(u"<b>Image:</b> %dÃ%d <i>pixels</i>")
templ = templ % (par * stream.get_width(), stream.get_height())
return templ
- elif type(stream) == gst.pbutils.DiscovererStreamInfo and\
- "text" in stream.get_caps().to_string():
- return _("Subtitles")
+ elif type(stream) == gst.pbutils.DiscovererStreamInfo:
+ caps = stream.get_caps().to_string()
+ if "text" in caps:
+ return _("Subtitles")
+ elif "application/x-id3" in caps:
+ # TODO: most audio files have ID3 tags, but we don't show them.
+ return ''
raise NotImplementedError
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]