Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
8970ff6d
Commit
8970ff6d
authored
Jul 19, 2010
by
Konstantin Pavlov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix MPORA lua playlist script.
parent
e55650d5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
share/lua/playlist/mpora.lua
share/lua/playlist/mpora.lua
+27
-4
No files found.
share/lua/playlist/mpora.lua
View file @
8970ff6d
...
...
@@ -42,11 +42,34 @@ function parse()
if string.match( line, "
filmID
" ) then
_,_,video = string.find( line, "
var
filmID
=
\
'(.*)\'
;
")
table.insert( p, { path = "
http
:
//
cdn0
.
mpora
.
com
/
play
/
video
/
"..video.."
/
mp4
/
"; name = name; arturl = arturl } )
end
if string.match( line, "
definitionLink
hd
" ) then
table.insert( p, { path = "
http
:
//
cdn0
.
mpora
.
com
/
play
/
video
/
"..video.."
_hd
/
mp4
/
"; name = name.."
(
HD
)
", arturl = arturl } )
end
end
if not name or not arturl or not video then return nil end
-- Try and get URL for SD video.
sd = vlc.stream("
http
:
//
api
.
mpora
.
com
/
tv
/
player
/
playlist
/
vid
/
"..video.."
/
")
if not sd then return nil end
page = sd:read( 65653 )
sdurl = string.match( page, "
url
=
\
"(.*)\"
/>
")
page = nil
table.insert( p, { path = sdurl; name = name; arturl = arturl; } )
-- Try and check if HD video is available.
checkhd = vlc.stream("
http
:
//
api
.
mpora
.
com
/
tv
/
player
/
load
/
vid
/
"..video.."
/
platform
/
video
/
domain
/
video
.
mpora
.
com
/
" )
if not checkhd then return nil end
page = checkhd:read( 65653 )
hashd = tonumber( string.match( page, "
<
has_hd
>
(
%
d
)
</
has_hd
>
" ) )
page = nil
if hashd then
hd = vlc.stream("
http
:
//
api
.
mpora
.
com
/
tv
/
player
/
playlist
/
vid
/
"..video.."
/
hd
/
true
/
")
page = hd:read( 65653 )
hdurl = string.match( page, "
url
=
\
"(.*)\"
/>
")
table.insert( p, { path = hdurl; name = name.."
(
HD
)
"; arturl = arturl } )
end
return p
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment