Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
42b4ab8a
Commit
42b4ab8a
authored
Jan 28, 2015
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youtube.lua: be more flexible with JSON spaces
parent
582608e1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+4
-4
No files found.
share/lua/playlist/youtube.lua
View file @
42b4ab8a
...
...
@@ -258,21 +258,21 @@ function parse()
-- "SWF_ARGS", "swfArgs", "PLAYER_CONFIG", "playerConfig" ...
if
string.match
(
line
,
"ytplayer%.config"
)
then
local
js_url
=
string.match
(
line
,
"
\"
js\"
:
\
"(.-)\"" )
local
js_url
=
string.match
(
line
,
"
\"
js\"
:
*
\
"(.-)\"" )
if js_url then
js_url = string.gsub( js_url, "
\\
/
", "
/
" )
js_url = string.gsub( js_url, "
^//
", vlc.access.."
:
//
" )
end
if not fmt then
fmt_list = string.match( line, "
\
"fmt_list\"
:
\
"(.-)\"" )
fmt_list = string.match( line, "
\
"fmt_list\"
:
*
\
"(.-)\"" )
if fmt_list then
fmt_list = string.gsub( fmt_list, "
\\
/
", "
/
" )
fmt = get_fmt( fmt_list )
end
end
url_map = string.match( line, "
\
"url_encoded_fmt_stream_map\"
:
\
"(.-)\"" )
url_map = string.match( line, "
\
"url_encoded_fmt_stream_map\"
:
*
\
"(.-)\"" )
if url_map then
-- FIXME: do this properly
url_map = string.gsub( url_map, "
\\
u0026
", "
&
" )
...
...
@@ -282,7 +282,7 @@ function parse()
if not path then
-- If this is a live stream, the URL map will be empty
-- and we get the URL from this field instead
local hlsvp = string.match( line, "
\
"hlsvp\"
:
\
"(.-)\"" )
local hlsvp = string.match( line, "
\
"hlsvp\"
:
*
\
"(.-)\"" )
if hlsvp then
hlsvp = string.gsub( hlsvp, "
\\
/
", "
/
" )
path = hlsvp
...
...
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