feat: add title columns and migration tracking
This commit is contained in:
12
internal/database/helpers.go
Normal file
12
internal/database/helpers.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package database
|
||||
|
||||
// DisplayTitle returns the English title if available, otherwise Japanese, otherwise original
|
||||
func (r GetUserWatchListRow) DisplayTitle() string {
|
||||
if r.TitleEnglish.Valid && r.TitleEnglish.String != "" {
|
||||
return r.TitleEnglish.String
|
||||
}
|
||||
if r.TitleJapanese.Valid && r.TitleJapanese.String != "" {
|
||||
return r.TitleJapanese.String
|
||||
}
|
||||
return r.TitleOriginal
|
||||
}
|
||||
Reference in New Issue
Block a user