From 61cc7209ef69e6142242fd67d8c484bc1c976dbe Mon Sep 17 00:00:00 2001 From: ailurux Date: Fri, 17 Jan 2025 02:24:05 +0000 Subject: ailurux/now-playing-menu (#184) Overflow menu for the now playing screen. New home for the info screen here. Adds quick navigation to current album or artist (thanks tjk!) and clear queue button. Also fixed up the way the now playing screen looks when queue is cleared (remove previous duration and don't show "loading" if nothing is actively loading). Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/184 Co-authored-by: ailurux Co-committed-by: ailurux --- src/tangara/lua/lua_database.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/tangara') diff --git a/src/tangara/lua/lua_database.cpp b/src/tangara/lua/lua_database.cpp index 2a3ab59d..e79d6141 100644 --- a/src/tangara/lua/lua_database.cpp +++ b/src/tangara/lua/lua_database.cpp @@ -406,6 +406,31 @@ static auto lua_database(lua_State* state) -> int { lua_rawset(state, -3); + lua_pushliteral(state, "IndexTypes"); + lua_newtable(state); + lua_pushliteral(state, "ALBUMS_BY_ARTIST"); + lua_pushinteger(state, (int)database::kAlbumsByArtist.id); + lua_rawset(state, -3); + lua_pushliteral(state, "TRACKS_BY_GENRE"); + lua_pushinteger(state, (int)database::kTracksByGenre.id); + lua_rawset(state, -3); + lua_pushliteral(state, "ALL_TRACKS"); + lua_pushinteger(state, (int)database::kAllTracks.id); + lua_rawset(state, -3); + lua_pushliteral(state, "ALL_ALBUMS"); + lua_pushinteger(state, (int)database::kAllAlbums.id); + lua_rawset(state, -3); + lua_pushliteral(state, "ALL_ARTISTS"); + lua_pushinteger(state, (int)database::kAllArtists.id); + lua_rawset(state, -3); + lua_pushliteral(state, "PODCASTS"); + lua_pushinteger(state, (int)database::kPodcasts.id); + lua_rawset(state, -3); + lua_pushliteral(state, "AUDIOBOOKS"); + lua_pushinteger(state, (int)database::kAudiobooks.id); + lua_rawset(state, -3); + lua_rawset(state, -3); + return 1; } -- cgit v1.2.3