parent
339555f041
commit
44c487ff48
@ -73,8 +73,8 @@ async function GetPublicationFromConnector(connector, title){
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function GetChapters(connector, internalId){
|
async function GetChapters(connector, internalId, language){
|
||||||
var uri = `${apiUri}/Manga/Chapters?connector=${connector}&internalId=${internalId}`;
|
var uri = `${apiUri}/Manga/Chapters?connector=${connector}&internalId=${internalId}&translatedLanguage=${language}`;
|
||||||
let json = await GetData(uri);
|
let json = await GetData(uri);
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@ -143,13 +143,13 @@ async function GetLibraryConnectors(){
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreateMonitorJob(connector, internalId){
|
function CreateMonitorJob(connector, internalId, language){
|
||||||
var uri = `${apiUri}/Jobs/MonitorManga?connector=${connector}&internalId=${internalId}&interval=03:00:00`;
|
var uri = `${apiUri}/Jobs/MonitorManga?connector=${connector}&internalId=${internalId}&interval=03:00:00&translatedLanguage=${language}`;
|
||||||
PostData(uri);
|
PostData(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
function CreateDownloadNewChaptersJob(connector, internalId){
|
function CreateDownloadNewChaptersJob(connector, internalId, language){
|
||||||
var uri = `${apiUri}/Jobs/DownloadNewChapters?connector=${connector}&internalId=${internalId}`;
|
var uri = `${apiUri}/Jobs/DownloadNewChapters?connector=${connector}&internalId=${internalId}&translatedLanguage=${language}`;
|
||||||
PostData(uri);
|
PostData(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,11 @@
|
|||||||
<div id="newMangaPopupSelector">
|
<div id="newMangaPopupSelector">
|
||||||
<select id="newMangaConnector" />
|
<select id="newMangaConnector" />
|
||||||
<input type="text" placeholder="Title" id="newMangaTitle" />
|
<input type="text" placeholder="Title" id="newMangaTitle" />
|
||||||
|
<select id="newMangaTranslatedLanguage">
|
||||||
|
<option selected="selected">en</option>
|
||||||
|
<option>it</option>
|
||||||
|
<option>de</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div id="newMangaResult"></div>
|
<div id="newMangaResult"></div>
|
||||||
</popup>
|
</popup>
|
||||||
|
@ -40,6 +40,7 @@ const newMangaPopup = document.querySelector("#newMangaPopup");
|
|||||||
const newMangaConnector = document.querySelector("#newMangaConnector");
|
const newMangaConnector = document.querySelector("#newMangaConnector");
|
||||||
const newMangaTitle = document.querySelector("#newMangaTitle");
|
const newMangaTitle = document.querySelector("#newMangaTitle");
|
||||||
const newMangaResult = document.querySelector("#newMangaResult");
|
const newMangaResult = document.querySelector("#newMangaResult");
|
||||||
|
const newMangaTranslatedLanguage = document.querySelector("#newMangaTranslatedLanguage");
|
||||||
const jobsRunningTag = document.querySelector("#jobsRunningTag");
|
const jobsRunningTag = document.querySelector("#jobsRunningTag");
|
||||||
const jobsQueuedTag = document.querySelector("#jobsQueuedTag");
|
const jobsQueuedTag = document.querySelector("#jobsQueuedTag");
|
||||||
const loaderdiv = document.querySelector('#loaderdiv');
|
const loaderdiv = document.querySelector('#loaderdiv');
|
||||||
@ -108,6 +109,7 @@ function GetNewMangaItems(){
|
|||||||
newMangaResult.replaceChildren();
|
newMangaResult.replaceChildren();
|
||||||
newMangaConnector.disabled = true;
|
newMangaConnector.disabled = true;
|
||||||
newMangaTitle.disabled = true;
|
newMangaTitle.disabled = true;
|
||||||
|
newMangaTranslatedLanguage.disabled = true;
|
||||||
GetPublicationFromConnector(newMangaConnector.value, newMangaTitle.value).then((json) => {
|
GetPublicationFromConnector(newMangaConnector.value, newMangaTitle.value).then((json) => {
|
||||||
//console.log(json);
|
//console.log(json);
|
||||||
if(json.length > 0)
|
if(json.length > 0)
|
||||||
@ -122,6 +124,7 @@ function GetNewMangaItems(){
|
|||||||
|
|
||||||
newMangaConnector.disabled = false;
|
newMangaConnector.disabled = false;
|
||||||
newMangaTitle.disabled = false;
|
newMangaTitle.disabled = false;
|
||||||
|
newMangaTranslatedLanguage.disabled = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,7 +148,7 @@ function CreateManga(manga, connector){
|
|||||||
}
|
}
|
||||||
|
|
||||||
createMonitorJobButton.addEventListener("click", () => {
|
createMonitorJobButton.addEventListener("click", () => {
|
||||||
CreateMonitorJob(newMangaConnector.value, selectedManga.internalId);
|
CreateMonitorJob(newMangaConnector.value, selectedManga.internalId, newMangaTranslatedLanguage.value);
|
||||||
UpdateJobs();
|
UpdateJobs();
|
||||||
mangaViewerPopup.style.display = "none";
|
mangaViewerPopup.style.display = "none";
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user