Created
December 10, 2013 22:19
-
-
Save mouseroot/7901339 to your computer and use it in GitHub Desktop.
Motherless playlist script
Install by: placing this file in C:\Program Files (x86)\VideoLAN\VLC\lua\playlist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --[[ | |
| Script: Handles motherless.com | |
| By: Mouseroot | |
| --]] | |
| function probe() | |
| return vlc.access == "http" and string.match(vlc.path,"motherless.com") | |
| end | |
| function parse() | |
| playlist = {} | |
| vidname = "" | |
| vid = "" | |
| while true do | |
| line = vlc.readline() | |
| if line == nil then | |
| break | |
| end | |
| --Search for title | |
| if string.match(line,"<title>") then | |
| _,_,vidname = string.find(line,"<title>(.*)</title>") | |
| vidname = string.gsub(vidname,"- MOTHERLESS.COM","") | |
| --Show debug of video title found | |
| --vlc.msg.err("Title is " .. vidname) | |
| end | |
| --Search for video | |
| if string.match(line,"__fileurl") then | |
| _,_,vid = string.find(line,"(http://.*%.flv/.*%.flv)") | |
| --Show debug of video string found | |
| --vlc.msg.err("Video is " .. vid) | |
| table.insert(playlist,{path=vid;name = vidname}) | |
| return playlist | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment