mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-28 21:38:51 +03:00
parent
f6ab1d63e8
commit
5beb1b2cd0
10 changed files with 16 additions and 15 deletions
|
@ -26,7 +26,7 @@
|
||||||
noCache: true,
|
noCache: true,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
path: path
|
path: decodeURIComponent(path)
|
||||||
},
|
},
|
||||||
onComplete: (response) => {
|
onComplete: (response) => {
|
||||||
++completionCount;
|
++completionCount;
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
let completionCount = 0;
|
let completionCount = 0;
|
||||||
rules.forEach((rule) => {
|
rules.forEach((rule) => {
|
||||||
window.parent.qBittorrent.RssDownloader.modifyRuleState(rule, 'previouslyMatchedEpisodes', [], () => {
|
window.parent.qBittorrent.RssDownloader.modifyRuleState(decodeURIComponent(rule), 'previouslyMatchedEpisodes', [], () => {
|
||||||
++completionCount;
|
++completionCount;
|
||||||
if (completionCount === rules.length) {
|
if (completionCount === rules.length) {
|
||||||
window.parent.qBittorrent.RssDownloader.updateRulesList();
|
window.parent.qBittorrent.RssDownloader.updateRulesList();
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
noCache: true,
|
noCache: true,
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
ruleName: rule
|
ruleName: decodeURIComponent(rule)
|
||||||
},
|
},
|
||||||
onComplete: (response) => {
|
onComplete: (response) => {
|
||||||
++completionCount;
|
++completionCount;
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
if (!currentUrl)
|
if (!currentUrl)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const decodedUrl = decodeURIComponent(currentUrl);
|
$('trackerUrl').value = currentUrl;
|
||||||
$('trackerUrl').value = decodedUrl;
|
|
||||||
$('trackerUrl').focus();
|
$('trackerUrl').focus();
|
||||||
|
|
||||||
$('editTrackerButton').addEvent('click', function(e) {
|
$('editTrackerButton').addEvent('click', function(e) {
|
||||||
|
@ -45,7 +44,7 @@
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
hash: hash,
|
hash: hash,
|
||||||
origUrl: decodedUrl,
|
origUrl: currentUrl,
|
||||||
newUrl: $('trackerUrl').value
|
newUrl: $('trackerUrl').value
|
||||||
},
|
},
|
||||||
onComplete: function() {
|
onComplete: function() {
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
const name = new URI().getData('name');
|
const name = new URI().getData('name');
|
||||||
// set text field to current value
|
// set text field to current value
|
||||||
if (name)
|
if (name)
|
||||||
$('rename').value = decodeURIComponent(name);
|
$('rename').value = name;
|
||||||
|
|
||||||
$('rename').focus();
|
$('rename').focus();
|
||||||
$('renameButton').addEvent('click', function(e) {
|
$('renameButton').addEvent('click', function(e) {
|
||||||
|
|
|
@ -32,10 +32,9 @@
|
||||||
|
|
||||||
window.addEvent('domready', function() {
|
window.addEvent('domready', function() {
|
||||||
const hash = new URI().getData('hash');
|
const hash = new URI().getData('hash');
|
||||||
const path = new URI().getData('path');
|
const oldPath = new URI().getData('path');
|
||||||
const isFolder = ((new URI().getData('isFolder')) === 'true');
|
const isFolder = ((new URI().getData('isFolder')) === 'true');
|
||||||
|
|
||||||
const oldPath = decodeURIComponent(path);
|
|
||||||
const oldName = window.qBittorrent.Filesystem.fileName(oldPath);
|
const oldName = window.qBittorrent.Filesystem.fileName(oldPath);
|
||||||
$('rename').value = oldName;
|
$('rename').value = oldName;
|
||||||
$('rename').focus();
|
$('rename').focus();
|
||||||
|
|
|
@ -120,9 +120,9 @@ const initializeWindows = function() {
|
||||||
const id = 'downloadPage';
|
const id = 'downloadPage';
|
||||||
let contentUrl = 'download.html';
|
let contentUrl = 'download.html';
|
||||||
if (urls && (urls.length > 0)) {
|
if (urls && (urls.length > 0)) {
|
||||||
contentUrl += ('?urls=' + urls.map(function(url) {
|
contentUrl += ('?urls=' + encodeURIComponent(urls.map(function(url) {
|
||||||
return encodeURIComponent(url);
|
return encodeURIComponent(url);
|
||||||
}).join("|"));
|
}).join("|")));
|
||||||
}
|
}
|
||||||
|
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
const path = new URI().getData('path');
|
const path = new URI().getData('path');
|
||||||
// set text field to current value
|
// set text field to current value
|
||||||
if (path)
|
if (path)
|
||||||
$('setLocation').value = window.qBittorrent.Misc.escapeHtml(decodeURIComponent(path));
|
$('setLocation').value = window.qBittorrent.Misc.escapeHtml(path);
|
||||||
|
|
||||||
$('setLocation').focus();
|
$('setLocation').focus();
|
||||||
$('setLocationButton').addEvent('click', function(e) {
|
$('setLocationButton').addEvent('click', function(e) {
|
||||||
|
|
|
@ -697,11 +697,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeItem = (paths) => {
|
const removeItem = (paths) => {
|
||||||
|
const encodedPaths = paths.map((path) => encodeURIComponent(path));
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'confirmFeedDeletionPage',
|
id: 'confirmFeedDeletionPage',
|
||||||
title: 'QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]',
|
title: 'QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]',
|
||||||
loadMethod: 'iframe',
|
loadMethod: 'iframe',
|
||||||
contentURL: 'confirmfeeddeletion.html?paths=' + encodeURIComponent(paths.join('|')),
|
contentURL: 'confirmfeeddeletion.html?paths=' + encodeURIComponent(encodedPaths.join('|')),
|
||||||
scrollbars: false,
|
scrollbars: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
|
|
|
@ -535,11 +535,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
||||||
};
|
};
|
||||||
|
|
||||||
const removeRules = (rules) => {
|
const removeRules = (rules) => {
|
||||||
|
const encodedRules = rules.map((rule) => encodeURIComponent(rule));
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'removeRulePage',
|
id: 'removeRulePage',
|
||||||
title: 'QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]',
|
title: 'QBT_TR(Rule deletion confirmation)QBT_TR[CONTEXT=AutomatedRssDownloader]',
|
||||||
loadMethod: 'iframe',
|
loadMethod: 'iframe',
|
||||||
contentURL: 'confirmruledeletion.html?rules=' + encodeURIComponent(rules.join('|')),
|
contentURL: 'confirmruledeletion.html?rules=' + encodeURIComponent(encodedRules.join('|')),
|
||||||
scrollbars: false,
|
scrollbars: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
|
@ -549,11 +550,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also
|
||||||
};
|
};
|
||||||
|
|
||||||
const clearDownloadedEpisodes = (rules) => {
|
const clearDownloadedEpisodes = (rules) => {
|
||||||
|
const encodedRules = rules.map((rule) => encodeURIComponent(rule));
|
||||||
new MochaUI.Window({
|
new MochaUI.Window({
|
||||||
id: 'clearRulesPage',
|
id: 'clearRulesPage',
|
||||||
title: 'QBT_TR(New rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]',
|
title: 'QBT_TR(New rule name)QBT_TR[CONTEXT=AutomatedRssDownloader]',
|
||||||
loadMethod: 'iframe',
|
loadMethod: 'iframe',
|
||||||
contentURL: 'confirmruleclear.html?rules=' + encodeURIComponent(rules.join('|')),
|
contentURL: 'confirmruleclear.html?rules=' + encodeURIComponent(encodedRules.join('|')),
|
||||||
scrollbars: false,
|
scrollbars: false,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
maximizable: false,
|
maximizable: false,
|
||||||
|
|
Loading…
Reference in a new issue