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
43db5ce6
Commit
43db5ce6
authored
Sep 18, 2012
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youtube.lua: add comments
parent
1e811ab5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+6
-1
No files found.
share/lua/playlist/youtube.lua
View file @
43db5ce6
...
...
@@ -47,6 +47,7 @@ function get_prefres()
return
prefres
end
-- Pick the most suited format available
function
get_fmt
(
fmt_list
)
local
prefres
=
get_prefres
()
if
prefres
<
0
then
...
...
@@ -66,6 +67,7 @@ function get_fmt( fmt_list )
return
fmt
end
-- Parse and pick our video URL
function
pick_url
(
url_map
,
fmt
)
local
path
=
nil
-- Handle both orderings, as unfortunately both may appear
...
...
@@ -173,6 +175,9 @@ function parse()
else
format
=
""
end
-- Without "el=detailpage", /get_video_info fails for many
-- music videos with errors about copyrighted content being
-- "restricted from playback on certain sites"
path
=
"http://www.youtube.com/get_video_info?video_id="
..
video_id
..
format
..
"&el=detailpage"
end
...
...
@@ -187,7 +192,7 @@ function parse()
return
{
{
path
=
path
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
elseif
string.match
(
vlc
.
path
,
"/get_video_info%?"
)
then
elseif
string.match
(
vlc
.
path
,
"/get_video_info%?"
)
then
-- video info API
local
line
=
vlc
.
readline
()
-- data is on one line only
local
fmt
=
get_url_param
(
vlc
.
path
,
"fmt"
)
...
...
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