Skip to content

Add queue-based incremental STRM refresh#2

Merged
hrd201 merged 3 commits into
mainfrom
incremental-strm-refresh
Jul 11, 2026
Merged

Add queue-based incremental STRM refresh#2
hrd201 merged 3 commits into
mainfrom
incremental-strm-refresh

Conversation

@hrd201

@hrd201 hrd201 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add a queue-based incremental STRM refresher that keeps a local SQLite index and refreshes only candidate AList directories.
  • Add missing .strm regeneration when Emby deletes a local STRM file but the remote media still exists.
  • Add generic example config, task wrapper, detailed docs, and README/README.zh-CN/CHANGELOG updates.
  • Ignore real incremental refresh configs and SQLite state files to avoid committing AList tokens or runtime state.

Privacy

  • The committed config uses generic placeholders only (YOUR_ALIST_HOST, YOUR_ALIST_TOKEN, /mnt/cloud/...).
  • No server hostname, IP address, AList token, or real media directory from the test deployment is included in the added files.

Validation

  • python3 -m py_compile scripts/incremental_strm_refresh.py
  • bash -n scripts/task_incremental_refresh.sh
  • Loaded config/incremental-strm.json.example and verified path mapping to {media_path} output.
  • Searched the worktree for deployment-specific host/IP/token markers before commit.

Supersedes #1 because that PR used a branch name with the codex/ prefix.

hrd201 commented Jul 5, 2026

Copy link
Copy Markdown
Owner Author

Follow-up fix pushed in e822e19.

What changed:

  • The incremental refresher now continues consuming newly queued child directories within the same max_dirs_per_run budget.
  • Child directories are queued whenever a refreshed directory contains them, not only when they are first seen.
  • The script no longer immediately requeues the directory currently being scanned after generating a .strm, avoiding duplicate same-run requests.

Server validation:

  • Deployed the updated script to /opt/xstrm-suite/scripts/incremental_strm_refresh.py.
  • Tested with parent directory /mnt/115/剧集/凡人修仙传 (2020) using a temporary output directory and temporary SQLite state.
  • The run reached Season 2 from the parent directory and generated the expected temporary .strm for episode 181.
  • incremental-strm-refresh.timer remains active and will use the updated script on the next scheduled run.

@hrd201 hrd201 merged commit 8d4b450 into main Jul 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant