constantprojects 16eb35f095 Fix seeding field overwrite bug and hardcode NocoDB field names
NocoDB returns records keyed by field titles, but the code was looking
up values by field IDs, always getting None. This caused every update
to overwrite existing seeders instead of appending.

Hardcode "Id" and "Seeding Users" field names as class constants and
remove the --id-field and --seeding-field CLI args.
2026-02-17 15:21:57 -07:00
2026-02-17 13:52:28 -07:00
2026-02-17 13:52:28 -07:00

Seed Tracker

Matches {id}.torrent files against your qBittorrent session and updates NocoDB with your username.

Requirements

  • Python 3.10+
  • No external dependencies

Usage

API Mode (updates NocoDB directly)

python seed_tracker.py \
  --id-folder ./torrents \
  --bt-backup ~/.local/share/qBittorrent/BT_backup \
  --nocodb-url https://noco.example.com \
  --table-id tblXXXXX \
  --api-token xc-xxxx \
  --id-field cXXXXX \
  --seeding-field cYYYYY

CSV Mode (outputs file for manual import)

python seed_tracker.py \
  --id-folder ./torrents \
  --bt-backup ~/.local/share/qBittorrent/BT_backup \
  --csv-only

Flags

Flag Required Description
--id-folder Yes Folder containing {id}.torrent files
--bt-backup Yes qBittorrent's BT_backup folder
--nocodb-url API mode NocoDB base URL
--table-id API mode Table ID (starts with tbl)
--api-token API mode API token (xc-token)
--id-field API mode Field ID for Id column (starts with c)
--seeding-field API mode Field ID for seeding_users column (starts with c)
--csv-only No Skip API, output CSV instead
--output No CSV output path (default: seeding_update.csv)
--debug No Print API request/response details

Finding NocoDB IDs

  • Table ID: Click ... next to table name → Copy Table ID
  • Field IDs: Click field header dropdown → Copy Field ID

CSV Uploader

Uploads CSV files generated by others (via --csv-only) to NocoDB.

Usage

python csv_uploader.py \
  --csv seeds.csv \
  --nocodb-url https://noco.example.com \
  --table-id tblXXXXX \
  --api-token xc-xxxx \
  --id-field cXXXXX \
  --seeding-field cYYYYY

Flags

Flag Required Description
--csv Yes CSV file to upload
--nocodb-url Yes NocoDB base URL
--table-id Yes Table ID
--api-token Yes API token
--id-field Yes Field ID for Id column
--seeding-field Yes Field ID for seeding_users column
Description
Catalogs the torrents you're currently seeding.
Readme 66 KiB
Languages
Python 100%