fix permissions problem preventing mining from working
This commit is contained in:
1 parent
7860b009b5
commit
7267e1bcaa
5 files changed
+19
-20
No files matched your search
+6
-6
@@ -2198,11 +2198,11 @@ function send_ankiconnect_command(host, command)
|
||||
async function mine_to_ankiconnect_with_base64_audio(object, audiofname, audiodata)
|
||||
{
|
||||
let object_keys = Object.keys(object);
|
||||
let promise = browser.storage.local.get(["livemining_deckname", "livemining_modelname", "livemining_fields", "livemining_host"]);
|
||||
promise.then((storage) =>
|
||||
let promise = browser.storage.local.get(["livemining_deckname", "livemining_modelname", "livemining_fields", "livemining_host2"]);
|
||||
promise.then((storage) =>
|
||||
{
|
||||
if(storage["livemining_host"] === undefined)
|
||||
storage["livemining_host"] = "http://localhost:8765/";
|
||||
if(storage["livemining_host2"] === undefined)
|
||||
storage["livemining_host2"] = "http://127.0.0.1:8765";
|
||||
if(storage["livemining_deckname"] === undefined)
|
||||
storage["livemining_deckname"] = "Default";
|
||||
if(storage["livemining_modelname"] === undefined)
|
||||
@@ -2246,7 +2246,7 @@ async function mine_to_ankiconnect_with_base64_audio(object, audiofname, audioda
|
||||
"data": audiodata
|
||||
}
|
||||
};
|
||||
send_ankiconnect_command(storage["livemining_host"], mediafilecommand);
|
||||
send_ankiconnect_command(storage["livemining_host2"], mediafilecommand);
|
||||
audioadded = true;
|
||||
}
|
||||
// for some reason not even anki 2.0 supports this
|
||||
@@ -2260,7 +2260,7 @@ async function mine_to_ankiconnect_with_base64_audio(object, audiofname, audioda
|
||||
}
|
||||
}
|
||||
note["params"]["note"]["fields"] = fields;
|
||||
send_ankiconnect_command(storage["livemining_host"], note);
|
||||
send_ankiconnect_command(storage["livemining_host2"], note);
|
||||
}, (e) => {console.log(e);});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user