Changeset 2d3320dc962cca52a0388c0b3ff4c470e8ac830e
- Timestamp:
- 12/11/07 23:18:31
(1 year ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1194905911 +0000
- git-parent:
[3f32e82e12c68514db43bc1f7a4d7a460d2c6bb8]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1194905911 +0000
- Message:
Add option to use a flat playlist in the rc.lua interface (default disabled).
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r87c76c2 |
r2d3320d |
|
| 51 | 51 | * autoalias: If autocompletion returns only one possibility, use it |
|---|
| 52 | 52 | (0 to disable, 1 to enable). |
|---|
| | 53 | * flatplaylist: 0 to disable, 1 to enable. |
|---|
| 53 | 54 | ]============================================================================] |
|---|
| 54 | 55 | |
|---|
| … | … | |
| 64 | 65 | autocompletion = 1; |
|---|
| 65 | 66 | autoalias = 1; |
|---|
| 66 | | welcome = "Remote control interface initialized. Type `help' for help." |
|---|
| | 67 | welcome = "Remote control interface initialized. Type `help' for help."; |
|---|
| | 68 | flatplaylist = 0; |
|---|
| 67 | 69 | } |
|---|
| 68 | 70 | |
|---|
| … | … | |
| 164 | 166 | end |
|---|
| 165 | 167 | |
|---|
| | 168 | function playlist_is_tree( client ) |
|---|
| | 169 | if client.env.flatplaylist == 0 then |
|---|
| | 170 | return true |
|---|
| | 171 | else |
|---|
| | 172 | return false |
|---|
| | 173 | end |
|---|
| | 174 | end |
|---|
| | 175 | |
|---|
| 166 | 176 | function playlist(name,client,arg) |
|---|
| 167 | 177 | function playlist0(item,prefix) |
|---|
| … | … | |
| 188 | 198 | end |
|---|
| 189 | 199 | local playlist |
|---|
| | 200 | local tree = playlist_is_tree(client) |
|---|
| | 201 | print("tree",tree) |
|---|
| 190 | 202 | if name == "search" then |
|---|
| 191 | | playlist = vlc.playlist.search(arg or "") |
|---|
| | 203 | playlist = vlc.playlist.search(arg or "", tree) |
|---|
| 192 | 204 | else |
|---|
| 193 | 205 | if tonumber(arg) then |
|---|
| 194 | 206 | print "number" |
|---|
| 195 | | playlist = vlc.playlist.get(tonumber(arg)) |
|---|
| | 207 | playlist = vlc.playlist.get(tonumber(arg), tree) |
|---|
| 196 | 208 | elseif arg then |
|---|
| 197 | 209 | print "string" |
|---|
| 198 | | playlist = vlc.playlist.get(arg) |
|---|
| | 210 | playlist = vlc.playlist.get(arg, tree) |
|---|
| 199 | 211 | else |
|---|
| 200 | | playlist = vlc.playlist.get() |
|---|
| | 212 | playlist = vlc.playlist.get(nil, tree) |
|---|
| 201 | 213 | end |
|---|
| 202 | 214 | end |
|---|
| … | … | |
| 224 | 236 | client:append("Valid sort keys are: id, title, artist, genre, random, duration, album.") |
|---|
| 225 | 237 | else |
|---|
| 226 | | vlc.playlist.sort(arg) |
|---|
| | 238 | local tree = playlist_is_tree(client) |
|---|
| | 239 | vlc.playlist.sort(arg,false,tree) |
|---|
| 227 | 240 | end |
|---|
| 228 | 241 | end |
|---|