diff options
author | Guido Cella <guido@guidocella.xyz> | 2023-10-07 16:53:52 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-09 15:09:35 +0000 |
commit | 81dea9031dec05559624b6d2a8ea9bf89667f755 (patch) | |
tree | ba78bb2183bccf8e73fff01932e0029057888c82 /common/playlist.h | |
parent | bcb9ed56fae7da59b495c5bddd7576821627dffb (diff) | |
download | mpv-81dea9031dec05559624b6d2a8ea9bf89667f755.tar.bz2 mpv-81dea9031dec05559624b6d2a8ea9bf89667f755.tar.xz |
command: add playlist-next-playlist and playlist-prev-playlist
playlist-prev-playlist goes to the beginning of the previous playlist
because this seems more useful and symmetrical to
playlist-next-playlist. It does not go to the beginning when the current
playlist-path starts with the previous playlist-path, e.g. with mpv
--loop-playlist foo/, which expands to foo/{1..9}.zip, the current
playlist path foo/1.zip beings with the playlist-path foo/ of {2..9}.zip
and thus playlist-prev-playlist goes to 9.zip rather than to 2.zip.
Closes #12495.
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 c5b82781e6..aecd53988b 100644 --- a/common/playlist.h +++ b/common/playlist.h @@ -98,6 +98,10 @@ struct playlist_entry *playlist_get_last(struct playlist *pl); struct playlist_entry *playlist_get_next(struct playlist *pl, int direction); struct playlist_entry *playlist_entry_get_rel(struct playlist_entry *e, int direction); +struct playlist_entry *playlist_get_first_in_next_playlist(struct playlist *pl, + int direction); +struct playlist_entry *playlist_get_first_in_same_playlist(struct playlist_entry *entry, + char *current_playlist_path); void playlist_add_base_path(struct playlist *pl, bstr base_path); void playlist_set_stream_flags(struct playlist *pl, int flags); int64_t playlist_transfer_entries(struct playlist *pl, struct playlist *source_pl); |