Fix compilation w.r.t. selectedStorageAreaName

This commit is contained in:
The Magician 2024-09-17 11:38:59 +01:00
parent 3ef49bc72c
commit 95f45a98fa
1 changed files with 10 additions and 5 deletions

View File

@ -4,10 +4,10 @@ import (
"database/sql"
"errors"
"fmt"
"os"
"os/exec"
"sevenkeys/database"
"sevenkeys/logic"
"sevenkeys/manabox"
)
var output string
@ -15,7 +15,7 @@ var output string
func MainCliLoop(db *sql.DB) {
var command string
var selectedStorageAreaName string
//var selectedStorageAreaName string
var cardLocation database.CardLocation
var insertSearchCriteria logic.SearchCriteria = logic.SearchCriteria{
@ -36,7 +36,8 @@ func MainCliLoop(db *sql.DB) {
for {
ShowSplashScreen()
showStorageInfo(os.Stdout, selectedStorageAreaName)
// TODO: Fix this
//showStorageInfo(os.Stdout, selectedStorageAreaName)
showInsertSearchCriteria(insertSearchCriteria)
showSelectedCard()
showCopiesInserted()
@ -59,10 +60,10 @@ func MainCliLoop(db *sql.DB) {
options, err := logic.GetStorageAreaSearchOptions(db)
logic.Check(err)
id, name, err := logic.GenericSearch(options)
id, _, err := logic.GenericSearch(options)
logic.Check(err)
selectedStorageAreaName = name
//selectedStorageAreaName = name
cardLocation.StorageAreaId = id
break
case "c", "criteria":
@ -95,6 +96,10 @@ func MainCliLoop(db *sql.DB) {
logic.Check(err)
copiesInserted++
break
case "m", "manabox":
filename := GetStringResponse("Filename:")
manabox.ParseManaboxExport(filename)
break
case "l", "locate":
filename := GetStringResponse("Filename:")
cardNames, err := logic.GetCardNamesFromFile(filename)