mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
* playlists.yaml imports by diffing playlists.yaml declares two sections: playlists, keyed by name, and their items, keyed by what each points to (a file's or Zim's media-relative path and entry, or a URL) with position and title compared. A playlist has at most one item per reference, so a moved item changes only its position and keeps its row; an unchanged import writes nothing (every import deleted and re-created every item). prepare skips items whose file or Zim is not indexed before the write (their place is kept), drops a Tag that no longer exists once tags.yaml is imported (the config is then saved), and, without deletes, keeps the database's order and adds the file's other items after the item that precedes them. Moving a FileGroup in a playlist counts as a playlists.yaml change (ORM, the bulk move, and a refresh that changes the primary file). media_relative moves to wrolpi.config_import for both configs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Playlist items: keep database order without deletes; empty lists delete Without a database version, every playlist with an added or changed item keeps the database's order (the file's new items go after their predecessor; only titles come from the file), and a row whose merged position and title equal the database's is not written. Before, only playlists that gained an item were merged, so a file that only reordered (or lacked an item the database had) gave two items one position. A section can say it is present without rows (`ConfigSection.present`): a listed playlist with an empty items list has its items removed; an empty or missing playlists list still removes nothing. An item that cannot be read, or repeats another, is counted in import_skipped, so the config is not saved over it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| blobs | ||
| collections | ||
| files | ||
| scripts | ||
| static/extensions | ||
| test | ||
| __init__.py | ||
| api_utils.py | ||
| bookmarks.py | ||
| bookmarks_api.py | ||
| captions.py | ||
| cmd.py | ||
| common.py | ||
| config_api.py | ||
| config_import.py | ||
| config_schema.py | ||
| config_version.py | ||
| conftest.py | ||
| contexts.py | ||
| dates.py | ||
| db.py | ||
| db_bootstrap.py | ||
| db_query.py | ||
| downloader.py | ||
| errors.py | ||
| events.py | ||
| flags.py | ||
| fts.py | ||
| jobs.py | ||
| lang.py | ||
| log_levels.py | ||
| logging_extra.py | ||
| media_path.py | ||
| perpetual.py | ||
| roland@learningselfreliance.com.gpg | ||
| root_api.py | ||
| schema.py | ||
| schema_ddl.py | ||
| scrape_downloader.py | ||
| speedtest.py | ||
| switches.py | ||
| tags.py | ||
| test_media_path.py | ||
| upgrade.py | ||
| vars.py | ||
| version.py | ||
| version.txt | ||