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
975a88e1
Commit
975a88e1
authored
Dec 09, 2014
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Koreus: improve description parsing (support spoilers) and https
parent
feceed5a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
share/lua/playlist/koreus.lua
share/lua/playlist/koreus.lua
+12
-1
No files found.
share/lua/playlist/koreus.lua
View file @
975a88e1
...
...
@@ -38,12 +38,19 @@ function parse()
_
,
_
,
name
=
string.find
(
line
,
"content=\"
(.
-
)
\
""
)
name
=
vlc
.
strings
.
resolve_xml_special_chars
(
name
)
end
if
string.match
(
line
,
"<meta name=\"
description
\
""
)
then
if
string.match
(
line
,
"<meta property=\"
og
:
description
\
""
)
then
_
,
_
,
description
=
string.find
(
line
,
"content=\"
(.
-
)
\
""
)
if
(
description
~=
nil
)
then
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
description
)
end
end
if
string.match
(
line
,
"<span id=\"
spoil
\
" style=\"
display
:
none
\
">"
)
then
_
,
_
,
desc_spoil
=
string.find
(
line
,
"<span id=\"
spoil
\
" style=\"
display
:
none
\
">(.-)<\/span>"
)
desc_spoil
=
vlc
.
strings
.
resolve_xml_special_chars
(
desc_spoil
)
description
=
description
..
"
\n\r
"
..
desc_spoil
end
if
string.match
(
line
,
"<meta name=\"
author
\
""
)
then
_
,
_
,
artist
=
string.find
(
line
,
"content=\"
(.
-
)
\
""
)
artist
=
vlc
.
strings
.
resolve_xml_special_chars
(
artist
)
...
...
@@ -75,12 +82,16 @@ function parse()
end
if
path_url_hd
then
if
vlc
.
access
==
'https'
then
path_url_hd
=
path_url_hd
:
gsub
(
'http'
,
'https'
)
end
return
{
{
path
=
path_url_hd
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
elseif
path_url
then
if
vlc
.
access
==
'https'
then
path_url
=
path_url
:
gsub
(
'http'
,
'https'
)
end
return
{
{
path
=
path_url
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
elseif
path_url_webm
then
if
vlc
.
access
==
'https'
then
path_url_webm
=
path_url_webm
:
gsub
(
'http'
,
'https'
)
end
return
{
{
path
=
path_url_webm
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
elseif
path_url_flv
then
if
vlc
.
access
==
'https'
then
path_url_flv
=
path_url_flv
:
gsub
(
'http'
,
'https'
)
end
return
{
{
path
=
path_url_flv
;
name
=
name
;
description
=
description
;
artist
=
artist
;
arturl
=
arturl
}
}
else
return
{}
...
...
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