summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2023-03-29 09:24:29 +0100
committerSolomon Peachy <pizza@shaftnet.org>2023-07-02 12:14:33 -0400
commit9ba51e355287f234260977e8cd978773e2528cae (patch)
tree324d3e172f9958bd239621105b7be6cbdd7c57a3 /apps/playlist.c
parent129fb4016bb081d9fc204fb66aa56cd4955e868e (diff)
downloadrockbox-9ba51e355287f234260977e8cd978773e2528cae.tar.gz
rockbox-9ba51e355287f234260977e8cd978773e2528cae.zip
playlist: Remove playlist_add()
It was only used in filetree.c. It's still implemented in Lua so scripts using rb.playlist_add() won't break, but has been removed from the Lua API "backend". Change-Id: I5625a47f0692456008c6b10dee14755151d22f29
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 0f11ad25ca..5b628ad649 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1207,6 +1207,8 @@ static int create_and_play_dir(int direction, bool play_last)
1207 if (global_settings.playlist_shuffle) 1207 if (global_settings.playlist_shuffle)
1208 playlist_shuffle(current_tick, -1); 1208 playlist_shuffle(current_tick, -1);
1209 1209
1210 playlist_set_modified(NULL, false);
1211
1210 if (play_last && direction <= 0) 1212 if (play_last && direction <= 0)
1211 index = current_playlist.amount - 1; 1213 index = current_playlist.amount - 1;
1212 else 1214 else
@@ -2024,21 +2026,6 @@ void playlist_shutdown(void)
2024 playlist_write_unlock(playlist); 2026 playlist_write_unlock(playlist);
2025} 2027}
2026 2028
2027/*
2028 * Add track to end of the playlist. Prefer playlist_insert_track(),
2029 * this is DEPRECATED and will be going away at some point.
2030 */
2031int playlist_add(const char *filename)
2032{
2033 int ret = playlist_insert_track(NULL, filename, PLAYLIST_INSERT_LAST,
2034 false, true);
2035 if (ret < 0)
2036 return ret;
2037
2038 playlist_set_modified(NULL, false);
2039 return ret;
2040}
2041
2042/* returns number of tracks in playlist (includes queued/inserted tracks) */ 2029/* returns number of tracks in playlist (includes queued/inserted tracks) */
2043int playlist_amount_ex(const struct playlist_info* playlist) 2030int playlist_amount_ex(const struct playlist_info* playlist)
2044{ 2031{