Control: tag -1 moreinfo Hi Nicolas, Nicolas Delvaux <contact@nicolas-delvaux.org> (2013-10-02): > http://mentors.debian.net/package/totem-plugin-arte you're supposed to post a source debdiff, so that we don't have to hunt down proposed source package, along with current source package in stable. I'm attaching the diff I generated manually, and adding a few comments on some bits below (prefixed wit '→'). > The version I'm proposing is directly based on the latest upstream > release, which fix this problem and some other (small) issues. > Backporting the relevant commits as patches to the current wheezy > version would bring most of the code from the new upstream version, so > I thought adding a small patch to make the new version build with the > old Totem from Wheezy was the right thing to do. The idea is reasonable, the resulting diff, not exactly. > The new package also includes the harden binary that is already in > experimental and Ubuntu since many months. Please don't include that into proposed updates. > Here is the proposed debian/changelog: > > totem-plugin-arte (3.2.1-1~wheezy1) stable; urgency=low Version is supposed to be 3.2.1-1~deb7u1 in that case (would be 3.1.2-1+deb7u1 otherwise). > Totem-plugin-arte is a leaf package and the current Wheezy version is > unusable. IMHO, this looks like a very low risk upgrade. Fixing only the actual issues is usually what we prefer, and I see no reasons to operate differently here. Tagging moreinfo until a cleaned up diff is proposed. ;) Mraw, KiBi. ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== --- totem-plugin-arte-3.1.2/connection-status.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/connection-status.vala 2013-09-22 18:09:47.000000000 +0200 @@ -96,7 +96,7 @@ this.is_online = true; // online by default } - private void proxy_signal_cb (string sender_name, string signal_name, Variant parameters) + private void proxy_signal_cb (GLib.DBusProxy obj, string? sender_name, string signal_name, Variant parameters) { if (signal_name == "StateChanged") { → Is the '?' between 'string' and 'sender_name' really intended? (Sorry, but I'm not learning vala tonight.) --- totem-plugin-arte-3.1.2/debian/control 2012-05-06 13:41:04.000000000 +0200 +++ totem-plugin-arte-3.2.1/debian/control 2013-10-02 01:12:06.000000000 +0200 @@ -3,18 +3,20 @@ Priority: extra Maintainer: Nicolas Delvaux <contact@nicolas-delvaux.org> Build-Depends: debhelper (>= 8.0.0), - libtotem-dev, + dpkg-dev (>= 1.16.1~), → No hardening, please. + libtotem-dev (<< 3.5), → Not strictly needed, but doesn't hurt I suppose. valac-0.16, libgtk-3-dev, libsoup2.4-dev, libpeas-dev (>= 1.2.0), + libjson-glib-dev, gettext -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 → Noise in stable diffs, never a good idea. Homepage: http://gitorious.org/totem-plugin-arte Package: totem-plugin-arte Architecture: any -Depends: totem (>> 2.90), +Depends: totem (<< 3.5), → Given even oldstable has 2.30.2-6, which fulfills the old dependency, you could have kept the old dependency (>> 2.90) and added the new one (<< 3.5); that would have saved some headscratching to the reviewer. gstreamer0.10-plugins-bad (>= 0.10.19.3), gstreamer0.10-ffmpeg, gsettings-desktop-schemas, diff -Nru totem-plugin-arte-3.1.2/debian/rules totem-plugin-arte-3.2.1/debian/rules --- totem-plugin-arte-3.1.2/debian/rules 2011-10-23 15:04:56.000000000 +0200 +++ totem-plugin-arte-3.2.1/debian/rules 2013-10-02 00:22:41.000000000 +0200 @@ -4,12 +4,18 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# Hardening +# http://wiki.debian.org/Hardening +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk +VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w)) + → As mentioned above, NACK. # Copied from the Makefile CC_ARGS=-X -fPIC -X -shared --Xcc="-D GETTEXT_PACKAGE=\"totem-arte\"" override_dh_auto_build: # Build without debug messages and without debug symbols - dh_auto_build -- VALA_ARGS='$(CC_ARGS)' + dh_auto_build -- VALA_ARGS='$(VALAFLAGS) $(CC_ARGS)' → Ditto. override_dh_auto_install: # Disable gsettings schemas compilation --- totem-plugin-arte-3.1.2/org.gnome.totem.plugins.arteplus7.gschema.xml 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/org.gnome.totem.plugins.arteplus7.gschema.xml 2013-09-22 18:09:47.000000000 +0200 @@ -4,6 +4,7 @@ <value value="0" nick="Unknown"/> <value value="1" nick="Medium"/> <value value="2" nick="High"/> + <value value="3" nick="Low"/> </enum> <enum id="org.gnome.Totem.arteplus7.language"> <value value="0" nick="Unknown"/> @@ -12,7 +13,7 @@ </enum> <schema id="org.gnome.Totem.arteplus7" path="/org/gnome/Totem/arteplus7/"> <key name="quality" enum="org.gnome.Totem.arteplus7.quality"> - <default>'High'</default> + <default>'Medium'</default> → Changing default settings in stable is never nice. I suspect this {could,should} be reverted (unless it's not functional but then it shouldn't be proposed in the above enum. <summary>Quality</summary> <description>The video stream quality.</description> </key>
diff -Nru totem-plugin-arte-3.1.2/arteparser.vala totem-plugin-arte-3.2.1/arteparser.vala --- totem-plugin-arte-3.1.2/arteparser.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/arteparser.vala 2013-09-22 18:09:47.000000000 +0200 @@ -28,10 +28,11 @@ using GLib; using Soup; +using Json; public abstract class ArteParser : GLib.Object { - public bool has_data { get; protected set; default = false; } + public bool has_data { get; protected set; default = false; } // more data available protected string xml_fr; protected string xml_de; protected GLib.SList<Video> videos; @@ -55,7 +56,7 @@ return has_data; } - public unowned GLib.SList<Video> parse (Language lang) throws MarkupError, IOError + public virtual unowned GLib.SList<Video> parse (Language lang) throws MarkupError, IOError { videos = new GLib.SList<Video> (); @@ -105,36 +106,127 @@ } } +public class ArteJSONParser : ArteParser +{ + private string json_url_fr = "http://www.arte.tv/guide/fr/plus7.json"; + private string json_url_de = "http://www.arte.tv/guide/de/plus7.json"; + + public ArteJSONParser () + { + reset (); + } + + public override void reset () + { + has_data = true; + } + + public override uint get_error_threshold () + { + return 1; // no errors are tolerated + } + + public override unowned GLib.SList<Video> parse (Language lang) throws MarkupError, IOError + { + videos = new GLib.SList<Video> (); + + Soup.Message msg; + if (lang == Language.GERMAN) { + msg = new Soup.Message ("GET", json_url_de); + } else { + msg = new Soup.Message ("GET", json_url_fr); + } + + Soup.SessionAsync session = create_session (); + + session.send_message (msg); + + if (msg.status_code != Soup.KnownStatusCode.OK) { + throw new IOError.HOST_NOT_FOUND ("videos.arte.tv could not be accessed."); + } + + var parser = new Json.Parser (); + + try { + parser.load_from_data ((string) msg.response_body.flatten ().data, -1); + } catch (GLib.Error e) { + throw new GLib.MarkupError.PARSE ("Json parsing failed: '%s'", e.message); + } + + var root_object = parser.get_root ().get_object (); + var video_array = root_object.get_array_member ("videos"); + + foreach (var video in video_array.get_elements ()) { + var v = video.get_object (); + var current_video = new Video(); + + current_video.title = v.get_string_member ("title"); + current_video.page_url = "http://www.arte.tv" + v.get_string_member ("url"); + current_video.image_url = v.get_string_member ("image_url"); + current_video.desc = v.get_string_member ("desc"); + // TODO current_video.publication_date + + string end_time_str = v.get_string_member ("video_rights_until"); + + try { + var regex = new Regex ("([0-9]+)[:h]([0-9]+)"); + MatchInfo match; + regex.match(end_time_str, 0, out match); + string hours_str = match.fetch(1); + string minutes_str = match.fetch(2); + int hours = int.parse(hours_str); + int minutes = int.parse(minutes_str); + + current_video.offline_date = GLib.TimeVal (); + current_video.offline_date.get_current_time (); + current_video.offline_date.tv_sec += ((hours * 60 * 60 + minutes * 60)); + } catch (GLib.RegexError e) { + GLib.warning ("Offline date parsing failed."); + } + + videos.append (current_video); + } + + has_data = false; + + return videos; + } +} + public class ArteRSSParser : ArteParser { private Video current_video = null; private string current_data = null; /* official RSS feeds by topic, contains duplicats, no image urls and offline dates */ private const string[] feeds_fr = { - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/actualites/index--3188636,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/documentaire/index--3188646,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/decouverte/index--3188644,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/europe/index--3188648,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/geopolitique_histoire/index--3188654,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/societe/index--3188652,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/junior/index--3188656,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/cinema_fiction/index--3188642,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/arts_cultures_spectacles/index--3188640,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/culture_pop_alternative/index--3188638,view,rss.xml", - "http://videos.arte.tv/fr/do_delegate/videos/toutes_les_videos/environnement_science/index--3188650,view,rss.xml" + "http://videos.arte.tv/fr/do_delegate/videos/index-3188626,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/arts_cultures_spectacles/index-3188640,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/culture_pop_alternative/index-3188638,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/documentaire/index-3188646,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/europe/index-3188648,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/junior/index-3188656,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/index--3188626,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/actualites/index-3188636,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/cinema_fiction/index-3188642,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/decouverte/index-3188644,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/environnement_science/index-3188650,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/geopolitique_histoire/index-3188654,view,rss.xml", + "http://videos.arte.tv/fr/do_delegate/videos/chaines/societe/index-3188652,view,rss.xml" }; private const string[] feeds_de = { - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/aktuelles/index--3188636,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/dokus/index--3188646,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/entdeckung/index--3188644,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/europa/index--3188648,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/geopolitik_geschichte/index--3188654,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/gesellschaft/index--3188652,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/junior/index--3188656,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/kino_serien/index--3188642,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/kunst_kultur/index--3188640,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/popkultur_musik/index--3188638,view,rss.xml", - "http://videos.arte.tv/de/do_delegate/videos/alle_videos/umwelt_wissenschaft/index--3188650,view,rss.xml" + "http://videos.arte.tv/de/do_delegate/videos/index-3188626,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/aktuelles/index-3188636,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/entdeckung/index-3188644,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/geopolitik_geschichte/index-3188654,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/junior/index-3188656,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/kunst_kultur/index-3188640,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/umwelt_wissenschaft/index-3188650,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/index--3188626,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/dokus/index-3188646,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/europe/index-3188648,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/gesellschaft/index-3188652,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/kino_serien/index-3188642,view,rss.xml", + "http://videos.arte.tv/de/do_delegate/videos/themen/popkultur_musik/index-3188638,view,rss.xml" }; private const uint feed_count = 11; private uint feed_idx = 0; diff -Nru totem-plugin-arte-3.1.2/arteplus7.vala totem-plugin-arte-3.2.1/arteplus7.vala --- totem-plugin-arte-3.1.2/arteplus7.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/arteplus7.vala 2013-09-22 18:09:47.000000000 +0200 @@ -37,7 +37,8 @@ { UNKNOWN = 0, MEDIUM, - HIGH + HIGH, + LOW } public enum Language @@ -98,7 +99,7 @@ private Totem.Object t; private Gtk.Entry search_entry; /* search field with buttons inside */ private VideoListView tree_view; /* list of movie thumbnails */ - private ArteParser parsers[2]; /* array of parsers */ + private ArteParser parsers[3]; /* array of parsers */ private GLib.Settings settings; private GLib.Settings proxy_settings; private Cache cache; /* image thumbnail cache */ @@ -106,6 +107,8 @@ private VideoQuality quality; private ConnectionStatus cs; + private delegate void VoidFunction (); + public ArtePlugin () { /* constructor chain up hint */ @@ -153,8 +156,9 @@ t = object as Totem.Object; cache = new Cache (Environment.get_user_cache_dir () + CACHE_PATH_SUFFIX); - parsers[0] = new ArteXMLParser (); - parsers[1] = new ArteRSSParser (); + parsers[0] = new ArteJSONParser (); + parsers[1] = new ArteXMLParser (); + parsers[2] = new ArteRSSParser (); tree_view = new VideoListView (cache); tree_view.video_selected.connect (callback_video_selected); @@ -271,30 +275,49 @@ } }); - var quali_radio_medium = new Gtk.RadioButton.with_mnemonic (null, _("_medium")); + var quali_radio_low = new Gtk.RadioButton.with_mnemonic (null, _("l_ow")); + var quali_radio_medium = new Gtk.RadioButton.with_mnemonic_from_widget ( + quali_radio_low, _("_medium")); var quali_radio_high = new Gtk.RadioButton.with_mnemonic_from_widget ( quali_radio_medium, _("_high")); - if (quality == VideoQuality.MEDIUM) - quali_radio_medium.set_active (true); - else - quali_radio_high.set_active (true); + switch (quality) { + case VideoQuality.LOW: + quali_radio_low.set_active (true); + break; + case VideoQuality.MEDIUM: + quali_radio_medium.set_active (true); + break; + default: + quali_radio_high.set_active (true); + break; + } - quali_radio_medium.toggled.connect (() => { - VideoQuality last = quality; - if (quali_radio_medium.get_active ()) - quality = VideoQuality.MEDIUM; + /* reusable lambda function */ + VoidFunction quality_toggle_clicked = () => { + VideoQuality last = this.quality; + if (quali_radio_low.get_active ()) + this.quality = VideoQuality.LOW; + else if (quali_radio_medium.get_active ()) + this.quality = VideoQuality.MEDIUM; else - quality = VideoQuality.HIGH; + this.quality = VideoQuality.HIGH; - if (last != quality) { - if (!settings.set_enum ("quality", (int) quality)) + if (last != this.quality) { + if (!settings.set_enum ("quality", (int) this.quality)) GLib.warning ("Storing the quality setting failed."); } - }); + }; + + quali_radio_low.toggled.connect (() => { quality_toggle_clicked(); }); + quali_radio_medium.toggled.connect (() => { quality_toggle_clicked(); }); + quali_radio_high.toggled.connect (() => { quality_toggle_clicked(); }); settings.changed["quality"].connect (() => { var q = settings.get_enum ("quality"); - if (q == VideoQuality.MEDIUM) { + if (q == VideoQuality.LOW) { + quality = VideoQuality.LOW; + quali_radio_low.set_active (true); + } else if (q == VideoQuality.MEDIUM) { quality = VideoQuality.MEDIUM; quali_radio_medium.set_active (true); } else { @@ -303,7 +326,10 @@ } }); - var langs_label = new Gtk.Label (_("Language:")); + var langs_label = new Gtk.Label.with_mnemonic (_("_Language:")); + langs_label.set_mnemonic_widget (langs); + langs.mnemonic_activate.connect (() => { langs.popup(); return true; }); + var langs_box = new Box (Gtk.Orientation.HORIZONTAL, 20); langs_box.pack_start (langs_label, false, true, 0); langs_box.pack_start (langs, true, true, 0); @@ -311,6 +337,7 @@ var quali_label = new Gtk.Label (_("Video quality:")); var quali_box = new Box (Gtk.Orientation.HORIZONTAL, 20); quali_box.pack_start (quali_label, false, true, 0); + quali_box.pack_start (quali_radio_low, false, true, 0); quali_box.pack_start (quali_radio_medium, false, true, 0); quali_box.pack_start (quali_radio_high, true, true, 0); @@ -491,7 +518,7 @@ return; } - t.add_to_playlist_and_play (stream_url, title, false); + t.add_to_playlist_and_play (stream_url, title); } private void callback_refresh_rss_feed () diff -Nru totem-plugin-arte-3.1.2/cache.vala totem-plugin-arte-3.2.1/cache.vala --- totem-plugin-arte-3.1.2/cache.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/cache.vala 2013-09-22 18:09:47.000000000 +0200 @@ -83,7 +83,7 @@ // download it var extractor = new ImageUrlExtractor (); - debug ("Download missing image url: %s", v.title); + debug ("Extract missing image url: %s", v.title); try { v.image_url = extractor.get_url (VideoQuality.UNKNOWN, Language.UNKNOWN, v.page_url); diff -Nru totem-plugin-arte-3.1.2/cell-renderer-video.vala totem-plugin-arte-3.2.1/cell-renderer-video.vala --- totem-plugin-arte-3.1.2/cell-renderer-video.vala 1970-01-01 01:00:00.000000000 +0100 +++ totem-plugin-arte-3.2.1/cell-renderer-video.vala 2013-09-22 18:09:47.000000000 +0200 @@ -0,0 +1,116 @@ +/* + * Totem Arte Plugin allows you to watch streams from arte.tv + * Copyright (C) 2013 Nicolas Delvaux <contact@nicolas-delvaux.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * The Totem Arte Plugin project hereby grants permission for non-GPL compatible + * GStreamer plugins to be used and distributed together with GStreamer, Totem + * and Totem Arte Plugin. This permission is above and beyond the permissions + * granted by the GPL license by which Totem Arte Plugin is covered. + * If you modify this code, you may extend this exception to your version of the + * code, but you are not obligated to do so. If you do not wish to do so, + * delete this exception statement from your version. + * + */ + +using Gtk; + +public class CellRendererVideo : Gtk.CellRenderer +/** + * This is a simple re-implementation of "Totem.CellRendererVideo". + * The original widget was removed from Totem since the 3.8 version. + */ + +{ + + public Gdk.Pixbuf thumbnail { get; set; } + public string title { get; set; } + + public override void get_size (Widget widget, Gdk.Rectangle? cell_area, + out int x_offset, out int y_offset, + out int width, out int height) + { + x_offset = 0; + y_offset = 0; + if (this.thumbnail != null) { + width = this.thumbnail.width; + height = this.thumbnail.height + 30; + } else { + // This is initialization time, nothing to draw + // These values have no importance + width = 30; + height = 30; + } + } + + public override void render (Cairo.Context ctx, Widget widget, + Gdk.Rectangle background_area, + Gdk.Rectangle cell_area, + CellRendererState flags) + { + + if (this.thumbnail == null) { + // This is initialization time, nothing to draw + return; + } + + Gtk.StateFlags state; + + /* Sort out the state (used to draw the title) */ + if (!this.get_sensitive ()) { + state = Gtk.StateFlags.INSENSITIVE; + } else if ((flags & Gtk.CellRendererState.SELECTED) == Gtk.CellRendererState.SELECTED) { + if (widget.has_focus) + state = Gtk.StateFlags.SELECTED; + else + state = Gtk.StateFlags.ACTIVE; + } else if ((flags & Gtk.CellRendererState.PRELIT) == Gtk.CellRendererState.PRELIT && + widget.get_state_flags () == Gtk.StateFlags.PRELIGHT) { + state = Gtk.StateFlags.PRELIGHT; + } else { + if (widget.get_state_flags () == Gtk.StateFlags.INSENSITIVE) + state = Gtk.StateFlags.INSENSITIVE; + else + state = Gtk.StateFlags.NORMAL; + } + + + /* Draw the title */ + StyleContext context = widget.get_style_context (); + Pango.Layout layout = widget.create_pango_layout (this.title); + Pango.FontDescription desc = context.get_font (state); + + desc.set_weight (Pango.Weight.BOLD); + layout.set_font_description (desc); + layout.set_ellipsize (Pango.EllipsizeMode.END); + layout.set_width (cell_area.width * Pango.SCALE); + layout.set_alignment (Pango.Alignment.CENTER); + context.set_state (state); + context.render_layout (ctx, + background_area.x, + background_area.y + this.thumbnail.height + 8, + layout); + + + /* Draw the thumbnail */ + Gdk.cairo_set_source_pixbuf (ctx, this.thumbnail, + (background_area.width - this.thumbnail.width) / 2, + cell_area.y + 3); + Gdk.cairo_rectangle (ctx, cell_area); + ctx.fill (); + + } +} diff -Nru totem-plugin-arte-3.1.2/ChangeLog totem-plugin-arte-3.2.1/ChangeLog --- totem-plugin-arte-3.1.2/ChangeLog 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/ChangeLog 2013-09-22 18:09:47.000000000 +0200 @@ -1,3 +1,118 @@ +commit 87ad236096c5e144278f32b439d483e07bde83b2 +Author: Simon Wenner <simon@wenner.ch> + + release 3.2.1 + +commit 5808864850c43cfa3bf6800a411c3353ace909cd +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Update translations + +commit 3f4c4765bd3c48043471a70e8d28b0a6ea589eda +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Do not use the same mnemonics multiple time (in English) + +commit f393e9937637440a5a36f5e28f66708204aca6d6 +Author: Simon Wenner <simon@wenner.ch> + + fixed the extraction of https video links + +commit 92f59af0fd1f64c99141d3f0abeb7db662924f1f +Author: Simon Wenner <simon@wenner.ch> + + update NEWS + +commit 3ce8665f001fed0fb7dd8952b1857372cfdd3722 +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Update and complete translations + +commit fd67f9d5c6a96623ac9ecb2eed4318ae9d5e04ee +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Add a mnemonic for the language setting + +commit 236157950b791b01bdbe592912fb595bc5fd5dbd +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Try to extract the player URI + +commit 8dae7f95651f505337545f0f5bd2cbd3cf81ce74 +Author: Simon Wenner <simon@wenner.ch> + + use MEDIUM as the default quality in the url-extractor too + +commit d325ea512f35ac8f48c24e75bc3db14e6dc7386a +Author: Simon Wenner <simon@wenner.ch> + + add release 3.2.0 news + +commit c856f630e9b32063cbb8a65b25e134e905e1c28d +Author: Simon Wenner <simon@wenner.ch> + + added support for low quality streams, medium is the new default quality + +commit 11e2ab67788665df517727b9c142a7062edfb875 +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Implement a (simpler) equivalent of "Totem.CellRendererVideo" + +commit afc8fdf12efed8c09038b085e78655f4ac061e3e +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Add *.vapi to .gitignore + +commit 36686474bd212267415477618bbf518c6a44f45a +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Update the README + +commit 81d8d84969dfb35d5e8ea794d41305e9b794286e +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Fix segfaults at startup when the language is set to French + +commit 9e94bfff983f2ef4eb2c1ca8c90e7751ce26eac3 +Author: Simon Wenner <simon@wenner.ch> + + added a new additional video feed based on json files. The access is much faster than the xml files. + +commit 69f147963ec2432421488be7a98af7dbbeb45722 +Author: Simon Wenner <simon@wenner.ch> + + update the RSS urls. Some are broken, let's hope they get fixed soon. + +commit a558b3213b826d46b4ab476c5bbef7b30849b4e4 +Author: Simon Wenner <simon@wenner.ch> + + reimplemented the RTMP stream extractor to fix video playback with the new website + +commit 870ff540e0f7ae8e458111995b38e3e7088e9831 +Author: Simon Wenner <simon@wenner.ch> + + release 3.1.3 + +commit bcd75c06822777432123cbe5229a45a3942b791c +Author: Simon Wenner <simon@wenner.ch> + + ConnectionStatus: make proxy_signal_cb private again + +commit e49acdfafdf626d0c21bac936ad59dbe7e7f9133 +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Fix compilation with valac-0.18 + +commit 7553f2a6eb3bae7acd398d843c5b9004682e5cf0 +Author: Nicolas Delvaux <contact@nicolas-delvaux.org> + + Fix compilation with libtotem 3.6 + +commit 63d2b34237cffe636b15cdb5173f9f6aef361fd7 +Author: Simon Wenner <simon@wenner.ch> + + release 3.1.2 + commit d654a1012ca0a1f2e0a164dd5b7066de95cce2ae Author: Simon Wenner <simon@wenner.ch> diff -Nru totem-plugin-arte-3.1.2/connection-status.vala totem-plugin-arte-3.2.1/connection-status.vala --- totem-plugin-arte-3.1.2/connection-status.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/connection-status.vala 2013-09-22 18:09:47.000000000 +0200 @@ -96,7 +96,7 @@ this.is_online = true; // online by default } - private void proxy_signal_cb (string sender_name, string signal_name, Variant parameters) + private void proxy_signal_cb (GLib.DBusProxy obj, string? sender_name, string signal_name, Variant parameters) { if (signal_name == "StateChanged") { diff -Nru totem-plugin-arte-3.1.2/debian/changelog totem-plugin-arte-3.2.1/debian/changelog --- totem-plugin-arte-3.1.2/debian/changelog 2012-09-15 14:15:20.000000000 +0200 +++ totem-plugin-arte-3.2.1/debian/changelog 2013-10-02 01:11:40.000000000 +0200 @@ -1,3 +1,12 @@ +totem-plugin-arte (3.2.1-1~wheezy1) stable; urgency=low + + * New upstream release + * Add a patch to build against Totem 3.0 (revert an upstream commit) + * Harden the binary, fix 2 lintian warnings + * Bump Debian Policy to 3.9.4 (no change needed) + + -- Nicolas Delvaux <contact@nicolas-delvaux.org> Wed, 02 Oct 2013 00:20:15 +0200 + totem-plugin-arte (3.1.2-1) unstable; urgency=medium * New upstream bug-fix only release diff -Nru totem-plugin-arte-3.1.2/debian/control totem-plugin-arte-3.2.1/debian/control --- totem-plugin-arte-3.1.2/debian/control 2012-05-06 13:41:04.000000000 +0200 +++ totem-plugin-arte-3.2.1/debian/control 2013-10-02 01:12:06.000000000 +0200 @@ -3,18 +3,20 @@ Priority: extra Maintainer: Nicolas Delvaux <contact@nicolas-delvaux.org> Build-Depends: debhelper (>= 8.0.0), - libtotem-dev, + dpkg-dev (>= 1.16.1~), + libtotem-dev (<< 3.5), valac-0.16, libgtk-3-dev, libsoup2.4-dev, libpeas-dev (>= 1.2.0), + libjson-glib-dev, gettext -Standards-Version: 3.9.3 +Standards-Version: 3.9.4 Homepage: http://gitorious.org/totem-plugin-arte Package: totem-plugin-arte Architecture: any -Depends: totem (>> 2.90), +Depends: totem (<< 3.5), gstreamer0.10-plugins-bad (>= 0.10.19.3), gstreamer0.10-ffmpeg, gsettings-desktop-schemas, diff -Nru totem-plugin-arte-3.1.2/debian/patches/series totem-plugin-arte-3.2.1/debian/patches/series --- totem-plugin-arte-3.1.2/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ totem-plugin-arte-3.2.1/debian/patches/series 2013-09-09 20:19:31.000000000 +0200 @@ -0,0 +1 @@ +totem-compatibility diff -Nru totem-plugin-arte-3.1.2/debian/patches/totem-compatibility totem-plugin-arte-3.2.1/debian/patches/totem-compatibility --- totem-plugin-arte-3.1.2/debian/patches/totem-compatibility 1970-01-01 01:00:00.000000000 +0100 +++ totem-plugin-arte-3.2.1/debian/patches/totem-compatibility 2013-10-02 00:35:24.000000000 +0200 @@ -0,0 +1,18 @@ +Description: Revert upstream commit to build with Totem < 3.6 + +--- + +Origin: vendor +Last-Update: 2013-10-02 + +--- totem-plugin-arte-3.1.3+git.orig/arteplus7.vala ++++ totem-plugin-arte-3.1.3+git/arteplus7.vala +@@ -492,7 +492,7 @@ class ArtePlugin : Peas.Activatable, Pea + return; + } + +- t.add_to_playlist_and_play (stream_url, title); ++ t.add_to_playlist_and_play (stream_url, title, false); + } + + private void callback_refresh_rss_feed () diff -Nru totem-plugin-arte-3.1.2/debian/rules totem-plugin-arte-3.2.1/debian/rules --- totem-plugin-arte-3.1.2/debian/rules 2011-10-23 15:04:56.000000000 +0200 +++ totem-plugin-arte-3.2.1/debian/rules 2013-10-02 00:22:41.000000000 +0200 @@ -4,12 +4,18 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# Hardening +# http://wiki.debian.org/Hardening +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk +VALAFLAGS:=$(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w)) + # Copied from the Makefile CC_ARGS=-X -fPIC -X -shared --Xcc="-D GETTEXT_PACKAGE=\"totem-arte\"" override_dh_auto_build: # Build without debug messages and without debug symbols - dh_auto_build -- VALA_ARGS='$(CC_ARGS)' + dh_auto_build -- VALA_ARGS='$(VALAFLAGS) $(CC_ARGS)' override_dh_auto_install: # Disable gsettings schemas compilation diff -Nru totem-plugin-arte-3.1.2/Makefile totem-plugin-arte-3.2.1/Makefile --- totem-plugin-arte-3.1.2/Makefile 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/Makefile 2013-09-22 18:09:47.000000000 +0200 @@ -1,9 +1,9 @@ DESTDIR= -VERSION=3.1.2 +VERSION=3.2.1 NAME=totem-plugin-arte PACKAGE=$(NAME)-$(VERSION) VALAC=valac -VALA_DEPS=--pkg Totem-1.0 --pkg PeasGtk-1.0 --pkg libsoup-2.4 --pkg gtk+-3.0 --pkg gio-2.0 +VALA_DEPS=--pkg Totem-1.0 --pkg PeasGtk-1.0 --pkg libsoup-2.4 --pkg gtk+-3.0 --pkg gio-2.0 --pkg json-glib-1.0 CC_ARGS=-X -fPIC -X -shared --Xcc="-D GETTEXT_PACKAGE=\"totem-arte\"" VALA_ARGS=-D DEBUG_MESSAGES $(CC_ARGS) -g VALA_SOURCE=\ @@ -12,6 +12,7 @@ cache.vala \ url-extractor.vala \ video.vala \ + cell-renderer-video.vala \ video-list-view.vala \ connection-status.vala EXTRA_DIST=\ diff -Nru totem-plugin-arte-3.1.2/NEWS totem-plugin-arte-3.2.1/NEWS --- totem-plugin-arte-3.1.2/NEWS 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/NEWS 2013-09-22 18:09:47.000000000 +0200 @@ -1,3 +1,23 @@ +2013 September 22th - Totem Arte Plugin 3.2.1 + +Changes since 3.2.0: + * Fixed the extraction of https video links + * Fixed preferences mnemonics in English + +2013 September 10th - Totem Arte Plugin 3.2.0 + +Changes since 3.1.3: + * Fix stream extraction from the new Arte website + * Reimplementation of the removed Totem.CellRenderVideo + * New and more efficient primary video feed source (JSON) + * Support for low quality streams + * Minor bug fixes and translation updates + +2012 December 9th - Totem Arte Plugin 3.1.3 + +Changes since 3.1.2: + * Fix compilation with Vala 0.18 and Totem 3.6.0 + 2012 September 15th - Totem Arte Plugin 3.1.2 Changes since 3.1.1: diff -Nru totem-plugin-arte-3.1.2/org.gnome.totem.plugins.arteplus7.gschema.xml totem-plugin-arte-3.2.1/org.gnome.totem.plugins.arteplus7.gschema.xml --- totem-plugin-arte-3.1.2/org.gnome.totem.plugins.arteplus7.gschema.xml 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/org.gnome.totem.plugins.arteplus7.gschema.xml 2013-09-22 18:09:47.000000000 +0200 @@ -4,6 +4,7 @@ <value value="0" nick="Unknown"/> <value value="1" nick="Medium"/> <value value="2" nick="High"/> + <value value="3" nick="Low"/> </enum> <enum id="org.gnome.Totem.arteplus7.language"> <value value="0" nick="Unknown"/> @@ -12,7 +13,7 @@ </enum> <schema id="org.gnome.Totem.arteplus7" path="/org/gnome/Totem/arteplus7/"> <key name="quality" enum="org.gnome.Totem.arteplus7.quality"> - <default>'High'</default> + <default>'Medium'</default> <summary>Quality</summary> <description>The video stream quality.</description> </key> diff -Nru totem-plugin-arte-3.1.2/po/arte-totem.pot totem-plugin-arte-3.2.1/po/arte-totem.pot --- totem-plugin-arte-3.1.2/po/arte-totem.pot 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/po/arte-totem.pot 2013-09-22 18:09:47.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-02 20:26+0200\n" +"POT-Creation-Date: 2013-09-20 19:28+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,76 +17,80 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:157 +#: ../arteplus7.vala:176 msgid "Reload feed" msgstr "" -#: ../arteplus7.vala:161 +#: ../arteplus7.vala:180 msgid "Clear the search text" msgstr "" -#: ../arteplus7.vala:190 +#: ../arteplus7.vala:209 msgid "Arte+7" msgstr "" -#: ../arteplus7.vala:228 +#: ../arteplus7.vala:247 msgid "French" msgstr "" -#: ../arteplus7.vala:229 +#: ../arteplus7.vala:248 msgid "German" msgstr "" -#: ../arteplus7.vala:259 +#: ../arteplus7.vala:278 +msgid "l_ow" +msgstr "" + +#: ../arteplus7.vala:280 msgid "_medium" msgstr "" -#: ../arteplus7.vala:261 +#: ../arteplus7.vala:282 msgid "_high" msgstr "" -#: ../arteplus7.vala:291 -msgid "Language:" +#: ../arteplus7.vala:329 +msgid "_Language:" msgstr "" -#: ../arteplus7.vala:296 +#: ../arteplus7.vala:337 msgid "Video quality:" msgstr "" #. display offline message -#: ../arteplus7.vala:313 +#: ../arteplus7.vala:355 msgid "No internet connection." msgstr "" #. display loading message -#: ../arteplus7.vala:330 +#: ../arteplus7.vala:372 msgid "Loading..." msgstr "" -#: ../arteplus7.vala:389 +#: ../arteplus7.vala:431 msgid "Markup Parser Error" msgstr "" -#: ../arteplus7.vala:390 +#: ../arteplus7.vala:432 msgid "Sorry, the plugin could not parse the Arte video feed." msgstr "" -#: ../arteplus7.vala:392 +#: ../arteplus7.vala:434 msgid "Network problem" msgstr "" -#: ../arteplus7.vala:393 +#: ../arteplus7.vala:435 msgid "" "Sorry, the plugin could not download the Arte video feed.\n" "Please verify your network settings and (if any) your proxy settings." msgstr "" #. This video access is restricted -#: ../arteplus7.vala:461 +#: ../arteplus7.vala:503 msgid "This video access is restricted" msgstr "" -#: ../arteplus7.vala:462 +#: ../arteplus7.vala:504 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -95,11 +99,11 @@ msgstr "" #. The video is part of the XML/RSS feed but no stream is available yet -#: ../arteplus7.vala:465 +#: ../arteplus7.vala:507 msgid "This video is not available yet" msgstr "" -#: ../arteplus7.vala:466 +#: ../arteplus7.vala:508 msgid "" "Sorry, the plugin could not find any stream URL.\n" "It seems that this video is not available yet, even on the Arte web-player.\n" @@ -109,17 +113,17 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:469 ../arteplus7.vala:473 +#: ../arteplus7.vala:511 ../arteplus7.vala:515 msgid "Video URL Extraction Error" msgstr "" -#: ../arteplus7.vala:470 +#: ../arteplus7.vala:512 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Please verify your network settings and (if any) your proxy settings." msgstr "" -#: ../arteplus7.vala:474 +#: ../arteplus7.vala:516 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Perhaps this stream is not yet available, you may retry in a few minutes.\n" diff -Nru totem-plugin-arte-3.1.2/po/de.po totem-plugin-arte-3.2.1/po/de.po --- totem-plugin-arte-3.1.2/po/de.po 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/po/de.po 2013-09-22 18:09:47.000000000 +0200 @@ -1,78 +1,82 @@ # I18n file for Arte+7 totem plugin -# Copyright (C) 2010, 2011, 2012 Simon Wenner <simon@wenner.ch> +# Copyright (C) 2013 Simon Wenner <simon@wenner.ch> # This file is distributed under the same license as the Totem Arte Plugin package. # This file was first created by Nicolas Delvaux <contact@nicolas-delvaux.org>, 2010. # msgid "" msgstr "" -"Project-Id-Version: 3.1.0\n" +"Project-Id-Version: 3.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-02 20:26+0200\n" -"PO-Revision-Date: 2012-05-02 20:30+0200\n" +"POT-Creation-Date: 2013-09-20 19:28+0200\n" +"PO-Revision-Date: 2012-05-02 22:51+0200\n" "Last-Translator: Nicolas Delvaux <contact@nicolas-delvaux.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:157 +#: ../arteplus7.vala:176 msgid "Reload feed" msgstr "Videos aktualisieren" -#: ../arteplus7.vala:161 +#: ../arteplus7.vala:180 msgid "Clear the search text" msgstr "Suchtext löschen" -#: ../arteplus7.vala:190 +#: ../arteplus7.vala:209 msgid "Arte+7" msgstr "Arte+7" -#: ../arteplus7.vala:228 +#: ../arteplus7.vala:247 msgid "French" msgstr "Französisch" -#: ../arteplus7.vala:229 +#: ../arteplus7.vala:248 msgid "German" msgstr "Deutsch" -#: ../arteplus7.vala:259 +#: ../arteplus7.vala:278 +msgid "l_ow" +msgstr "_niedrig" + +#: ../arteplus7.vala:280 msgid "_medium" msgstr "_mittel" -#: ../arteplus7.vala:261 +#: ../arteplus7.vala:282 msgid "_high" msgstr "_hoch" -#: ../arteplus7.vala:291 -msgid "Language:" -msgstr "Sprache:" +#: ../arteplus7.vala:329 +msgid "_Language:" +msgstr "_Sprache:" -#: ../arteplus7.vala:296 +#: ../arteplus7.vala:337 msgid "Video quality:" msgstr "Videoqualität:" #. display offline message -#: ../arteplus7.vala:313 +#: ../arteplus7.vala:355 msgid "No internet connection." msgstr "Keine Internetverbindung." #. display loading message -#: ../arteplus7.vala:330 +#: ../arteplus7.vala:372 msgid "Loading..." msgstr "Lade..." -#: ../arteplus7.vala:389 +#: ../arteplus7.vala:431 msgid "Markup Parser Error" msgstr "Markup Lesefehler" -#: ../arteplus7.vala:390 +#: ../arteplus7.vala:432 msgid "Sorry, the plugin could not parse the Arte video feed." msgstr "Entschuldigung, das Plugin konnte den Arte-Videofeed nicht lesen." -#: ../arteplus7.vala:392 +#: ../arteplus7.vala:434 msgid "Network problem" msgstr "Verbindungsproblem" -#: ../arteplus7.vala:393 +#: ../arteplus7.vala:435 msgid "" "Sorry, the plugin could not download the Arte video feed.\n" "Please verify your network settings and (if any) your proxy settings." @@ -82,11 +86,11 @@ "Einstellungen." #. This video access is restricted -#: ../arteplus7.vala:461 +#: ../arteplus7.vala:503 msgid "This video access is restricted" msgstr "Dieses Video ist nur eingeschränkt verfügbar" -#: ../arteplus7.vala:462 +#: ../arteplus7.vala:504 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -99,11 +103,11 @@ "Versuchen sie es erneut, z.B. zwischen 23:00 und 5:00 Uhr." #. The video is part of the XML/RSS feed but no stream is available yet -#: ../arteplus7.vala:465 +#: ../arteplus7.vala:507 msgid "This video is not available yet" msgstr "Video ist nocht nicht verfügbar" -#: ../arteplus7.vala:466 +#: ../arteplus7.vala:508 msgid "" "Sorry, the plugin could not find any stream URL.\n" "It seems that this video is not available yet, even on the Arte web-player.\n" @@ -118,11 +122,11 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:469 ../arteplus7.vala:473 +#: ../arteplus7.vala:511 ../arteplus7.vala:515 msgid "Video URL Extraction Error" msgstr "Video URL Extraktionsfehler" -#: ../arteplus7.vala:470 +#: ../arteplus7.vala:512 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Please verify your network settings and (if any) your proxy settings." @@ -131,7 +135,7 @@ "Bitte überprüfen sie Ihre Netzwerk- und (falls vorhanden) Proxy-" "Einstellungen." -#: ../arteplus7.vala:474 +#: ../arteplus7.vala:516 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Perhaps this stream is not yet available, you may retry in a few minutes.\n" @@ -177,5 +181,3 @@ msgid "_Open in Web Browser" msgstr "Link im Browser ö_ffnen" -#~ msgid "Arte+7 Plugin Properties" -#~ msgstr "Arte+7 Plugin-Einstellungen" diff -Nru totem-plugin-arte-3.1.2/po/fr.po totem-plugin-arte-3.2.1/po/fr.po --- totem-plugin-arte-3.1.2/po/fr.po 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/po/fr.po 2013-09-22 18:09:47.000000000 +0200 @@ -1,78 +1,82 @@ # I18n file for Arte+7 totem plugin -# Copyright (C) 2010, 2011, 2012 Simon Wenner <simon@wenner.ch> +# Copyright (C) 2013 Simon Wenner <simon@wenner.ch> # This file is distributed under the same license as the Totem Arte Plugin package. # This file was first created by Nicolas Delvaux <contact@nicolas-delvaux.org>, 2010. # msgid "" msgstr "" -"Project-Id-Version: 3.1.0\n" +"Project-Id-Version: 3.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2012-05-02 20:26+0200\n" -"PO-Revision-Date: 2012-05-02 20:28+0200\n" +"POT-Creation-Date: 2013-09-20 19:28+0200\n" +"PO-Revision-Date: 2013-09-10 22:44+0200\n" "Last-Translator: Nicolas Delvaux <contact@nicolas-delvaux.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:157 +#: ../arteplus7.vala:176 msgid "Reload feed" msgstr "Recharger la liste des vidéos" -#: ../arteplus7.vala:161 +#: ../arteplus7.vala:180 msgid "Clear the search text" msgstr "Effacer le texte recherché" -#: ../arteplus7.vala:190 +#: ../arteplus7.vala:209 msgid "Arte+7" msgstr "Arte+7" -#: ../arteplus7.vala:228 +#: ../arteplus7.vala:247 msgid "French" msgstr "Français" -#: ../arteplus7.vala:229 +#: ../arteplus7.vala:248 msgid "German" msgstr "Allemand" -#: ../arteplus7.vala:259 +#: ../arteplus7.vala:278 +msgid "l_ow" +msgstr "_basse" + +#: ../arteplus7.vala:280 msgid "_medium" msgstr "_moyenne" -#: ../arteplus7.vala:261 +#: ../arteplus7.vala:282 msgid "_high" msgstr "_haute" -#: ../arteplus7.vala:291 -msgid "Language:" -msgstr "Langage :" +#: ../arteplus7.vala:329 +msgid "_Language:" +msgstr "_Langage :" -#: ../arteplus7.vala:296 +#: ../arteplus7.vala:337 msgid "Video quality:" msgstr "Qualité vidéo :" #. display offline message -#: ../arteplus7.vala:313 +#: ../arteplus7.vala:355 msgid "No internet connection." msgstr "Pas de connexion Internet." #. display loading message -#: ../arteplus7.vala:330 +#: ../arteplus7.vala:372 msgid "Loading..." msgstr "Chargement..." -#: ../arteplus7.vala:389 +#: ../arteplus7.vala:431 msgid "Markup Parser Error" msgstr "Erreur de l'analyseur syntaxique" -#: ../arteplus7.vala:390 +#: ../arteplus7.vala:432 msgid "Sorry, the plugin could not parse the Arte video feed." msgstr "Désolé, le greffon n'a pas pu analyser le flux vidéo Arte." -#: ../arteplus7.vala:392 +#: ../arteplus7.vala:434 msgid "Network problem" msgstr "Problème réseau" -#: ../arteplus7.vala:393 +#: ../arteplus7.vala:435 msgid "" "Sorry, the plugin could not download the Arte video feed.\n" "Please verify your network settings and (if any) your proxy settings." @@ -82,11 +86,11 @@ "paramètres de votre proxy." #. This video access is restricted -#: ../arteplus7.vala:461 +#: ../arteplus7.vala:503 msgid "This video access is restricted" msgstr "L'accès à cette vidéo est restreint" -#: ../arteplus7.vala:462 +#: ../arteplus7.vala:504 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -99,11 +103,11 @@ "Vous pouvez réessayer plus tard, par exemple entre 23h et 5h." #. The video is part of the XML/RSS feed but no stream is available yet -#: ../arteplus7.vala:465 +#: ../arteplus7.vala:507 msgid "This video is not available yet" msgstr "Cette vidéo n'est pas encore disponible" -#: ../arteplus7.vala:466 +#: ../arteplus7.vala:508 msgid "" "Sorry, the plugin could not find any stream URL.\n" "It seems that this video is not available yet, even on the Arte web-player.\n" @@ -118,11 +122,11 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:469 ../arteplus7.vala:473 +#: ../arteplus7.vala:511 ../arteplus7.vala:515 msgid "Video URL Extraction Error" msgstr "Erreur d'extraction de l'URL de la vidéo" -#: ../arteplus7.vala:470 +#: ../arteplus7.vala:512 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Please verify your network settings and (if any) your proxy settings." @@ -131,7 +135,7 @@ "Veuillez vérifier les paramètres de votre connexion et (si besoin) les " "paramètres de votre proxy." -#: ../arteplus7.vala:474 +#: ../arteplus7.vala:516 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Perhaps this stream is not yet available, you may retry in a few minutes.\n" @@ -176,6 +180,3 @@ #: ../video-list-view.vala:281 msgid "_Open in Web Browser" msgstr "_Ouvrir dans le navigateur Web" - -#~ msgid "Arte+7 Plugin Properties" -#~ msgstr "Préférences du greffon Arte+7" diff -Nru totem-plugin-arte-3.1.2/README totem-plugin-arte-3.2.1/README --- totem-plugin-arte-3.1.2/README 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/README 2013-09-22 18:09:47.000000000 +0200 @@ -7,19 +7,21 @@ --------------- Dependencies: --------------- -Totem >= 3.0 +Totem >= 3.6 libpeas >= 1.2.0 Vala >= 0.15.0 Gtk+-3.0 libsoup2.4 libglib >= 2.25.15 +libjson-glib gstreamer-plugins-bad >= 0.10.20 gsettings-desktop-schemas Network-Manager (optional) On Debian or Ubuntu: -# aptitude install valac-0.16 libgtk3.0-dev libtotem-dev libpeas-dev \ -libsoup2.4-dev gettext gstreamer0.10-plugins-bad gsettings-desktop-schemas +# aptitude install valac-0.16 libgtk-3-dev libtotem-dev libpeas-dev \ +libsoup2.4-dev gettext gstreamer0.10-plugins-bad gsettings-desktop-schemas \ +libjson-glib-dev --------------- Installation: diff -Nru totem-plugin-arte-3.1.2/url-extractor.vala totem-plugin-arte-3.2.1/url-extractor.vala --- totem-plugin-arte-3.1.2/url-extractor.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/url-extractor.vala 2013-09-22 18:09:47.000000000 +0200 @@ -28,6 +28,7 @@ using GLib; using Soup; +using Json; public errordomain ExtractionError { @@ -82,88 +83,77 @@ public string get_url (VideoQuality q, Language lang, string page_url) throws ExtractionError { - string regexp, url; + string regexp; debug ("Initial Page URL:\t\t'%s'", page_url); - /* Setup the language string */ - string lang_str = "fr"; - if (lang == Language.GERMAN) - lang_str = "de"; - - /* Setup quality string */ - string quali_str = "hd"; - if (q == VideoQuality.MEDIUM) - quali_str = "sd"; - - /* Get the Arte Flash player URI */ - // Example: - // var url_player = "http://videos.arte.tv/blob/web/i18n/view/player_9-3188338-data-4807088.swf"; - regexp = "var url_player = \"(http://.*.swf)\";"; - var flash_player_uri = extract_string_from_page (page_url, regexp); - debug ("Extract Flash player URI:\t'%s'", flash_player_uri); - if (flash_player_uri == null) + /* JSON uri */ + regexp = "arte_vp_url=\"(https?://.*.json)\">"; + var json_uri = extract_string_from_page (page_url, regexp); + debug ("Extract JSON URI:\t'%s'", json_uri); + if (json_uri == null) throw new ExtractionError.EXTRACTION_FAILED ("Video URL Extraction Error"); - /* Get the Flash XML data */ - // Example: - // vars_player.videorefFileUrl = "http://videos.arte.tv/de/do_delegate/videos/geheimnisvolle_pflanzen-3219416,view,asPlayerXml.xml"; - regexp = "videorefFileUrl = \"(http://.*.xml)\";"; - url = extract_string_from_page (page_url, regexp); - debug ("Extract Flash Videoref:\t'%s'", url); - if (url == null) - throw new ExtractionError.EXTRACTION_FAILED ("Video URL Extraction Error"); + /* download and parse the main JSON file */ + var message = new Soup.Message ("GET", json_uri); + this.session.send_message (message); - /* Get the language specific flash XML data */ - // Example: - // <video lang="de" ref="http://videos.arte.tv/de/do_delegate/videos/geheimnisvolle_pflanzen-3219418,view,asPlayerXml.xml"/> - // <video lang="fr" ref="http://videos.arte.tv/fr/do_delegate/videos/secrets_de_plantes-3219420,view,asPlayerXml.xml"/> - regexp = "video lang=\"" + lang_str + "\" ref=\"(http://.*.xml)\""; - url = extract_string_from_page (url, regexp); - debug ("Extract Flash Lang Videoref:\t'%s'", url); + string rtmp_uri = null; - if (url == null) - throw new ExtractionError.EXTRACTION_FAILED ("Video URL Extraction Error"); + // TODO detect if a video is only availabe after 23:00 + + try { + var parser = new Json.Parser (); + parser.load_from_data ((string) message.response_body.flatten ().data, -1); - /* Get the RTMP uri. */ - // Example: - // <url quality="hd">rtmp://artestras.fcod.llnwd.net/a3903/o35/MP4:geo/videothek/EUR_DE_FR/arteprod/A7_SGT_ENC_08_037778-021-B_PG_HQ_FR?h=7258f52f54eb0d320f6650e647432f03</url> - // <url quality="sd">rtmp://artestras.fcod.llnwd.net/a3903/o35/MP4:geo/videothek/EUR_DE_FR/arteprod/A7_SGT_ENC_06_037778-021-B_PG_MQ_FR?h=76c529bce0f034e74dc92a14549d6a4e</url> - regexp = "quality=\"" + quali_str + "\">(rtmp://.*)</url>"; - var rtmp_uri = extract_string_from_page (url, regexp); - debug ("Extract RTMP URI:\t\t'%s'", rtmp_uri); - - /* sometimes only one quality level is available */ - if (rtmp_uri == null) { - if (q == VideoQuality.HIGH) { - q = VideoQuality.MEDIUM; - quali_str = "sd"; - GLib.warning ("No high quality stream available. Fallback to medium quality."); - } else if (q == VideoQuality.MEDIUM) { - q = VideoQuality.HIGH; - quali_str = "hd"; - GLib.warning ("No medium quality stream available. Fallback to high quality."); + var root_object = parser.get_root ().get_object (); + var player_object = root_object.get_object_member ("videoJsonPlayer"); + var streams_object = player_object.get_object_member ("VSR"); + Json.Object video_object; + + switch (q) { + case VideoQuality.LOW: + video_object = streams_object.get_object_member ("RTMP_LQ_1"); + break; + case VideoQuality.HIGH: + video_object = streams_object.get_object_member ("RTMP_SQ_1"); + break; + default: // MEDIUM is the default + video_object = streams_object.get_object_member ("RTMP_MQ_1"); // or "RTMP_EQ_1" ? + break; } - regexp = "quality=\"" + quali_str + "\">(rtmp://.*)</url>"; - rtmp_uri = extract_string_from_page (url, regexp); - debug ("Extract RTMP URI:\t\t'%s'", rtmp_uri); - if (rtmp_uri == null) - throw new ExtractionError.STREAM_NOT_READY ("This video is not available yet"); + string streamer = video_object.get_string_member ("streamer"); + string url = video_object.get_string_member ("url"); + debug ("Streamer base:\t'%s'", streamer); + debug ("Streamer path:\t'%s'", url); + + rtmp_uri = streamer + "mp4:" + url; + + } catch (Error e) { + throw new ExtractionError.EXTRACTION_FAILED ("Video URL Extraction Error"); } - /* detect videos with temporal restrictions */ - if (rtmp_uri.has_suffix ("/carton_23h_fr.mp4") || rtmp_uri.has_suffix ("/carton_23h_de.mp4")) - throw new ExtractionError.ACCESS_RESTRICTED ("This video is not available currently"); - - /* Build the stream URI - * To prevent regular disconnections (and so to keep the plugin usable), - * we need to pass the Flash player uri to GStreamer. - * We do that by appending it to the stream uri. - * (see the librtmp manual for more information) */ - // Example: - // rtmp://artestras.fcod.llnwd.net/a3903/o35/MP4:geo/videothek/EUR_DE_FR/arteprod/A7_SGT_ENC_08_042143-002-A_PG_HQ_FR?h=d7878fae5c9726844d22da78e05f764e swfVfy=1 swfUrl=http://videos.arte.tv/blob/web/i18n/view/player_9-3188338-data-4807088.swf - string stream_uri = rtmp_uri + " swfVfy=1 swfUrl=" + flash_player_uri; + + // Try to figure out the player URI + string player_uri; + try { + regexp = "content=\"(http.*.swf)\\?"; + var embeded_uri = "http://player.arte.tv/v2/index.php?json_url=" + json_uri + "&config=arte_tvguide"; + player_uri = extract_string_from_page (embeded_uri, regexp); + debug ("Extract player URI:\t'%s'", player_uri); + if (player_uri == null) { + throw new ExtractionError.EXTRACTION_FAILED ("Player URL Extraction Error"); + } + } catch (Error e) { + // Do not abort and try to play the video with a known old player URI. + // The server does not seems to always check the player validity, so it may work anyway. + debug ("Failed to extract the flash player URI! Trying to fallback..."); + player_uri = "http://www.arte.tv/playerv2/jwplayer5/mediaplayer.5.7.1894.swf"; + } + + + string stream_uri = rtmp_uri + " swfVfy=1 swfUrl=" + player_uri; debug ("Build stream URI:\t\t'%s'", stream_uri); return stream_uri; diff -Nru totem-plugin-arte-3.1.2/video-list-view.vala totem-plugin-arte-3.2.1/video-list-view.vala --- totem-plugin-arte-3.1.2/video-list-view.vala 2012-09-15 13:40:03.000000000 +0200 +++ totem-plugin-arte-3.2.1/video-list-view.vala 2013-09-22 18:09:47.000000000 +0200 @@ -51,7 +51,7 @@ cache = c; /* setup cell style */ - var renderer = new Totem.CellRendererVideo (false); + var renderer = new CellRendererVideo (); insert_column_with_attributes (0, "", renderer, "thumbnail", Col.IMAGE, "title", Col.NAME, null);
Attachment:
signature.asc
Description: Digital signature