Commit 11f64a07 authored by Rémi Duraffort's avatar Rémi Duraffort

metachannels: force the use of the ffmpeg demuxer for mp4 (extension .m4v here).

parent b755e003
...@@ -28,6 +28,8 @@ end ...@@ -28,6 +28,8 @@ end
function parse() function parse()
local webpage = '' local webpage = ''
local options
while true do while true do
local line = vlc.readline() local line = vlc.readline()
if line == nil then break end if line == nil then break end
...@@ -43,10 +45,12 @@ function parse() ...@@ -43,10 +45,12 @@ function parse()
if( item.name == 'item' ) then if( item.name == 'item' ) then
simplexml.add_name_maps( item ) simplexml.add_name_maps( item )
local url = string.gsub( item.children_map['link'][1].children[1], '&', '&' ) local url = string.gsub( item.children_map['link'][1].children[1], '&', '&' )
if( string.match( url, '%.m4v' ) ) then options = { ':play-and-pause', ':demux=avformat,ffmpeg' }
else options = { ':play-and-pause' } end
table.insert( tracks, { path = url, table.insert( tracks, { path = url,
title = item.children_map['title'][1].children[1], title = item.children_map['title'][1].children[1],
arturl = item.children_map['media:thumbnail'][1].attributes['url'], arturl = item.children_map['media:thumbnail'][1].attributes['url'],
options = {':play-and-pause'} } ) options = options } )
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment