Commit graph

18 commits

Author SHA1 Message Date
Parker Moore
759948361f
[BACKEND] get_file_md5_hash: read small blocks instead of the entire file (#1052)
This prevents MemoryError when running on systems with less memory than the file being processed.

Fixes #1051. Thanks @parkr
2024-09-17 20:24:33 -07:00
Jesse Bannon
30a2ad7a63
[BUGFIX] Prevent corrupt writes to download archive (#983)
Attempts to make writes to the download archive safer (https://github.com/jmbannon/ytdl-sub/issues/982).

`ytdl-sub` will now *copy* the download archive from the working directory to the output directory with a temp name, then perform a *move* to store it with its final expected name. This will drastically lower the window of time where  the process could die mid-write and corrupt it on the next read.
2024-06-02 10:53:19 -07:00
Jesse Bannon
731d4e444c
[DOCS] Tooling to auto-generate custom sphinx docs (#849)
Tooling + updating docs
2023-12-28 22:39:59 -08:00
Jesse Bannon
7385aac1ee
[FEATURE][EXPERIMENTAL] --update-with-info-json (#557)
* [FEATURE
] Reformat existing downloads

* working?!?!

* reformat in output dir

* close, need info json enabled by default

* asdfadsfsaf

* lint

* closer

* multi created variables do not exist for update command!

* info json downloader

* [REFACTOR] Shared plugin and download options class

* more refactoring

* lint

* put in initialize plugins

* changes

* [REFACTOR] simplify enhanced download archive

* working!

* in main

* simplified, many url tests working

* ready?
2023-03-21 08:05:08 -07:00
Jesse Bannon
91e9fe7602
[FEATURE] Add summary to console output (#515) 2023-03-08 15:34:58 -08:00
Jesse Bannon
798bbbc62c
[BACKEND] Windows support (#476) 2023-02-28 17:07:03 -08:00
Joshua M. Boniface
69df95e0e9
[BACKEND] Always perform copy/delete on OSError (#446)
* Always perform copy/delete on OSError

Extends the fix in #400 to handle all potential OSError errno values and
attempt a copy/delete in all cases. For example, a combination
cross-device move and a permissions change would throw errno 1 instead
of errno 18, which wasn't caught here. Instead of messing with
individual errno numbers, just always attempt a copy/delete and let
those throw their own exceptions if they don't work either.

* Remove unused os_error_exc variable
2023-02-19 21:06:48 -08:00
Jesse Bannon
c3d9d45c18
[BUGFIX] Invalid cross-device link workaround (#400) 2023-01-04 15:34:26 -08:00
Jesse Bannon
96e741c71d
[BACKEND] Proactively clean working directory (#379)
* fix playlist last thumbnail move to copy

* playlist working

* channel working

* working directory getting cleaned

* working dir e2e fixture

* cleanup files in any case

* clean up if pre-split returns None
2022-11-30 10:36:13 -08:00
Jesse Bannon
897ea52e33
[BACKEND] Separate directory files in transaction log (#260) 2022-09-30 13:59:43 -07:00
Jesse Bannon
839192059b
[FEATURE] Add playlist thumbnail support (#250) 2022-09-27 23:48:18 -07:00
Jesse Bannon
2c86d640a4
[FEATURE] Have notion of modified files. Do not include files that have not changed (#225) 2022-09-08 12:24:46 -07:00
Jesse Bannon
819bddc9d0
[FEATURE] Support duplicate NFO keys (#220) 2022-09-07 14:06:13 -07:00
Jesse Bannon
3e60f7d1da
[BACKEND] Do not write download archive file if no files changed (#161)
* [BACKEND] Do not write download archive file if no files changed

* ensure empty log for playlists

* test dl args

* test main completely
2022-08-07 15:02:02 -07:00
Jesse Bannon
23fce80db1
[BUG] Fix chapter metadata ordering (#131) 2022-07-30 21:59:02 -07:00
Jesse Bannon
f66596d1a7
[BACKEND] Move files from working to output directory instead of copying (#104)
* [BACKEND] Move files from working to output directory instead of copying

* still copy split video thumbnails
2022-07-17 22:43:49 -07:00
Jesse Bannon
a0b46c0982
Add --dry-run summary (#92)
* tests updated with new class

* fix nfo tags, no tests only manual inspection

* txt

* dry-run output tested

* readability

* all tests now have files except rolling recent

* better

* almost fixed

* updated txt files w/indents

* files updated, looking good

* rolling recent dry-run test

* Print in main
2022-07-05 22:51:23 -07:00
Jesse Bannon
9df40497e2
Add --dry-run argument logic (#82)
* dry-run huge refactor

* small fixes, all tests passing

* file handler, transaction log, metadata

* dry-run actually dry running

* working tests, still have more

* Everything passing besides channel

* fix youtube channel thumbnail issue, need to fix fixtures on test

* lint 10, channel tests passing. Need dry-run for split and merge video

* all tests passing, lint 10, should test dry-run arg
2022-07-02 11:24:46 -07:00