aboutsummaryrefslogtreecommitdiff
path: root/internal/scrobbler/db.go
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-10-10 17:52:19 -0700
committerFranck Cuny <franck@fcuny.net>2021-10-10 17:52:19 -0700
commita4fe1e3ef4e06e19f146a0a6498cdb550ef8b4f3 (patch)
tree406b68decf1406833edd10d1b12a2fac8a5b6423 /internal/scrobbler/db.go
parentmpd-scrobbler: proper default arguments (diff)
downloadx-a4fe1e3ef4e06e19f146a0a6498cdb550ef8b4f3.tar.gz
scrobbler: record how long a song was played
Add a column `playtime` to the records table to keep track of how long a song was played. With this information, in the future, we will be able to sum up how long we listen to music, but also which songs were skipped.
Diffstat (limited to '')
-rw-r--r--internal/scrobbler/db.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/scrobbler/db.go b/internal/scrobbler/db.go
index a788b4c..5f80aa4 100644
--- a/internal/scrobbler/db.go
+++ b/internal/scrobbler/db.go
@@ -24,6 +24,7 @@ func initdb(dbpath string) error {
artist text,
album text,
duration int,
+ playtime int,
time timestamp
);`