mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +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,
|
||||
interval INTEGER,
|
||||
timeout INTEGER DEFAULT 60,
|
||||
max_age INTEGER DEFAULT 3600,
|
||||
max_age INTEGER DEFAULT 0,
|
||||
categories TEXT [] DEFAULT '{}' NOT NULL,
|
||||
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
||||
api_key TEXT,
|
||||
|
@ -831,5 +831,8 @@ ALTER TABLE filter_external
|
|||
`,
|
||||
`ALTER TABLE irc_network
|
||||
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,
|
||||
interval INTEGER,
|
||||
timeout INTEGER DEFAULT 60,
|
||||
max_age INTEGER DEFAULT 3600,
|
||||
max_age INTEGER DEFAULT 0,
|
||||
categories TEXT [] DEFAULT '{}' NOT NULL,
|
||||
capabilities TEXT [] DEFAULT '{}' NOT NULL,
|
||||
api_key TEXT,
|
||||
|
@ -1422,7 +1422,58 @@ ALTER TABLE filter_external_dg_tmp
|
|||
`ALTER TABLE filter_external
|
||||
DROP COLUMN webhook_retry_max_jitter_seconds;
|
||||
`,
|
||||
`ALTER TABLE irc_network
|
||||
`ALTER TABLE irc_network
|
||||
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="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>
|
||||
);
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ function FormFieldsNewznab() {
|
|||
<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="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>
|
||||
);
|
||||
}
|
||||
|
@ -245,7 +245,7 @@ function FormFieldsRSS() {
|
|||
{interval < 15 && <WarningLabel />}
|
||||
<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="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" />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue