mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Config versions count only the columns each config saves
A Repo's fetch (head_sha, last_fetch), a Channel's refresh (video_count, info_json), a Collection's counts, and a Download attempt (attempts, error) counted as config changes, so the next import of that config saved instead of importing: a hand edit to repos.yaml was overwritten after any fetch. Each model now registers only the columns its config saves. domains.yaml saves its domains' Downloads, which now count for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
74e9ca7799
commit
d303cab06c
5 changed files with 77 additions and 9 deletions
|
|
@ -1562,7 +1562,9 @@ class ReposConfig(ConfigFile):
|
|||
|
||||
|
||||
repos_config = ReposConfig()
|
||||
register_ownership(ReposConfig.file_name, Repository)
|
||||
# Only the columns repos.yaml saves (not a fetch's commit, size, ...); its Collection saves the rest.
|
||||
register_ownership(ReposConfig.file_name, Repository,
|
||||
columns={'url', 'mode', 'branch', 'submodules', 'clone_token', 'collection_id'})
|
||||
|
||||
|
||||
def get_repos_config() -> ReposConfig:
|
||||
|
|
|
|||
|
|
@ -530,7 +530,10 @@ class ChannelsConfig(ConfigFile):
|
|||
|
||||
|
||||
CHANNELS_CONFIG: ChannelsConfig = ChannelsConfig()
|
||||
register_ownership(ChannelsConfig.file_name, Channel)
|
||||
# Only the columns channels.yaml saves (not a refresh's counts, info_json, ...); its Collection saves the rest.
|
||||
register_ownership(ChannelsConfig.file_name, Channel,
|
||||
columns={'url', 'source_id', 'generate_posters', 'calculate_duration', 'download_missing_data',
|
||||
'collection_id'})
|
||||
TEST_CHANNELS_CONFIG: ChannelsConfig = None
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue