summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2014-01-11 19:25:59 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2014-01-11 19:25:59 +0100
commit1cb74d9c3770de1e41cd5ce4affd12a1d796c908 (patch)
tree7f486e38ca1a1b30d423bab75104984782e6d1a4
parentb7e1eeb8289e8519b1d4d452978dbe4915ef10d2 (diff)
downloaddotfiles-1cb74d9c3770de1e41cd5ce4affd12a1d796c908.tar.gz
dotfiles-1cb74d9c3770de1e41cd5ce4affd12a1d796c908.tar.bz2
dotfiles-1cb74d9c3770de1e41cd5ce4affd12a1d796c908.zip
quvi/zdf: Add a hack to obtain the best available format
-rw-r--r--.local/share/libquvi-scripts/lua/website/zdfmediathek.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/.local/share/libquvi-scripts/lua/website/zdfmediathek.lua b/.local/share/libquvi-scripts/lua/website/zdfmediathek.lua
index 3499323..f224395 100644
--- a/.local/share/libquvi-scripts/lua/website/zdfmediathek.lua
+++ b/.local/share/libquvi-scripts/lua/website/zdfmediathek.lua
@@ -39,7 +39,13 @@ function parse(self)
self.thumbnail_url = c:match('<teaserimage alt="[^"]*" key="946x532">([^<]*)</teaserimage>')
- self.url = { c:match('<quality>veryhigh</quality>[ \n]*<url>(http://nrodl.zdf.de/[^<]*\.mp4)</url>') }
+ local url = c:match('<quality>veryhigh</quality>[ \n]*<url>(http://nrodl.zdf.de/[^<]*\.mp4)</url>')
+
+ if (c:match('<width>1024</width>')) then
+ url = string.gsub(url, "1456k_p13v11", "2256k_p14v11")
+ end
+
+ self.url = { url }
return self
end