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
cce2adb3
Commit
cce2adb3
authored
Apr 13, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua http: fix current int web intf
parent
f5e71e2a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
share/lua/http/js/controlers.js
share/lua/http/js/controlers.js
+10
-12
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+2
-0
No files found.
share/lua/http/js/controlers.js
View file @
cce2adb3
var
current_id
=
1
;
var
currentArt
=
null
;
var
current_que
=
'
main
'
;
var
previous_title
=
null
;
var
current_title
=
null
;
var
current_playlist_id
=
-
1
;
var
previous_playlist_id
=
-
1
;
function
updateArt
(
url
)
{
$
(
'
#albumArt
'
).
fadeOut
(
500
,
function
()
{
...
...
@@ -75,11 +74,11 @@ function updateStatus() {
updateArt
(
currentArt
);
}
current_
title
=
$
(
'
[name="filename"]
'
,
data
).
text
(
);
if
(
previous_
title
!=
current_title
)
{
current_
playlist_id
=
parseInt
(
$
(
'
currentplid
'
,
data
).
text
()
);
if
(
previous_
playlist_id
!=
current_playlist_id
)
{
updatePlayList
();
previous_playlist_id
=
current_playlist_id
;
}
previous_title
=
current_title
;
if
(
pollStatus
)
{
setTimeout
(
updateStatus
,
1000
);
...
...
@@ -138,8 +137,7 @@ function updatePlayList(force_refresh) {
$
(
'
.jstree-leaf
'
).
each
(
function
(){
var
id
=
$
(
this
).
attr
(
'
id
'
);
if
(
id
!=
null
&&
id
.
substr
(
0
,
5
)
==
'
plid_
'
)
{
var
name
=
$
(
this
).
attr
(
'
name
'
);
if
(
name
!=
null
&&
name
==
current_title
)
{
if
(
id
.
substr
(
5
)
==
current_playlist_id
)
{
$
(
this
).
addClass
(
'
ui-state-highlight
'
);
$
(
this
).
attr
(
'
current
'
,
'
current
'
);
this
.
scrollIntoView
(
true
);
...
...
@@ -513,17 +511,17 @@ $(function () {
}).
bind
(
"
loaded.jstree
"
,
function
(
event
,
data
)
{
$
(
'
[current]
'
,
'
[id^="plid_"]
'
).
each
(
function
()
{
$
(
this
).
addClass
(
'
ui-state-highlight
'
);
current_id
=
$
(
this
).
attr
(
'
id
'
).
substr
(
5
);
current_
playlist_
id
=
$
(
this
).
attr
(
'
id
'
).
substr
(
5
);
});
}).
bind
(
"
refresh.jstree
"
,
function
(
event
,
data
)
{
$
(
'
[current]
'
,
'
[id^="plid_"]
'
).
each
(
function
()
{
$
(
this
).
addClass
(
'
ui-state-highlight
'
);
current_id
=
$
(
this
).
attr
(
'
id
'
).
substr
(
5
);
current_
playlist_
id
=
$
(
this
).
attr
(
'
id
'
).
substr
(
5
);
});
}).
delegate
(
"
#plid_2 li.jstree-leaf a
"
,
"
click
"
,
function
(
event
,
data
)
{
event
.
preventDefault
();
current_id
=
$
(
this
).
parent
().
attr
(
'
id
'
).
substr
(
5
);
sendCommand
(
'
command=pl_play&id=
'
+
current_id
);
current_
playlist_
id
=
$
(
this
).
parent
().
attr
(
'
id
'
).
substr
(
5
);
sendCommand
(
'
command=pl_play&id=
'
+
current_
playlist_
id
);
});
updateStatus
();
updateStreams
();
...
...
share/lua/intf/modules/httprequests.lua
View file @
cce2adb3
...
...
@@ -455,6 +455,7 @@ getstatus = function (includecategories)
s
.
length
=
math.floor
(
vlc
.
var
.
get
(
input
,
"length"
))
s
.
time
=
math.floor
(
vlc
.
var
.
get
(
input
,
"time"
))
s
.
position
=
vlc
.
var
.
get
(
input
,
"position"
)
s
.
currentplid
=
vlc
.
playlist
.
current
()
s
.
audiodelay
=
vlc
.
var
.
get
(
input
,
"audio-delay"
)
s
.
rate
=
vlc
.
var
.
get
(
input
,
"rate"
)
s
.
subtitledelay
=
vlc
.
var
.
get
(
input
,
"spu-delay"
)
...
...
@@ -462,6 +463,7 @@ getstatus = function (includecategories)
s
.
length
=
0
s
.
time
=
0
s
.
position
=
0
s
.
currentplid
=-
1
s
.
audiodelay
=
0
s
.
rate
=
1
s
.
subtitledelay
=
0
...
...
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