Changeset e4225477339db6f2365e58839f1b136e341432e5

Show
Ignore:
Timestamp:
15/05/07 00:37:33 (2 years ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1179182253 +0000
git-parent:

[8b00a4b3edad7c8385f0b0bc2bd3cc6c1c483a85]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1179182253 +0000
Message:

* metacafe.lua: forgot the title here too.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • share/luaplaylist/metacafe.lua

    rbea5e7e re422547  
    1313    if string.match( vlc.path, "watch/" ) 
    1414    then -- This is the HTML page's URL 
    15         return { { url = string.gsub( vlc.path, "^.*watch/(.*[^/])/?$", "http://www.metacafe.com/fplayer/%1.swf" ) } } 
     15        while true do 
     16            -- Try to find the video's title 
     17            line = vlc.readline() 
     18            if not line then break end 
     19            if string.match( line, "<meta name=\"title\"" ) then 
     20                title = string.gsub( line, "^.*content=\"([^\"]*).*$", "%1" )   
     21                break 
     22            end 
     23        end 
     24        return { { url = string.gsub( vlc.path, "^.*watch/(.*[^/])/?$", "http://www.metacafe.com/fplayer/%1.swf" ); title = title } } 
    1625    else -- This is the flash player's URL 
    1726        return { { url = string.gsub( vlc.path, "^.*mediaURL=([^&]*).*$", "%1" ) } }