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
324d2591
Commit
324d2591
authored
Jun 22, 2010
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update katsomo lua-script
uses vlc.strings.iconv to get correct encoding
parent
1d4c5a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
share/lua/playlist/katsomo.lua
share/lua/playlist/katsomo.lua
+18
-4
No files found.
share/lua/playlist/katsomo.lua
View file @
324d2591
...
@@ -42,6 +42,8 @@ function parse()
...
@@ -42,6 +42,8 @@ function parse()
table.insert
(
p
,
{
path
=
path
;
}
)
table.insert
(
p
,
{
path
=
path
;
}
)
return
p
return
p
end
end
title
=
""
arturl
=
"http://www.katsomo.fi/multimedia/template/logos/katsomo_logo_2.gif"
while
true
while
true
do
do
line
=
vlc
.
readline
()
line
=
vlc
.
readline
()
...
@@ -49,11 +51,23 @@ function parse()
...
@@ -49,11 +51,23 @@ function parse()
if
string.match
(
line
,
"<title>"
)
if
string.match
(
line
,
"<title>"
)
then
then
title
=
vlc
.
strings
.
decode_uri
(
find
(
line
,
"<title>(.-)<"
)
)
title
=
vlc
.
strings
.
decode_uri
(
find
(
line
,
"<title>(.-)<"
)
)
title
=
vlc
.
strings
.
iconv
(
"UTF-8"
,
"ISO_8859-1"
,
title
)
end
end
for
programid
in
string.gmatch
(
line
,
"<li class=\"
program
\
" id=\"
program
(
%
d
+
)
\
""
)
do
if
(
find
(
line
,
"img class=\"
pngImg
\
" src=\"
/
multimedia
/
template
/
logos
" ) )
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
find
(
line
,
"title=\"
(.
+
)
\
""
)
)
then
path
=
"http://www.katsomo.fi/metafile.asx?p="
..
programid
..
"&bw=800"
arturl = "
http
:
//
www
.
katsomo
.
fi
"..find( line, "
src
=
\
"(.-)\"
alt
=
" )
table.insert
(
p
,
{
path
=
path
;
name
=
title
;
description
=
description
;
url
=
vlc
.
path
;}
)
end
for treeid,name in string.gmatch( line, "
/
\?
treeId
=
(
%
d
+
)
\
">([^<]+)</a"
)
do
name
=
vlc
.
strings
.
resolve_xml_special_chars
(
name
)
name
=
vlc
.
strings
.
iconv
(
"UTF-8"
,
"ISO_8859-1"
,
name
)
path
=
"http://www.katsomo.fi/?treeId="
..
treeid
table.insert
(
p
,
{
path
=
path
;
name
=
name
;
url
=
vlc
.
path
;
arturl
=
arturl
;
}
)
end
for
programid
in
string.gmatch
(
line
,
"<li class=\"
program
.
*
\
" id=\"
program
(
%
d
+
)
\
" title=\"
.
+
\
""
)
do
description
=
vlc
.
strings
.
resolve_xml_special_chars
(
find
(
line
,
"title=\"
(.
+
)
\
""
)
)
description
=
vlc
.
strings
.
iconv
(
"UTF-8"
,
"ISO_8859-1"
,
description
)
path
=
"http://www.katsomo.fi/metafile.asx?p="
..
programid
..
"&bw=800"
table.insert
(
p
,
{
path
=
path
;
name
=
description
;
url
=
vlc
.
path
;
arturl
=
arturl
;
}
)
end
end
end
end
return
p
return
p
...
...
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