website/canalplus.lua: Add support for {d8,d17}
commita5057721c959304d92573e15fe634f56d620d7cc
authorToni Gundogdu <legatvs@gmail.com>
Sun, 24 Nov 2013 19:19:38 +0000 (24 21:19 +0200)
committerToni Gundogdu <legatvs@gmail.com>
Sun, 24 Nov 2013 19:38:39 +0000 (24 21:38 +0200)
treea1a94cea812017a7092846766239f73f913432d7
parente24824c7a3d1e74d87668a9a444e6e914193175c
website/canalplus.lua: Add support for {d8,d17}

This is a rough backport of the changes made to the 0.9 series with the
following differences:

  - Try to determine the {media,channel} ID from the input URL

    - Allows skipping the retrieval of the input URL, saving some KiB

    - libquvi (0.4) parses automatically "charset" from the input URL HTML

      - This would lead into encoding issues (mangled media title) later
        when the REST response was parsed

  - Use quvi/util:xml_get since LuaExpat cannot be used

Notable changes:

  - ident function:
    - Remove the hardcoded URI paths (no longer needed)
    - Add "HTTP" to the protocol categories

  - {query_formats, parse} functions:
    - For lack of a better solution: the "best" is now the "default" stream
    - Redirecting to a youtube resource was not implemented
    - Try to trim and cleanup the old code where possible

Links:
[1]: http://thread.gmane.org/gmane.comp.web.flash.quvi/364
      (the patch for the 0.9 series)

Signed-off-by: Toni Gundogdu <legatvs@gmail.com>
share/lua/website/canalplus.lua