Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
2d3320dc
Commit
2d3320dc
authored
Nov 12, 2007
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to use a flat playlist in the rc.lua interface (default disabled).
parent
3f32e82e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
share/luaintf/rc.lua
share/luaintf/rc.lua
+19
-6
No files found.
share/luaintf/rc.lua
View file @
2d3320dc
...
...
@@ -50,6 +50,7 @@ description=
1 to enable).
* autoalias: If autocompletion returns only one possibility, use it
(0 to disable, 1 to enable).
* flatplaylist: 0 to disable, 1 to enable.
]============================================================================]
require
(
"common"
)
...
...
@@ -63,7 +64,8 @@ env = { prompt = "> ";
width
=
70
;
autocompletion
=
1
;
autoalias
=
1
;
welcome
=
"Remote control interface initialized. Type `help' for help."
welcome
=
"Remote control interface initialized. Type `help' for help."
;
flatplaylist
=
0
;
}
--[[ Import custom environement variables from the command line config (if possible) ]]
...
...
@@ -163,6 +165,14 @@ function add(name,client,arg)
f({{path=arg}})
end
function playlist_is_tree( client )
if client.env.flatplaylist == 0 then
return true
else
return false
end
end
function playlist(name,client,arg)
function playlist0(item,prefix)
local prefix = prefix or ""
...
...
@@ -187,17 +197,19 @@ function playlist(name,client,arg)
end
end
local playlist
local tree = playlist_is_tree(client)
print("tree",tree)
if name == "search" then
playlist = vlc.playlist.search(arg or "")
playlist = vlc.playlist.search(arg or ""
, tree
)
else
if tonumber(arg) then
print "number"
playlist = vlc.playlist.get(tonumber(arg))
playlist = vlc.playlist.get(tonumber(arg)
, tree
)
elseif arg then
print "string"
playlist = vlc.playlist.get(arg)
playlist = vlc.playlist.get(arg
, tree
)
else
playlist = vlc.playlist.get()
playlist = vlc.playlist.get(
nil, tree
)
end
end
if name == "search" then
...
...
@@ -223,7 +235,8 @@ function playlist_sort(name,client,arg)
if
not
arg
then
client
:
append
(
"Valid sort keys are: id, title, artist, genre, random, duration, album."
)
else
vlc
.
playlist
.
sort
(
arg
)
local
tree
=
playlist_is_tree
(
client
)
vlc
.
playlist
.
sort
(
arg
,
false
,
tree
)
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