diff options
| author | ailurux <ailurux@noreply.codeberg.org> | 2024-09-24 05:47:18 +0000 |
|---|---|---|
| committer | ailurux <ailurux@noreply.codeberg.org> | 2024-09-24 05:47:18 +0000 |
| commit | e46582ce0981e09f55eaee92f522a17c02fb2288 (patch) | |
| tree | e1f1ccc81867a9b32b18446ca19e613a9f2886c4 /src/tangara/lua | |
| parent | 5e43b422182b300074a2d2e02736557d34434996 (diff) | |
| parent | c1d89e79482fb219e343797ecfbc34563097c94d (diff) | |
| download | tangara-fw-e46582ce0981e09f55eaee92f522a17c02fb2288.tar.gz | |
Merge pull request 'Record play_count in TrackData, incrementing it when tracks finish' (#107) from jqln/play-count into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/107
Diffstat (limited to 'src/tangara/lua')
| -rw-r--r-- | src/tangara/lua/lua_database.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tangara/lua/lua_database.cpp b/src/tangara/lua/lua_database.cpp index 2e00f427..39179bf3 100644 --- a/src/tangara/lua/lua_database.cpp +++ b/src/tangara/lua/lua_database.cpp @@ -121,6 +121,10 @@ static void pushTrack(lua_State* L, const database::Track& track) { lua_pushliteral(L, "saved_position"); lua_pushinteger(L, track.data().last_position); lua_settable(L, -3); + + lua_pushliteral(L, "play_count"); + lua_pushinteger(L, track.data().play_count); + lua_settable(L, -3); } static auto version(lua_State* L) -> int { |
