diff --git a/src/input/vlm.c b/src/input/vlm.c index facc49c..fe36742 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -218,7 +218,7 @@ static void vlm_Destructor( vlm_t *p_vlm ) TAB_CLEAN( p_vlm->i_media, p_vlm->media ); vlm_ControlInternal( p_vlm, VLM_CLEAR_SCHEDULES ); - TAB_CLEAN( p_vlm->schedule, p_vlm->schedule ); + TAB_CLEAN( p_vlm->i_schedule, p_vlm->schedule ); vlc_mutex_unlock( &p_vlm->lock ); libvlc_priv(p_vlm->p_libvlc)->p_vlm = NULL; @@ -472,7 +472,7 @@ static void* Manage( void* p_object ) } } } - else + else if( i_nextschedule == 0 || i_real_date < i_nextschedule ) { i_nextschedule = i_real_date; } diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua index 713bdc0..85ba428 100644 --- a/share/lua/playlist/youtube.lua +++ b/share/lua/playlist/youtube.lua @@ -35,10 +35,9 @@ end -- Probe function. function probe() - if vlc.access ~= "http" then + if vlc.access ~= "http" and vlc.access ~= "https" then return false end - options = {":demux=avformat,ffmpeg"} youtube_site = string.match( string.sub( vlc.path, 1, 8 ), "youtube" ) if not youtube_site then -- FIXME we should be using a builtin list of known youtube websites @@ -89,6 +88,8 @@ function parse() -- vlc.msg.err( t ) -- video_id = string.gsub( line, ".*&video_id:'([^']*)'.*", "%1" ) fmt_url_map = string.match( line, "\"fmt_url_map\": \"(.-)\"" ) + -- FIXME: do this properly + fmt_url_map = string.gsub( fmt_url_map, "\\u0026", "&" ) if fmt_url_map then for itag,url in string.gmatch( fmt_url_map, "(%d+)|([^,]+)" ) do -- Apparently formats are listed in quality order, @@ -152,7 +153,7 @@ function parse() path = "http://www.youtube.com/v/"..video_id end end - return { { path = path; name = name; description = description; artist = artist; arturl = arturl; options = options } } + return { { path = path; name = name; description = description; artist = artist; arturl = arturl } } else -- This is the flash player's URL if string.match( vlc.path, "title=" ) then name = vlc.strings.decode_uri(get_url_param( vlc.path, "title" )) @@ -168,8 +169,8 @@ function parse() if not string.match( vlc.path, "t=" ) then -- This sucks, we're missing "t" which is now mandatory. Let's -- try using another url - return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl; options=options } } + return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl } } end - return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl; options=options } } + return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl } } end end