tubesync
tubesync copied to clipboard
Improve media deletion efficiency
Since #38 media is indexed by ID, then metadata is scanned later. This can be inefficient in situations where the media is deleted (with the Source.delete_old_media flag) which then may get re-indexed again but marked to be skipped.
tasks.cleanup_old_media() and media deletion via Media.delete() signals in general should be reworked so that the media database entry is not deleted, but the media file is deleted and the media marked to be skipped.
This will improve indexing support for large channels.