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
5192a05d
Commit
5192a05d
authored
Apr 13, 2013
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua intf: httprequests: fix current (fix #8314)
Compare items ID, not paths which creates duplicates
parent
2c122a47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
share/lua/http/requests/playlist_jstree.xml
share/lua/http/requests/playlist_jstree.xml
+4
-4
share/lua/intf/modules/httprequests.lua
share/lua/intf/modules/httprequests.lua
+3
-3
No files found.
share/lua/http/requests/playlist_jstree.xml
View file @
5192a05d
...
@@ -55,11 +55,11 @@ function print_playlist(item)
...
@@ -55,11 +55,11 @@ function print_playlist(item)
end
end
else
else
local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "")
local name, path = vlc.strings.convert_xml_special_chars(item.name or "", item.path or "")
local current_item
= vlc.input.item
()
local current_item
_id = vlc.playlist.current
()
local current = ""
local current = ""
-- Is the item the one currently played
-- Is the item the one currently played
if(current_item ~= nil) then
if(current_item
_id
~= nil) then
if(
vlc.input.item().uri(current_item) == path
) then
if(
current_item_id == item.id
) then
current = 'current="current"'
current = 'current="current"'
end
end
end
end
...
@@ -82,4 +82,4 @@ end
...
@@ -82,4 +82,4 @@ end
--a(p) --Uncomment to debug
--a(p) --Uncomment to debug
print_playlist(p)
print_playlist(p)
?>
?>
</root>
</root>
\ No newline at end of file
share/lua/intf/modules/httprequests.lua
View file @
5192a05d
...
@@ -334,11 +334,11 @@ parseplaylist = function (item)
...
@@ -334,11 +334,11 @@ parseplaylist = function (item)
local
result
=
{}
local
result
=
{}
local
name
,
path
=
item
.
name
or
""
local
name
,
path
=
item
.
name
or
""
local
path
=
item
.
path
or
""
local
path
=
item
.
path
or
""
local
current_item
=
vlc
.
input
.
item
()
local
current_item
_id
=
vlc
.
playlist
.
current
()
-- Is the item the one currently played
-- Is the item the one currently played
if
(
current_item
~=
nil
)
then
if
(
current_item
_id
~=
nil
)
then
if
(
vlc
.
input
.
item
().
uri
(
current_item
)
==
path
)
then
if
(
current_item_id
==
item
.
id
)
then
result
.
current
=
"current"
result
.
current
=
"current"
end
end
end
end
...
...
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