Add watchlist source name override for ani-cli queries
This commit is contained in:
@@ -833,6 +833,9 @@ WATCHLIST_HTML = r"""<!doctype html>
|
||||
<label>Episode offset
|
||||
<input class="auto-download-offset" id="autoDownloadOffset" type="number" min="1" step="1" placeholder="Optional">
|
||||
</label>
|
||||
<label class="wide-half">Source name
|
||||
<input class="auto-download-source-name" id="autoDownloadSourceName" type="text">
|
||||
</label>
|
||||
<label class="wide-half">Name source
|
||||
<select class="auto-download-name-select" id="autoDownloadNameSelect"></select>
|
||||
</label>
|
||||
@@ -887,6 +890,7 @@ WATCHLIST_HTML = r"""<!doctype html>
|
||||
const autoDownloadQuality = document.getElementById("autoDownloadQuality");
|
||||
const autoDownloadSeries = document.getElementById("autoDownloadSeries");
|
||||
const autoDownloadOffset = document.getElementById("autoDownloadOffset");
|
||||
const autoDownloadSourceName = document.getElementById("autoDownloadSourceName");
|
||||
const autoDownloadNameSelect = document.getElementById("autoDownloadNameSelect");
|
||||
const autoDownloadName = document.getElementById("autoDownloadName");
|
||||
const autoDownloadSaveBtn = document.getElementById("autoDownloadSaveBtn");
|
||||
@@ -1088,6 +1092,7 @@ WATCHLIST_HTML = r"""<!doctype html>
|
||||
autoDownloadQuality.value = item.auto_download_quality || "best";
|
||||
autoDownloadSeries.value = item.auto_download_series || "1";
|
||||
autoDownloadOffset.value = item.auto_download_offset || "";
|
||||
autoDownloadSourceName.value = item.auto_download_source_name || item.title || "";
|
||||
populateAutoDownloadNameChoices(item);
|
||||
autoDownloadOverlay.hidden = false;
|
||||
}
|
||||
@@ -1123,6 +1128,7 @@ WATCHLIST_HTML = r"""<!doctype html>
|
||||
mode: autoDownloadMode.value,
|
||||
quality: autoDownloadQuality.value,
|
||||
name: autoDownloadName.value,
|
||||
source_name: autoDownloadSourceName.value,
|
||||
series: autoDownloadSeries.value,
|
||||
episode_offset: autoDownloadOffset.value
|
||||
})
|
||||
@@ -1133,12 +1139,14 @@ WATCHLIST_HTML = r"""<!doctype html>
|
||||
auto_download_mode: savedItem.auto_download_mode || autoDownloadMode.value,
|
||||
auto_download_quality: savedItem.auto_download_quality || autoDownloadQuality.value,
|
||||
auto_download_name: savedItem.auto_download_name || autoDownloadName.value,
|
||||
auto_download_source_name: savedItem.auto_download_source_name || autoDownloadSourceName.value,
|
||||
auto_download_series: savedItem.auto_download_series || autoDownloadSeries.value,
|
||||
auto_download_offset: savedItem.auto_download_offset || ""
|
||||
};
|
||||
populateAutoDownloadNameChoices(state.autoDownloadDraft);
|
||||
autoDownloadSeries.value = state.autoDownloadDraft.auto_download_series || autoDownloadSeries.value;
|
||||
autoDownloadOffset.value = state.autoDownloadDraft.auto_download_offset || "";
|
||||
autoDownloadSourceName.value = state.autoDownloadDraft.auto_download_source_name || autoDownloadSourceName.value;
|
||||
autoDownloadStatus.textContent = data.message || "Auto-download settings saved.";
|
||||
setNotice(data.message || "Auto-download settings saved.");
|
||||
closeAutoDownloadOverlay();
|
||||
|
||||
Reference in New Issue
Block a user