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
2f2c4b07
Commit
2f2c4b07
authored
Oct 07, 2013
by
Alex Warhawk
Committed by
Jean-Baptiste Kempf
Oct 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reshuffle after playthrough
Close #3932 Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
03380175
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
src/playlist/thread.c
src/playlist/thread.c
+18
-0
No files found.
src/playlist/thread.c
View file @
2f2c4b07
...
@@ -332,6 +332,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
...
@@ -332,6 +332,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
if
(
p_playlist
->
i_current_index
>=
p_playlist
->
current
.
i_size
)
if
(
p_playlist
->
i_current_index
>=
p_playlist
->
current
.
i_size
)
{
{
PL_DEBUG
(
"looping - restarting at beginning of node"
);
PL_DEBUG
(
"looping - restarting at beginning of node"
);
/* reshuffle playlist when end is reached */
if
(
var_GetBool
(
p_playlist
,
"random"
)
)
{
PL_DEBUG
(
"reshuffle playlist"
);
ResetCurrentlyPlaying
(
p_playlist
,
get_current_status_item
(
p_playlist
)
);
}
p_playlist
->
i_current_index
=
0
;
p_playlist
->
i_current_index
=
0
;
}
}
}
}
...
@@ -346,6 +352,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
...
@@ -346,6 +352,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
if
(
p_playlist
->
i_current_index
<=
-
1
)
if
(
p_playlist
->
i_current_index
<=
-
1
)
{
{
PL_DEBUG
(
"looping - restarting at end of node"
);
PL_DEBUG
(
"looping - restarting at end of node"
);
/* reshuffle playlist when beginning is reached */
if
(
var_GetBool
(
p_playlist
,
"random"
)
)
{
PL_DEBUG
(
"reshuffle playlist"
);
ResetCurrentlyPlaying
(
p_playlist
,
get_current_status_item
(
p_playlist
)
);
}
p_playlist
->
i_current_index
=
p_playlist
->
current
.
i_size
-
1
;
p_playlist
->
i_current_index
=
p_playlist
->
current
.
i_size
-
1
;
}
}
}
}
...
@@ -406,6 +418,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
...
@@ -406,6 +418,12 @@ static playlist_item_t *NextItem( playlist_t *p_playlist )
{
{
if
(
!
b_loop
||
p_playlist
->
current
.
i_size
==
0
)
if
(
!
b_loop
||
p_playlist
->
current
.
i_size
==
0
)
return
NULL
;
return
NULL
;
/* reshuffle after last item has been played */
if
(
var_GetBool
(
p_playlist
,
"random"
)
)
{
PL_DEBUG
(
"reshuffle playlist"
);
ResetCurrentlyPlaying
(
p_playlist
,
get_current_status_item
(
p_playlist
)
);
}
p_playlist
->
i_current_index
=
0
;
p_playlist
->
i_current_index
=
0
;
}
}
PL_DEBUG
(
"using item %i"
,
p_playlist
->
i_current_index
);
PL_DEBUG
(
"using item %i"
,
p_playlist
->
i_current_index
);
...
...
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