add a settings entry for nr of random videos to display
This commit is contained in:
@ -20,15 +20,16 @@ type SettingsType struct {
|
||||
MediacenterName string
|
||||
VideoPath string
|
||||
TVShowPath string
|
||||
RandomNR uint32
|
||||
}
|
||||
|
||||
func LoadSettings() *SettingsType {
|
||||
query := "SELECT DarkMode, password, mediacenter_name, video_path, episode_path from settings"
|
||||
query := "SELECT DarkMode, password, mediacenter_name, video_path, episode_path, random_nr from settings"
|
||||
|
||||
result := SettingsType{}
|
||||
var darkmode uint8
|
||||
|
||||
err := database.QueryRow(query).Scan(&darkmode, &result.Pasword, &result.MediacenterName, &result.VideoPath, &result.TVShowPath)
|
||||
err := database.QueryRow(query).Scan(&darkmode, &result.Pasword, &result.MediacenterName, &result.VideoPath, &result.TVShowPath, &result.RandomNR)
|
||||
if err != nil {
|
||||
fmt.Println("error while parsing db data: " + err.Error())
|
||||
}
|
||||
|
Reference in New Issue
Block a user