diff -Nru totem-plugin-arte-3.2.1/arteplus7.vala totem-plugin-arte-3.2.2/arteplus7.vala --- totem-plugin-arte-3.2.1/arteplus7.vala 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/arteplus7.vala 2014-10-06 20:59:57.000000000 +0200 @@ -35,10 +35,12 @@ public enum VideoQuality { + // The strange ordering is for keeping compatibility with saved settings UNKNOWN = 0, - MEDIUM, - HIGH, - LOW + MEDIUM, // 400p + HD, // 720p + LOW, // 220p + HIGH // 400p, much better audio/video bitrate than medium } public enum Language @@ -275,11 +277,13 @@ } }); - var quali_radio_low = new Gtk.RadioButton.with_mnemonic (null, _("l_ow")); + var quali_radio_low = new Gtk.RadioButton.with_mnemonic (null, _("l_ow (220p)")); var quali_radio_medium = new Gtk.RadioButton.with_mnemonic_from_widget ( - quali_radio_low, _("_medium")); + quali_radio_low, _("_medium (400p)")); var quali_radio_high = new Gtk.RadioButton.with_mnemonic_from_widget ( - quali_radio_medium, _("_high")); + quali_radio_medium, _("_high (400p, better encoding)")); + var quali_radio_hd = new Gtk.RadioButton.with_mnemonic_from_widget ( + quali_radio_high, _("H_D (720p)")); switch (quality) { case VideoQuality.LOW: quali_radio_low.set_active (true); @@ -287,9 +291,12 @@ case VideoQuality.MEDIUM: quali_radio_medium.set_active (true); break; - default: + case VideoQuality.HIGH: quali_radio_high.set_active (true); break; + default: + quali_radio_hd.set_active (true); + break; } /* reusable lambda function */ @@ -299,8 +306,10 @@ this.quality = VideoQuality.LOW; else if (quali_radio_medium.get_active ()) this.quality = VideoQuality.MEDIUM; - else + else if (quali_radio_high.get_active ()) this.quality = VideoQuality.HIGH; + else + this.quality = VideoQuality.HD; if (last != this.quality) { if (!settings.set_enum ("quality", (int) this.quality)) @@ -311,6 +320,7 @@ quali_radio_low.toggled.connect (() => { quality_toggle_clicked(); }); quali_radio_medium.toggled.connect (() => { quality_toggle_clicked(); }); quali_radio_high.toggled.connect (() => { quality_toggle_clicked(); }); + quali_radio_hd.toggled.connect (() => { quality_toggle_clicked(); }); settings.changed["quality"].connect (() => { var q = settings.get_enum ("quality"); @@ -320,9 +330,12 @@ } else if (q == VideoQuality.MEDIUM) { quality = VideoQuality.MEDIUM; quali_radio_medium.set_active (true); - } else { + } else if (q == VideoQuality.HIGH) { quality = VideoQuality.HIGH; quali_radio_high.set_active (true); + } else { + quality = VideoQuality.HD; + quali_radio_hd.set_active (true); } }); @@ -339,7 +352,8 @@ 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); + quali_box.pack_start (quali_radio_high, false, true, 0); + quali_box.pack_start (quali_radio_hd, true, true, 0); var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 20); vbox.pack_start (langs_box, false, true, 0); @@ -476,7 +490,7 @@ } if (quality == VideoQuality.UNKNOWN) { - quality = VideoQuality.HIGH; // default quality + quality = VideoQuality.HD; // default quality if (!settings.set_enum ("quality", (int) quality)) GLib.warning ("Storing the quality setting failed."); } diff -Nru totem-plugin-arte-3.2.1/ChangeLog totem-plugin-arte-3.2.2/ChangeLog --- totem-plugin-arte-3.2.1/ChangeLog 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/ChangeLog 2014-10-06 20:59:57.000000000 +0200 @@ -1,3 +1,58 @@ +commit 8b1783894817ee81c6257521e185b517d5f5c1d5 +Author: Simon Wenner + + updated NEWS, prepared the 3.2.2 release + +commit b65ab33d79ed654940816b0216cc62716d5e2d86 +Author: Nicolas Delvaux + + Update translations + +commit 048f2dcfc21789b6987a67bf15ab0f090fbdcad8 +Author: Nicolas Delvaux + + Rename "High" to "HD" and expose "EQ" streams as "High" + +commit ea439b17b73b85f1fa11649de8a86f0595ba0b9e +Author: Nicolas Delvaux + + Retrieve HTTP video links if possible + +commit 31bd0d57e11e7633b13fa9721de20539d5ef2e12 +Author: Nicolas Delvaux + + Fix the Json URI extraction + +commit 6fc214eac0a4e862e8a37df68e815afffce8c0d3 +Author: Simon Wenner + + removed the grilo-plugin from the master branch + +commit 2f2d676da9b5a56020eec8b07d2a85ef17e67bcd +Author: Simon Wenner + + grilo: use the proper function overrides (vapi is still broken) + +commit 215d5d18cec517f7b566d1a9038d1a8c845088ce +Author: Simon Wenner + + improved grilo plugin loading, added an Arte grilo source skeleton class + +commit eceb068cacd182c032d881eeafd930e64095cf0a +Author: Simon Wenner + + fixed grilo plugin loading + +commit 1fd02eccfa5c8ec6a5f3e45a227a7d50cb74c975 +Author: Simon Wenner + + added a non working start for a grilo plugin + +commit 63b62c0f3f0ae244f36997d46d208d59d2d7d249 +Author: Simon Wenner + + fixed player uri extraction + commit 87ad236096c5e144278f32b439d483e07bde83b2 Author: Simon Wenner diff -Nru totem-plugin-arte-3.2.1/debian/changelog totem-plugin-arte-3.2.2/debian/changelog --- totem-plugin-arte-3.2.1/debian/changelog 2014-02-14 21:19:44.000000000 +0100 +++ totem-plugin-arte-3.2.2/debian/changelog 2014-11-09 22:21:30.000000000 +0100 @@ -1,3 +1,9 @@ +totem-plugin-arte (3.2.2-0ubuntu1) vivid; urgency=medium + + * New upstream release, closes: LP: #1368596 + + -- Nicolas Delvaux Sun, 09 Nov 2014 21:24:11 +0100 + totem-plugin-arte (3.2.1-2) unstable; urgency=low * Do not build depends on a specific valac, closes: #739001 diff -Nru totem-plugin-arte-3.2.1/debian/control totem-plugin-arte-3.2.2/debian/control --- totem-plugin-arte-3.2.1/debian/control 2014-02-14 21:32:45.000000000 +0100 +++ totem-plugin-arte-3.2.2/debian/control 2014-11-09 21:23:54.000000000 +0100 @@ -11,7 +11,7 @@ libpeas-dev (>= 1.2.0), libjson-glib-dev, gettext -Standards-Version: 3.9.4 +Standards-Version: 3.9.5 Homepage: http://gitorious.org/totem-plugin-arte Package: totem-plugin-arte diff -Nru totem-plugin-arte-3.2.1/Makefile totem-plugin-arte-3.2.2/Makefile --- totem-plugin-arte-3.2.1/Makefile 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/Makefile 2014-10-06 20:59:57.000000000 +0200 @@ -1,5 +1,5 @@ DESTDIR= -VERSION=3.2.1 +VERSION=3.2.2 NAME=totem-plugin-arte PACKAGE=$(NAME)-$(VERSION) VALAC=valac diff -Nru totem-plugin-arte-3.2.1/NEWS totem-plugin-arte-3.2.2/NEWS --- totem-plugin-arte-3.2.1/NEWS 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/NEWS 2014-10-06 20:59:57.000000000 +0200 @@ -1,3 +1,9 @@ +2014 October 6th - Totem Arte Plugin 3.2.2 + +Changes since 3.2.1: + * Fixed JSON URI extraction + * Updated stream names + 2013 September 22th - Totem Arte Plugin 3.2.1 Changes since 3.2.0: diff -Nru totem-plugin-arte-3.2.1/org.gnome.totem.plugins.arteplus7.gschema.xml totem-plugin-arte-3.2.2/org.gnome.totem.plugins.arteplus7.gschema.xml --- totem-plugin-arte-3.2.1/org.gnome.totem.plugins.arteplus7.gschema.xml 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/org.gnome.totem.plugins.arteplus7.gschema.xml 2014-10-06 20:59:57.000000000 +0200 @@ -3,8 +3,9 @@ - + + diff -Nru totem-plugin-arte-3.2.1/po/arte-totem.pot totem-plugin-arte-3.2.2/po/arte-totem.pot --- totem-plugin-arte-3.2.1/po/arte-totem.pot 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/po/arte-totem.pot 2014-10-06 20:59:57.000000000 +0200 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-20 19:28+0200\n" +"POT-Creation-Date: 2014-09-13 01:25+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,80 +17,84 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:176 +#: ../arteplus7.vala:178 msgid "Reload feed" msgstr "" -#: ../arteplus7.vala:180 +#: ../arteplus7.vala:182 msgid "Clear the search text" msgstr "" -#: ../arteplus7.vala:209 +#: ../arteplus7.vala:211 msgid "Arte+7" msgstr "" -#: ../arteplus7.vala:247 +#: ../arteplus7.vala:249 msgid "French" msgstr "" -#: ../arteplus7.vala:248 +#: ../arteplus7.vala:250 msgid "German" msgstr "" -#: ../arteplus7.vala:278 -msgid "l_ow" -msgstr "" - #: ../arteplus7.vala:280 -msgid "_medium" +msgid "l_ow (220p)" msgstr "" #: ../arteplus7.vala:282 -msgid "_high" +msgid "_medium (400p)" +msgstr "" + +#: ../arteplus7.vala:284 +msgid "_high (400p, better encoding)" +msgstr "" + +#: ../arteplus7.vala:286 +msgid "H_D (720p)" msgstr "" -#: ../arteplus7.vala:329 +#: ../arteplus7.vala:342 msgid "_Language:" msgstr "" -#: ../arteplus7.vala:337 +#: ../arteplus7.vala:350 msgid "Video quality:" msgstr "" #. display offline message -#: ../arteplus7.vala:355 +#: ../arteplus7.vala:369 msgid "No internet connection." msgstr "" #. display loading message -#: ../arteplus7.vala:372 +#: ../arteplus7.vala:386 msgid "Loading..." msgstr "" -#: ../arteplus7.vala:431 +#: ../arteplus7.vala:445 msgid "Markup Parser Error" msgstr "" -#: ../arteplus7.vala:432 +#: ../arteplus7.vala:446 msgid "Sorry, the plugin could not parse the Arte video feed." msgstr "" -#: ../arteplus7.vala:434 +#: ../arteplus7.vala:448 msgid "Network problem" msgstr "" -#: ../arteplus7.vala:435 +#: ../arteplus7.vala:449 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:503 +#: ../arteplus7.vala:517 msgid "This video access is restricted" msgstr "" -#: ../arteplus7.vala:504 +#: ../arteplus7.vala:518 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -99,11 +103,11 @@ msgstr "" #. The video is part of the XML/RSS feed but no stream is available yet -#: ../arteplus7.vala:507 +#: ../arteplus7.vala:521 msgid "This video is not available yet" msgstr "" -#: ../arteplus7.vala:508 +#: ../arteplus7.vala:522 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" @@ -113,17 +117,17 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:511 ../arteplus7.vala:515 +#: ../arteplus7.vala:525 ../arteplus7.vala:529 msgid "Video URL Extraction Error" msgstr "" -#: ../arteplus7.vala:512 +#: ../arteplus7.vala:526 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:516 +#: ../arteplus7.vala:530 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.2.1/po/de.po totem-plugin-arte-3.2.2/po/de.po --- totem-plugin-arte-3.2.1/po/de.po 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/po/de.po 2014-10-06 20:59:57.000000000 +0200 @@ -7,76 +7,80 @@ msgstr "" "Project-Id-Version: 3.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-20 19:28+0200\n" +"POT-Creation-Date: 2014-09-13 01:25+0200\n" "PO-Revision-Date: 2012-05-02 22:51+0200\n" "Last-Translator: Nicolas Delvaux \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:176 +#: ../arteplus7.vala:178 msgid "Reload feed" msgstr "Videos aktualisieren" -#: ../arteplus7.vala:180 +#: ../arteplus7.vala:182 msgid "Clear the search text" msgstr "Suchtext löschen" -#: ../arteplus7.vala:209 +#: ../arteplus7.vala:211 msgid "Arte+7" msgstr "Arte+7" -#: ../arteplus7.vala:247 +#: ../arteplus7.vala:249 msgid "French" msgstr "Französisch" -#: ../arteplus7.vala:248 +#: ../arteplus7.vala:250 msgid "German" msgstr "Deutsch" -#: ../arteplus7.vala:278 -msgid "l_ow" -msgstr "_niedrig" - #: ../arteplus7.vala:280 -msgid "_medium" -msgstr "_mittel" +msgid "l_ow (220p)" +msgstr "_niedrig (220p)" #: ../arteplus7.vala:282 -msgid "_high" -msgstr "_hoch" +msgid "_medium (400p)" +msgstr "_mittel (400p)" + +#: ../arteplus7.vala:284 +msgid "_high (400p, better encoding)" +msgstr "_hoch (400p, bessere kodierung)" + +#: ../arteplus7.vala:286 +msgid "H_D (720p)" +msgstr "H_D (720p)" -#: ../arteplus7.vala:329 +#: ../arteplus7.vala:342 msgid "_Language:" msgstr "_Sprache:" -#: ../arteplus7.vala:337 +#: ../arteplus7.vala:350 msgid "Video quality:" msgstr "Videoqualität:" #. display offline message -#: ../arteplus7.vala:355 +#: ../arteplus7.vala:369 msgid "No internet connection." msgstr "Keine Internetverbindung." #. display loading message -#: ../arteplus7.vala:372 +#: ../arteplus7.vala:386 msgid "Loading..." msgstr "Lade..." -#: ../arteplus7.vala:431 +#: ../arteplus7.vala:445 msgid "Markup Parser Error" msgstr "Markup Lesefehler" -#: ../arteplus7.vala:432 +#: ../arteplus7.vala:446 msgid "Sorry, the plugin could not parse the Arte video feed." msgstr "Entschuldigung, das Plugin konnte den Arte-Videofeed nicht lesen." -#: ../arteplus7.vala:434 +#: ../arteplus7.vala:448 msgid "Network problem" msgstr "Verbindungsproblem" -#: ../arteplus7.vala:435 +#: ../arteplus7.vala:449 msgid "" "Sorry, the plugin could not download the Arte video feed.\n" "Please verify your network settings and (if any) your proxy settings." @@ -86,11 +90,11 @@ "Einstellungen." #. This video access is restricted -#: ../arteplus7.vala:503 +#: ../arteplus7.vala:517 msgid "This video access is restricted" msgstr "Dieses Video ist nur eingeschränkt verfügbar" -#: ../arteplus7.vala:504 +#: ../arteplus7.vala:518 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -103,11 +107,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:507 +#: ../arteplus7.vala:521 msgid "This video is not available yet" msgstr "Video ist nocht nicht verfügbar" -#: ../arteplus7.vala:508 +#: ../arteplus7.vala:522 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" @@ -122,11 +126,11 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:511 ../arteplus7.vala:515 +#: ../arteplus7.vala:525 ../arteplus7.vala:529 msgid "Video URL Extraction Error" msgstr "Video URL Extraktionsfehler" -#: ../arteplus7.vala:512 +#: ../arteplus7.vala:526 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Please verify your network settings and (if any) your proxy settings." @@ -135,7 +139,7 @@ "Bitte überprüfen sie Ihre Netzwerk- und (falls vorhanden) Proxy-" "Einstellungen." -#: ../arteplus7.vala:516 +#: ../arteplus7.vala:530 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" @@ -180,4 +184,3 @@ #: ../video-list-view.vala:281 msgid "_Open in Web Browser" msgstr "Link im Browser ö_ffnen" - diff -Nru totem-plugin-arte-3.2.1/po/fr.po totem-plugin-arte-3.2.2/po/fr.po --- totem-plugin-arte-3.2.1/po/fr.po 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/po/fr.po 2014-10-06 20:59:57.000000000 +0200 @@ -7,76 +7,80 @@ msgstr "" "Project-Id-Version: 3.2.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-20 19:28+0200\n" +"POT-Creation-Date: 2014-09-13 01:25+0200\n" "PO-Revision-Date: 2013-09-10 22:44+0200\n" "Last-Translator: Nicolas Delvaux \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../arteplus7.vala:176 +#: ../arteplus7.vala:178 msgid "Reload feed" msgstr "Recharger la liste des vidéos" -#: ../arteplus7.vala:180 +#: ../arteplus7.vala:182 msgid "Clear the search text" msgstr "Effacer le texte recherché" -#: ../arteplus7.vala:209 +#: ../arteplus7.vala:211 msgid "Arte+7" msgstr "Arte+7" -#: ../arteplus7.vala:247 +#: ../arteplus7.vala:249 msgid "French" msgstr "Français" -#: ../arteplus7.vala:248 +#: ../arteplus7.vala:250 msgid "German" msgstr "Allemand" -#: ../arteplus7.vala:278 -msgid "l_ow" -msgstr "_basse" - #: ../arteplus7.vala:280 -msgid "_medium" -msgstr "_moyenne" +msgid "l_ow (220p)" +msgstr "_basse (220p)" #: ../arteplus7.vala:282 -msgid "_high" -msgstr "_haute" +msgid "_medium (400p)" +msgstr "_moyenne (400p)" + +#: ../arteplus7.vala:284 +msgid "_high (400p, better encoding)" +msgstr "_haute (400p, meilleur encodage)" + +#: ../arteplus7.vala:286 +msgid "H_D (720p)" +msgstr "H_D (720p)" -#: ../arteplus7.vala:329 +#: ../arteplus7.vala:342 msgid "_Language:" msgstr "_Langage :" -#: ../arteplus7.vala:337 +#: ../arteplus7.vala:350 msgid "Video quality:" msgstr "Qualité vidéo :" #. display offline message -#: ../arteplus7.vala:355 +#: ../arteplus7.vala:369 msgid "No internet connection." msgstr "Pas de connexion Internet." #. display loading message -#: ../arteplus7.vala:372 +#: ../arteplus7.vala:386 msgid "Loading..." msgstr "Chargement..." -#: ../arteplus7.vala:431 +#: ../arteplus7.vala:445 msgid "Markup Parser Error" msgstr "Erreur de l'analyseur syntaxique" -#: ../arteplus7.vala:432 +#: ../arteplus7.vala:446 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:434 +#: ../arteplus7.vala:448 msgid "Network problem" msgstr "Problème réseau" -#: ../arteplus7.vala:435 +#: ../arteplus7.vala:449 msgid "" "Sorry, the plugin could not download the Arte video feed.\n" "Please verify your network settings and (if any) your proxy settings." @@ -86,11 +90,11 @@ "paramètres de votre proxy." #. This video access is restricted -#: ../arteplus7.vala:503 +#: ../arteplus7.vala:517 msgid "This video access is restricted" msgstr "L'accès à cette vidéo est restreint" -#: ../arteplus7.vala:504 +#: ../arteplus7.vala:518 msgid "" "It seems that, because of its content, this video can only be watched in a " "precise time interval.\n" @@ -103,11 +107,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:507 +#: ../arteplus7.vala:521 msgid "This video is not available yet" msgstr "Cette vidéo n'est pas encore disponible" -#: ../arteplus7.vala:508 +#: ../arteplus7.vala:522 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" @@ -122,11 +126,11 @@ #. Network problems #. ExtractionError.EXTRACTION_ERROR or an unspecified error -#: ../arteplus7.vala:511 ../arteplus7.vala:515 +#: ../arteplus7.vala:525 ../arteplus7.vala:529 msgid "Video URL Extraction Error" msgstr "Erreur d'extraction de l'URL de la vidéo" -#: ../arteplus7.vala:512 +#: ../arteplus7.vala:526 msgid "" "Sorry, the plugin could not extract a valid stream URL.\n" "Please verify your network settings and (if any) your proxy settings." @@ -135,7 +139,7 @@ "Veuillez vérifier les paramètres de votre connexion et (si besoin) les " "paramètres de votre proxy." -#: ../arteplus7.vala:516 +#: ../arteplus7.vala:530 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.2.1/url-extractor.vala totem-plugin-arte-3.2.2/url-extractor.vala --- totem-plugin-arte-3.2.1/url-extractor.vala 2013-09-22 18:09:47.000000000 +0200 +++ totem-plugin-arte-3.2.2/url-extractor.vala 2014-10-06 20:59:57.000000000 +0200 @@ -87,7 +87,7 @@ debug ("Initial Page URL:\t\t'%s'", page_url); /* JSON uri */ - regexp = "arte_vp_url=\"(https?://.*.json)\">"; + 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) @@ -98,7 +98,7 @@ var message = new Soup.Message ("GET", json_uri); this.session.send_message (message); - string rtmp_uri = null; + string uri = null; // TODO detect if a video is only availabe after 23:00 @@ -111,24 +111,50 @@ var streams_object = player_object.get_object_member ("VSR"); Json.Object video_object; + var is_rtmp = false; + switch (q) { case VideoQuality.LOW: + // As of 09/2014, LQ was only available with RTMP video_object = streams_object.get_object_member ("RTMP_LQ_1"); + is_rtmp = true; break; case VideoQuality.HIGH: - video_object = streams_object.get_object_member ("RTMP_SQ_1"); + video_object = streams_object.get_object_member ("HTTP_MP4_EQ_1"); + if (video_object == null) { + video_object = streams_object.get_object_member ("RTMP_EQ_1"); + is_rtmp = true; + } + break; + case VideoQuality.HD: + video_object = streams_object.get_object_member ("HTTP_MP4_SQ_1"); + if (video_object == null) { + video_object = streams_object.get_object_member ("RTMP_SQ_1"); + is_rtmp = true; + } break; default: // MEDIUM is the default - video_object = streams_object.get_object_member ("RTMP_MQ_1"); // or "RTMP_EQ_1" ? + video_object = streams_object.get_object_member ("HTTP_MP4_MQ_1"); + if (video_object == null) { + video_object = streams_object.get_object_member ("RTMP_MQ_1"); + is_rtmp = true; + } break; } - string streamer = video_object.get_string_member ("streamer"); + if (!is_rtmp) { + uri = video_object.get_string_member ("url"); + debug ("Extracted video uri:\t'%s'", uri); + return uri; + } + string url = video_object.get_string_member ("url"); + string streamer = video_object.get_string_member ("streamer"); + debug ("Streamer base:\t'%s'", streamer); debug ("Streamer path:\t'%s'", url); - rtmp_uri = streamer + "mp4:" + url; + uri = streamer + "mp4:" + url; } catch (Error e) { throw new ExtractionError.EXTRACTION_FAILED ("Video URL Extraction Error"); @@ -139,7 +165,7 @@ 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"; + var embeded_uri = "http://www.arte.tv/player/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) { @@ -153,7 +179,7 @@ } - string stream_uri = rtmp_uri + " swfVfy=1 swfUrl=" + player_uri; + string stream_uri = uri + " swfVfy=1 swfUrl=" + player_uri; debug ("Build stream URI:\t\t'%s'", stream_uri); return stream_uri;