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