summaryrefslogtreecommitdiff
path: root/src/tangara/lua
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-09-27 16:59:59 +1000
committerailurux <ailuruxx@gmail.com>2024-09-27 16:59:59 +1000
commit3490cceb6b94ffbc947b699c8495cf8500e65b98 (patch)
tree60cf92de52ec965e10f8d2cbc5f69ed442718bf5 /src/tangara/lua
parentf8a6c8c85af534510dfc2840730387d67b4c82ff (diff)
downloadtangara-fw-3490cceb6b94ffbc947b699c8495cf8500e65b98.tar.gz
Added listened indicator for audiobooks and podcasts
Diffstat (limited to 'src/tangara/lua')
-rw-r--r--src/tangara/lua/lua_database.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tangara/lua/lua_database.cpp b/src/tangara/lua/lua_database.cpp
index 39179bf3..2a3ab59d 100644
--- a/src/tangara/lua/lua_database.cpp
+++ b/src/tangara/lua/lua_database.cpp
@@ -388,6 +388,24 @@ static auto lua_database(lua_State* state) -> int {
luaL_setfuncs(state, kDbRecordFuncs, 0);
luaL_newlib(state, kDatabaseFuncs);
+
+ lua_pushliteral(state, "MediaTypes");
+ lua_newtable(state);
+ lua_pushliteral(state, "Unknown");
+ lua_pushinteger(state, (int)database::MediaType::kUnknown);
+ lua_rawset(state, -3);
+ lua_pushliteral(state, "Music");
+ lua_pushinteger(state, (int)database::MediaType::kMusic);
+ lua_rawset(state, -3);
+ lua_pushliteral(state, "Podcast");
+ lua_pushinteger(state, (int)database::MediaType::kPodcast);
+ lua_rawset(state, -3);
+ lua_pushliteral(state, "Audiobook");
+ lua_pushinteger(state, (int)database::MediaType::kAudiobook);
+ lua_rawset(state, -3);
+ lua_rawset(state, -3);
+
+
return 1;
}