diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/tangara/database/index.cpp | 2 | ||||
| -rw-r--r-- | src/tangara/lua/lua_database.cpp | 18 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/tangara/database/index.cpp b/src/tangara/database/index.cpp index 0ced27ed..1cdc0d07 100644 --- a/src/tangara/database/index.cpp +++ b/src/tangara/database/index.cpp @@ -60,7 +60,7 @@ const IndexInfo kPodcasts{ .id = 5, .type = MediaType::kPodcast, .name = "Podcasts", - .components = {Tag::kTitle}, + .components = {Tag::kAlbum, Tag::kTitle}, }; const IndexInfo kAudiobooks{ 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; } |
