Commit Graph

3915 Commits

Author SHA1 Message Date
tcely
2dd4b88aed fix: provide an example to enable the setting 2026-08-27 11:41:50 -04:00
Agi-Asi
be4313ba1f review: optionally queue save_media tasks after bulk actions
Adds SAVE_MEDIA_AFTER_BULK_ACTION (env:
TUBESYNC_SAVE_MEDIA_AFTER_BULK_ACTION, default False). When enabled,
each admin bulk action queues a save_media task per changed item so
flags are re-evaluated without waiting for the next source edit or
indexing run. When disabled (the default) behaviour is unchanged:
re-evaluation happens on the next source edit/index pass.

Requested by tcely in review.
2026-08-27 14:56:58 +00:00
Agi-Asi
81eec0da04 Add bulk admin actions for skip and can_download on Media
Managing large libraries through the Django admin required editing
every media item individually to toggle 'skip' or 'can download'
(#493). Add the standard admin bulk actions for exactly the two
fields requested there:

- Set / unset 'skip' — also sets manual_skip to match, so a bulk
  un-skip is not immediately re-skipped by the filtering logic, and a
  bulk skip is treated as the operator's explicit decision
- Set / unset 'can download'

Also adds list_filter for can_download/skip/downloaded so the items
to bulk-edit can actually be narrowed down first.

Uses queryset.update() so a bulk action on thousands of rows is a
single UPDATE, not thousands of model saves.

Tests cover both action pairs and the action registration.

Fixes #493
2026-08-27 09:37:41 +00:00
tcely
2249c38f81 chore: include the latest wiki changes 2026-08-27 01:26:38 -04:00
tcely
c48284f125 Merge pull request #1568 from meeb/tcely-retry-save
feat: retry saves when the database is locked
2026-08-27 01:14:20 -04:00
tcely
820b3e2a59 fix(lint): address UP025 & UP032; ignore SIM117 2026-08-26 16:26:23 -04:00
tcely
ea3293f11c fix: retry save and update for tasks 2026-08-26 16:08:21 -04:00
tcely
83906dde1b chore: tweak comments 2026-08-26 11:25:54 -04:00
tcely
f50f9b906b fix: retry TaskHistory.objects.get_or_create 2026-08-26 11:25:51 -04:00
tcely
6608c975b5 feat: retry TaskHistory.save 2026-08-26 11:25:48 -04:00
tcely
b70e184a8a feat: implement retry_django_db decorator 2026-08-26 11:25:46 -04:00
tcely
b02246e242 fix: remove a buggy version of hat-juggler 2026-08-26 03:46:39 -04:00
tcely
cd4e4588ab Merge pull request #1565 from ryanduguid/source-images-from-index
feat: use indexing response to save channel images
2026-08-26 03:03:59 -04:00
tcely
2e02ef43e0 chore: adjust CancelExecution import 2026-08-26 02:41:41 -04:00
tcely
1c9efc5132 fix: use default_site as the default for site 2026-08-26 00:22:09 -04:00
tcely
e438525f0e fix(lint): address RUF012; ignore BLE001,SIM102,TRY002,TRY004 2026-08-25 23:50:07 -04:00
Ryan Duguid
1de9efea3b Use metadata site default on creation 2026-08-25 23:50:03 -04:00
Ryan Duguid
08e227eb18 Address source image re-review feedback 2026-08-25 23:49:44 -04:00
tcely
b3de907827 fix(lint): address SIM210 & SIM211; ignore PIE790 & SIM118 2026-08-25 13:41:40 -04:00
Ryan Duguid
5f08e5a4f7 Address source image review feedback 2026-08-25 22:53:12 +10:00
Cursor Agent
dc319ca8a3 Store source index metadata by index URL
Match the reviewer design: persist the index response on Metadata keyed
by the videos/streams URL, look those rows up in download_source_images,
and retry with CancelExecution until that data exists. Keep merging
valid stored values so incomplete later responses do not wipe images.

Co-authored-by: Ryan Duguid <ryan@duguid.com.au>
2026-08-25 07:18:31 +00:00
Cursor Agent
734befad5e Preserve partial source image metadata
Co-authored-by: Ryan Duguid <ryan@duguid.com.au>
2026-08-25 06:43:51 +00:00
Cursor Agent
362dce65e7 Address source image review feedback
Co-authored-by: Ryan Duguid <ryan@duguid.com.au>
2026-08-25 06:27:20 +00:00
tcely
6ef3697698 Merge pull request #1566 from vaibhav8a/fix-typo-preferred
docs: fix typo prefered -> preferred
2026-08-25 01:23:09 -04:00
Vaibhav Srivastava
5c4b7d22f6 docs: fix typo prefered -> preferred 2026-08-25 09:52:18 +05:30
Ryan Duguid
edfb0b8202 Index channel image URLs instead of extracting them twice
Implements #1550.

index_media's response already carries the channel avatar/banner/
thumbnail URLs, but they were discarded, forcing download_source_images
to run its own separate yt-dlp extraction just for images.

- Source gains avatar_image_url, banner_image_url and
  thumbnail_image_url columns plus save_indexed_image_urls(), which
  picks the same URLs get_image_info would have picked (avatar_uncropped,
  banner_uncropped, tallest remaining thumbnail).
- get_index() persists the URLs from each index response.
- download_source_images() uses the stored URLs when present and only
  falls back to a live extraction when none are stored yet.
2026-08-24 16:38:04 +10:00
tcely
8d949e50b7 Merge pull request #1561 from meeb/tcely-source-images
fix: do less work for source images
2026-08-23 12:31:55 -04:00
tcely
bf7dd4ba29 chore: remove assignment 2026-08-23 12:22:20 -04:00
tcely
a53aa63ebe Merge branch 'main' into tcely-source-images 2026-08-23 12:20:12 -04:00
tcely
41a72e03a6 Merge pull request #1560 from meeb/tcely-metadata
chore: clean up and assign metadata
2026-08-23 12:17:56 -04:00
tcely
6ce2cdd675 Merge pull request #1564 from meeb/tcely-bgutil-1.3.2
chore: upgrade `bgutil-ytdlp-pot-provider` to `1.3.2`
2026-08-23 12:10:02 -04:00
tcely
f761cab5f4 fix: use git to add a specific commit to the layer 2026-08-23 11:50:12 -04:00
tcely
60c0f51db6 chore: upgrade bgutil-ytdlp-pot-provider to 1.3.2 2026-08-23 11:21:00 -04:00
tcely
c2220c8853 fix: do less work for source images 2026-08-23 10:02:21 -04:00
tcely
ae078b5290 chore: clean up and assign metadata 2026-08-23 07:30:09 -04:00
tcely
bec410617a Merge pull request #1559 from meeb/tcely-shasum-unbuffered
fix(shasum): version 1.1.5
2026-08-22 12:56:33 -04:00
tcely
fbb4fb0a2e fix(shasum): version 1.1.5
- use unbuffered reads into a memory view
- cast the memory view for faster operations
- process buffered files first
- switch the file_buffer_pool to `queue.SimpleQueue`
- reduce the number of tasks sent to `ThreadPoolExecutor`
- translate Windows path separators
2026-08-20 19:08:07 -04:00
tcely
3b9d72f28d Merge pull request #1555 from meeb/tcely-issue-1554-compact-exts
feat: condensed storage for subtitles and automatic captions
2026-08-20 12:51:24 -04:00
tcely
0b1311a6f4 Merge pull request #1558 from meeb/tcely-shasum-updates
fix(shasum): version 1.1.4
2026-08-20 08:32:25 -04:00
tcely
b699e5c20c Merge pull request #1548 from meeb/tcely-backoff-with-base_class
feat(huey): flexible backoff algorithms
2026-08-20 08:14:27 -04:00
tcely
4e750ddc6a fix(shasum): use dual-buffer strategy for large files 2026-08-20 06:40:38 -04:00
tcely
bb4fc88d75 fix(shasum): update test for the adjusted quoting style 2026-08-20 03:05:16 -04:00
tcely
036cc5d5cc fix(shasum): version 1.1.4
- argument safety
- remove IOError alias
- style adjustment for quoting
2026-08-20 02:58:33 -04:00
tcely
eecc790f10 Add per-file target version for shasum.py 2026-08-20 01:16:04 -04:00
tcely
e111286c44 chore(lint): address PLR1730 2026-08-20 00:48:59 -04:00
tcely
4fd3caad85 chore(lint): address PIE790; ignore BLE001 2026-08-20 00:41:06 -04:00
tcely
ec7a386285 chore(lint): disable SIM118 2026-08-18 07:35:17 -04:00
tcely
ae06b826a5 chore(lint): address PLR1730 2026-08-18 07:35:01 -04:00
tcely
aa9b243519 chore(lint): address FURB188 2026-08-18 07:34:39 -04:00
tcely
13b6433689 feat: condensed storage for subtitles and automatic captions 2026-08-18 07:32:27 -04:00