summaryrefslogtreecommitdiff
path: root/rddb/rddb.go
diff options
context:
space:
mode:
Diffstat (limited to 'rddb/rddb.go')
-rw-r--r--rddb/rddb.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/rddb/rddb.go b/rddb/rddb.go
index d6cd2d3..80cbb38 100644
--- a/rddb/rddb.go
+++ b/rddb/rddb.go
@@ -124,9 +124,9 @@ type CutListEntry struct {
Evergreen bool
Description string
Duration time.Duration
- // Imported time.Time
- NumPlayed uint
- // LastPlayed time.Time
+ Imported NullTime
+ NumPlayed uint
+ LastPlayed NullTime
}
type CartListEntry struct {
@@ -209,8 +209,7 @@ func (db *DB) init() (err error) {
if db.getCartInfoStmt, err = db.dbh.Prepare("select TITLE from CART where TYPE=1 and NUMBER = ?"); err != nil {
return
}
- // if db.getCutInfoStmt, err = db.dbh.Prepare("select CUT_NAME, EVERGREEN, DESCRIPTION, LENGTH, ORIGIN_DATETIME, PLAY_COUNTER, LAST_PLAY_DATETIME from CUTS where CART_NUMBER = ?"); err != nil {
- if db.getCutInfoStmt, err = db.dbh.Prepare("select CUT_NAME, EVERGREEN, DESCRIPTION, LENGTH, PLAY_COUNTER from CUTS where CART_NUMBER = ?"); err != nil {
+ if db.getCutInfoStmt, err = db.dbh.Prepare("select CUT_NAME, EVERGREEN, DESCRIPTION, LENGTH, ORIGIN_DATETIME, PLAY_COUNTER, LAST_PLAY_DATETIME from CUTS where CART_NUMBER = ?"); err != nil {
return
}
@@ -368,8 +367,7 @@ func (db *DB) getCutInfo(cart uint) (cuts []CutListEntry, err error) {
var cutName, evergreen string
var length uint
- // if err = rows.Scan(&cutName, &evergreen, &cut.Description, &length, &cut.Imported, &cut.NumPlayed, &cut.LastPlayed); err != nil {
- if err = rows.Scan(&cutName, &evergreen, &cut.Description, &length, &cut.NumPlayed); err != nil {
+ if err = rows.Scan(&cutName, &evergreen, &cut.Description, &length, &cut.Imported, &cut.NumPlayed, &cut.LastPlayed); err != nil {
return
}