mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
enhancement(feeds): change max age default value to 0 (#1313)
* refactor: update help text for RSS, TORZNAB, and NEWZNAB * refactor: change default to 0. * fix: update sqlite_migrate.go --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
parent
3b60365483
commit
e63aec1ab2
3 changed files with 61 additions and 7 deletions
|
@ -342,7 +342,7 @@ CREATE TABLE feed
|
||||||
url TEXT,
|
url TEXT,
|
||||||
interval INTEGER,
|
interval INTEGER,
|
||||||
timeout INTEGER DEFAULT 60,
|
timeout INTEGER DEFAULT 60,
|
||||||
max_age INTEGER DEFAULT 3600,
|
max_age INTEGER DEFAULT 0,
|
||||||
categories TEXT [] DEFAULT '{}' NOT NULL,
|
categories TEXT [] DEFAULT '{}' NOT NULL,
|
||||||
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
||||||
api_key TEXT,
|
api_key TEXT,
|
||||||
|
@ -831,5 +831,8 @@ ALTER TABLE filter_external
|
||||||
`,
|
`,
|
||||||
`ALTER TABLE irc_network
|
`ALTER TABLE irc_network
|
||||||
ADD COLUMN bot_mode BOOLEAN DEFAULT FALSE;
|
ADD COLUMN bot_mode BOOLEAN DEFAULT FALSE;
|
||||||
|
`,
|
||||||
|
`ALTER TABLE feed
|
||||||
|
ALTER COLUMN max_age SET DEFAULT 0;
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,7 +335,7 @@ CREATE TABLE feed
|
||||||
url TEXT,
|
url TEXT,
|
||||||
interval INTEGER,
|
interval INTEGER,
|
||||||
timeout INTEGER DEFAULT 60,
|
timeout INTEGER DEFAULT 60,
|
||||||
max_age INTEGER DEFAULT 3600,
|
max_age INTEGER DEFAULT 0,
|
||||||
categories TEXT [] DEFAULT '{}' NOT NULL,
|
categories TEXT [] DEFAULT '{}' NOT NULL,
|
||||||
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
||||||
api_key TEXT,
|
api_key TEXT,
|
||||||
|
@ -1424,5 +1424,56 @@ ALTER TABLE filter_external_dg_tmp
|
||||||
`,
|
`,
|
||||||
`ALTER TABLE irc_network
|
`ALTER TABLE irc_network
|
||||||
ADD COLUMN bot_mode BOOLEAN DEFAULT FALSE;
|
ADD COLUMN bot_mode BOOLEAN DEFAULT FALSE;
|
||||||
|
`,
|
||||||
|
`CREATE TABLE feed_dg_tmp
|
||||||
|
(
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
indexer TEXT,
|
||||||
|
name TEXT,
|
||||||
|
type TEXT,
|
||||||
|
enabled BOOLEAN,
|
||||||
|
url TEXT,
|
||||||
|
interval INTEGER,
|
||||||
|
capabilities TEXT DEFAULT '{}' NOT NULL,
|
||||||
|
api_key TEXT,
|
||||||
|
settings TEXT,
|
||||||
|
indexer_id INTEGER
|
||||||
|
REFERENCES indexer
|
||||||
|
ON DELETE CASCADE,
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
timeout INTEGER DEFAULT 60,
|
||||||
|
max_age INTEGER DEFAULT 0,
|
||||||
|
last_run TIMESTAMP,
|
||||||
|
last_run_data TEXT,
|
||||||
|
cookie TEXT
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO feed_dg_tmp(id, indexer, name, type, enabled, url, interval, capabilities, api_key, settings, indexer_id,
|
||||||
|
created_at, updated_at, timeout, max_age, last_run, last_run_data, cookie)
|
||||||
|
SELECT id,
|
||||||
|
indexer,
|
||||||
|
name,
|
||||||
|
type,
|
||||||
|
enabled,
|
||||||
|
url,
|
||||||
|
interval,
|
||||||
|
capabilities,
|
||||||
|
api_key,
|
||||||
|
settings,
|
||||||
|
indexer_id,
|
||||||
|
created_at,
|
||||||
|
updated_at,
|
||||||
|
timeout,
|
||||||
|
max_age,
|
||||||
|
last_run,
|
||||||
|
last_run_data,
|
||||||
|
cookie
|
||||||
|
FROM feed;
|
||||||
|
|
||||||
|
DROP TABLE feed;
|
||||||
|
|
||||||
|
ALTER TABLE feed_dg_tmp
|
||||||
|
RENAME TO feed;
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ function FormFieldsTorznab() {
|
||||||
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
||||||
|
|
||||||
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
||||||
<NumberFieldWide name="max_age" label="Max age" help="Seconds. Will not grab older than this value."/>
|
<NumberFieldWide name="max_age" label="Max age" help="Enter the maximum age of feed content in seconds. It is recommended to set this to '0' to disable the age filter, ensuring all items in the feed are processed."/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ function FormFieldsNewznab() {
|
||||||
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
||||||
|
|
||||||
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
||||||
<NumberFieldWide name="max_age" label="Max age" help="Seconds. Will not grab older than this value."/>
|
<NumberFieldWide name="max_age" label="Max age" help="Enter the maximum age of feed content in seconds. It is recommended to set this to '0' to disable the age filter, ensuring all items in the feed are processed."/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -245,7 +245,7 @@ function FormFieldsRSS() {
|
||||||
{interval < 15 && <WarningLabel />}
|
{interval < 15 && <WarningLabel />}
|
||||||
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
<NumberFieldWide name="interval" label="Refresh interval" help="Minutes. Recommended 15-30. Too low and risk ban."/>
|
||||||
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
<NumberFieldWide name="timeout" label="Refresh timeout" help="Seconds to wait before cancelling refresh."/>
|
||||||
<NumberFieldWide name="max_age" label="Max age" help="Seconds. Will not grab older than this value."/>
|
<NumberFieldWide name="max_age" label="Max age" help="Enter the maximum age of feed content in seconds. It is recommended to set this to '0' to disable the age filter, ensuring all items in the feed are processed."/>
|
||||||
|
|
||||||
<PasswordFieldWide name="cookie" label="Cookie" help="Not commonly used" />
|
<PasswordFieldWide name="cookie" label="Cookie" help="Not commonly used" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue