Changeset e4225477339db6f2365e58839f1b136e341432e5
- 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
| rbea5e7e |
re422547 |
|
| 13 | 13 | if string.match( vlc.path, "watch/" ) |
|---|
| 14 | 14 | 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 } } |
|---|
| 16 | 25 | else -- This is the flash player's URL |
|---|
| 17 | 26 | return { { url = string.gsub( vlc.path, "^.*mediaURL=([^&]*).*$", "%1" ) } } |
|---|