Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
085a8659
Commit
085a8659
authored
Dec 06, 2008
by
Jean-Philippe Andre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lua: youtube in HQ (when used with &fmt=18)
parent
db0ec106
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
share/lua/playlist/youtube.lua
share/lua/playlist/youtube.lua
+15
-2
No files found.
share/lua/playlist/youtube.lua
View file @
085a8659
...
@@ -91,8 +91,15 @@ function parse()
...
@@ -91,8 +91,15 @@ function parse()
base_yt_url = "http://youtube.com/"
base_yt_url = "http://youtube.com/"
end
end
arturl = get_arturl( vlc.path, video_id )
arturl = get_arturl( vlc.path, video_id )
-- fmt is the format of the video: 18 is HQ (mp4)
fmt = get_url_param( vlc.path, "fmt" )
if fmt then
format = "&fmt=" .. fmt
else
format = ""
end
if t then
if t then
return { { path = base_yt_url .. "get_video?video_id="..video_id.."&t="..t; name = name; description = description; artist = artist; arturl = arturl } }
return { { path = base_yt_url .. "get_video?video_id="..video_id.."&t="..t
..format
; name = name; description = description; artist = artist; arturl = arturl } }
else
else
-- This shouldn'
t
happen
...
but
keep
it
as
a
backup
.
-- This shouldn'
t
happen
...
but
keep
it
as
a
backup
.
return
{
{
path
=
"http://www.youtube.com/v/"
..
video_id
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
return
{
{
path
=
"http://www.youtube.com/v/"
..
video_id
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
...
@@ -103,11 +110,17 @@ function parse()
...
@@ -103,11 +110,17 @@ function parse()
end
end
video_id
=
get_url_param
(
vlc
.
path
,
"video_id"
)
video_id
=
get_url_param
(
vlc
.
path
,
"video_id"
)
arturl
=
get_arturl
(
vlc
.
path
,
video_id
)
arturl
=
get_arturl
(
vlc
.
path
,
video_id
)
fmt
=
get_url_param
(
vlc
.
path
,
"fmt"
)
if
fmt
then
format
=
"&fmt="
..
fmt
else
format
=
""
end
if
not
string.match
(
vlc
.
path
,
"t="
)
then
if
not
string.match
(
vlc
.
path
,
"t="
)
then
-- This sucks, we're missing "t" which is now mandatory. Let's
-- This sucks, we're missing "t" which is now mandatory. Let's
-- try using another url
-- try using another url
return
{
{
path
=
"http://www.youtube.com/v/"
..
video_id
;
name
=
name
;
arturl
=
arturl
}
}
return
{
{
path
=
"http://www.youtube.com/v/"
..
video_id
;
name
=
name
;
arturl
=
arturl
}
}
end
end
return
{
{
path
=
"http://www.youtube.com/get_video.php?video_id="
..
video_id
..
"&t="
..
get_url_param
(
vlc
.
path
,
"t"
);
name
=
name
;
arturl
=
arturl
}
}
return
{
{
path
=
"http://www.youtube.com/get_video.php?video_id="
..
video_id
..
"&t="
..
get_url_param
(
vlc
.
path
,
"t"
)
..
format
;
name
=
name
;
arturl
=
arturl
}
}
end
end
end
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