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
077fd787
Commit
077fd787
authored
May 27, 2012
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: googleimage: try to find art for icecast listings
parent
19797936
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
share/lua/meta/art/01_googleimage.lua
share/lua/meta/art/01_googleimage.lua
+10
-4
No files found.
share/lua/meta/art/01_googleimage.lua
View file @
077fd787
...
...
@@ -24,14 +24,20 @@ function fetch_art()
if
vlc
.
item
==
nil
then
return
nil
end
local
meta
=
vlc
.
item
:
metas
()
if
meta
[
"artist"
]
and
meta
[
"album"
]
then
title
=
meta
[
"artist"
]
..
" "
..
meta
[
"album"
]
-- IceCast Entries
if
meta
[
"Listing Source"
]
==
"dir.xiph.org"
then
title
=
meta
[
"title"
]
..
" radio logo"
-- Album entries
elseif
meta
[
"artist"
]
and
meta
[
"album"
]
then
title
=
meta
[
"artist"
]
..
" "
..
meta
[
"album"
]
..
" cover"
elseif
meta
[
"artist"
]
and
meta
[
"title"
]
then
title
=
meta
[
"artist"
]
..
" "
..
meta
[
"title"
]
title
=
meta
[
"artist"
]
..
" "
..
meta
[
"title"
]
..
" cover"
else
return
nil
end
fd
=
vlc
.
stream
(
"http://images.google.com/images?q="
..
vlc
.
strings
.
encode_uri_component
(
title
..
" cover"
)
)
fd
=
vlc
.
stream
(
"http://images.google.com/images?q="
..
vlc
.
strings
.
encode_uri_component
(
title
)
)
if
not
fd
then
return
nil
end
page
=
fd
:
read
(
65653
)
...
...
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