diff options
author | wm4 <wm4@nowhere> | 2019-12-28 21:32:03 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-12-28 21:32:15 +0100 |
commit | 5a261507173d28c762ba4f605d7983d928d4bf24 (patch) | |
tree | f178d1bfce80e7033232fc353ea292d37be3112f /common/playlist.h | |
parent | 582f3f7cc01f81345df5c20a012b1f47587e6a97 (diff) | |
download | mpv-5a261507173d28c762ba4f605d7983d928d4bf24.tar.bz2 mpv-5a261507173d28c762ba4f605d7983d928d4bf24.tar.xz |
command: add a playlist-unshuffle command
Has a number of restrictions.
See: #2491, #7294
Diffstat (limited to 'common/playlist.h')
-rw-r--r-- | common/playlist.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/playlist.h b/common/playlist.h index d0f17e315f..8b014e864d 100644 --- a/common/playlist.h +++ b/common/playlist.h @@ -42,6 +42,9 @@ struct playlist_entry { char **redirects; int num_redirects; + // Used for unshuffling: the pl_index before it was shuffled. -1 => unknown. + int original_index; + // Set to true if playback didn't seem to work, or if the file could be // played only for a very short time. This is used to make playlist // navigation just work in case the user has unplayable files in the @@ -87,6 +90,7 @@ void playlist_move(struct playlist *pl, struct playlist_entry *entry, void playlist_add_file(struct playlist *pl, const char *filename); void playlist_shuffle(struct playlist *pl); +void playlist_unshuffle(struct playlist *pl); struct playlist_entry *playlist_get_first(struct playlist *pl); struct playlist_entry *playlist_get_last(struct playlist *pl); struct playlist_entry *playlist_get_next(struct playlist *pl, int direction); |