Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
4c0e2033
Commit
4c0e2033
authored
Oct 03, 2007
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rc: add `random' command
parent
d62c5207
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
modules/control/rc.c
modules/control/rc.c
+26
-2
No files found.
modules/control/rc.c
View file @
4c0e2033
...
...
@@ -369,6 +369,7 @@ static void RegisterCallbacks( intf_thread_t *p_intf )
ADD
(
"add"
,
STRING
,
Playlist
)
ADD
(
"repeat"
,
STRING
,
Playlist
)
ADD
(
"loop"
,
STRING
,
Playlist
)
ADD
(
"random"
,
STRING
,
Playlist
)
ADD
(
"enqueue"
,
STRING
,
Playlist
)
ADD
(
"playlist"
,
VOID
,
Playlist
)
ADD
(
"sort"
,
VOID
,
Playlist
)
...
...
@@ -847,8 +848,9 @@ static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
msg_rc
(
_
(
"| prev . . . . . . . . . . . . previous playlist item"
));
msg_rc
(
_
(
"| goto . . . . . . . . . . . . . . goto item at index"
));
msg_rc
(
_
(
"| repeat [on|off] . . . . toggle playlist item repeat"
));
msg_rc
(
_
(
"| loop [on|off] . . . . . . toggle playlist item loop"
));
msg_rc
(
_
(
"| clear . . . . . . . . . . . . . clear the playlist"
));
msg_rc
(
_
(
"| loop [on|off] . . . . . . . . . toggle playlist loop"
));
msg_rc
(
_
(
"| random [on|off] . . . . . . . toggle random jumping"
));
msg_rc
(
_
(
"| clear . . . . . . . . . . . . . . clear the playlist"
));
msg_rc
(
_
(
"| status . . . . . . . . . . . current playlist status"
));
msg_rc
(
_
(
"| title [X] . . . . . . set/get title in current item"
));
msg_rc
(
_
(
"| title_n . . . . . . . . next title in current item"
));
...
...
@@ -1341,6 +1343,28 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
}
msg_rc
(
"Setting loop to %d"
,
val
.
b_bool
);
}
else
if
(
!
strcmp
(
psz_cmd
,
"random"
)
)
{
vlc_bool_t
b_update
=
VLC_TRUE
;
var_Get
(
p_playlist
,
"random"
,
&
val
);
if
(
strlen
(
newval
.
psz_string
)
>
0
)
{
if
(
(
!
strncmp
(
newval
.
psz_string
,
"on"
,
2
)
&&
(
val
.
b_bool
==
VLC_TRUE
)
)
||
(
!
strncmp
(
newval
.
psz_string
,
"off"
,
3
)
&&
(
val
.
b_bool
==
VLC_FALSE
)
)
)
{
b_update
=
VLC_FALSE
;
}
}
if
(
b_update
)
{
val
.
b_bool
=
!
val
.
b_bool
;
var_Set
(
p_playlist
,
"random"
,
val
);
}
msg_rc
(
"Setting random to %d"
,
val
.
b_bool
);
}
else
if
(
!
strcmp
(
psz_cmd
,
"goto"
)
)
{
int
i_pos
=
atoi
(
newval
.
psz_string
);
...
...
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