Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
fc1227e4
Commit
fc1227e4
authored
Sep 24, 2011
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web intf: display art correctly
parent
1ad23782
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
15 deletions
+49
-15
share/lua/http/css/main.css
share/lua/http/css/main.css
+13
-7
share/lua/http/js/controlers.js
share/lua/http/js/controlers.js
+36
-8
No files found.
share/lua/http/css/main.css
View file @
fc1227e4
...
...
@@ -59,7 +59,7 @@ body{
}
#controlTable
{
position
:
relative
;
height
:
1
4
0px
;
height
:
1
5
0px
;
}
#controlButtons
{
position
:
absolute
;
...
...
@@ -87,19 +87,20 @@ body{
#volumesliderzone
{
position
:
absolute
;
top
:
20px
;
left
:
4
40
px
;
width
:
2
05
px
;
left
:
4
35
px
;
width
:
2
10
px
;
}
#volumeSlider
{
width
:
20
0
px
;
width
:
20
8
px
;
}
#artszone
{
position
:
absolute
;
top
:
0
;
left
:
650px
;
width
:
141px
;
left
:
648px
;
width
:
150px
;
height
:
150px
;
vertical-align
:
top
;
}
...
...
@@ -107,7 +108,7 @@ body{
position
:
absolute
;
left
:
0
;
top
:
100px
;
width
:
6
50
px
;
width
:
6
45
px
;
vertical-align
:
bottom
;
}
...
...
@@ -208,3 +209,8 @@ div.centered{
margin-left
:
auto
;
margin-right
:
auto
;
}
.hidden
{
visibility
:
hidden
;
display
:
none
;
}
share/lua/http/js/controlers.js
View file @
fc1227e4
var
current_id
=
1
;
var
currentArt
=
null
;
var
current_que
=
'
main
'
;
function
updateArt
(
url
)
{
$
(
'
#albumArt
'
).
fadeOut
(
500
,
function
(){
$
(
this
).
addClass
(
'
hidden
'
)
.
removeAttr
(
'
height
'
)
.
removeAttr
(
'
width
'
)
.
attr
(
'
src
'
,
url
);
});
}
function
updateStatus
(){
$
.
ajax
({
url
:
'
requests/status.xml
'
,
...
...
@@ -50,16 +59,18 @@ function updateStatus(){
$
(
'
#buttonRepeat
'
).
addClass
(
'
ui-state-default
'
);
$
(
'
#buttonRepeat
'
).
removeClass
(
'
ui-state-active
'
);
}
if
(
$
(
'
[name="artwork_url"]
'
,
data
).
text
()
!=
currentArt
){
if
(
$
(
'
[name="artwork_url"]
'
,
data
).
text
()
!=
currentArt
&&
$
(
'
[name="artwork_url"]
'
,
data
).
text
()
!=
""
)
{
var
tmp
=
new
Date
();
$
(
'
#albumArt
'
).
attr
(
'
src
'
,
'
/art?
'
+
tmp
.
getTime
());
currentArt
=
$
(
'
[name="artwork_url"]
'
,
data
).
text
();
$
(
'
#albumArt
'
).
css
({
'
visibility
'
:
'
visible
'
,
'
display
'
:
'
block
'
});
}
else
if
(
$
(
'
[name="artwork_url"]
'
,
data
).
text
()
==
""
){
$
(
'
#albumArt
'
).
attr
(
'
src
'
,
'
images/vlc-48.png
'
);
updateArt
(
'
/art?
'
+
tmp
.
getTime
());
}
else
if
(
$
(
'
[name="artwork_url"]
'
,
data
).
text
()
==
""
&&
currentArt
!=
'
images/vlc-48.png
'
)
{
currentArt
=
'
images/vlc-48.png
'
;
updateArt
(
currentArt
);
}
if
(
pollStatus
){
setTimeout
(
updateStatus
,
1000
);
...
...
@@ -422,6 +433,23 @@ function sendEQCmd(params){
}
$
(
function
(){
$
(
'
#albumArt
'
).
load
(
function
(){
var
width
=
$
(
this
).
width
();
var
height
=
$
(
this
).
height
();
var
max
=
Math
.
max
(
width
,
height
);
if
(
max
>
150
)
{
var
ratio
=
150
/
max
;
width
=
Math
.
floor
(
width
*
ratio
);
height
=
Math
.
floor
(
height
*
ratio
);
}
$
(
this
).
attr
(
'
width
'
,
width
)
.
attr
(
'
height
'
,
height
)
.
css
(
'
margin-left
'
,
Math
.
floor
((
150
-
width
)
/
2
))
.
css
(
'
margin-top
'
,
Math
.
floor
((
150
-
height
)
/
2
))
.
removeClass
(
'
hidden
'
)
.
fadeIn
();
});
$
(
'
#libraryTree
'
).
jstree
({
"
xml_data
"
:{
"
ajax
"
:{
...
...
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