Commit Graph

14 Commits

Author SHA1 Message Date
SmallCoccinelle
8b7720e3bf Enable the appendAssign lint check (#1865)
* Make copies of buffers

Avoid reusing one of the incoming arrays as a append extension, and
make a copy of the data. It's cleaner in the long run and possibly
easier for the GC to maintain.

* Avoid appendAssign problems in tag code

Reuse the existing slice when appending.

* Fix appendAssign in encoder_scene_preview_chunk

Appending and creating a new slice is somewhat unintuitive since the
underlying slice might be extended to satisfy the new capacity. This
sometimes leads to faulty logic.

Rewrite the code so it reuses `args` for all appending, and builds one
array clearly in the code. It follows the general style of the function
where `args` is being built in small incremental batches and avoids
the introduction of new names.

* Enable the appendAssign check

This makes us pass all gocritic warnings.

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2021-10-20 16:34:19 +11:00
WithoutPants
39fdde273d Scan refactor (#1816)
* Add file scanner
* Scan scene changes
* Split scan files
* Generalise scan
* Refactor ffprobe
* Refactor ffmpeg encoder
* Move scene scan code to scene package
* Move matchExtension to utils
* Refactor gallery scanning
* Refactor image scanning
* Prevent race conditions on identical hashes
* Refactor image thumbnail generation
* Perform count concurrently
* Allow progress increment before total set
* Make progress updates more frequent
2021-10-15 10:39:48 +11:00
bnkai
f1786ad871 Make audio stream optional for preview generation (#1454) 2021-06-11 15:01:32 +10:00
JoeSmithStarkers
ecc42e4e24 Preview generation fallback (#725)
* Added preview generation fallback feature.
When a preview generation fails (often for wmv/avi files), the new code tries with less stricted (no xerror) and more time consuming options (slow+fast seek).
Fix a minor issue when stash downloads ffmpeg/ffprobe, but doesn't re-detect their paths.
2020-08-17 09:21:58 +10:00
WithoutPants
a2341f0819 Allow customisation of preview generation (#673)
* Add generate-specific options
* Include no-cache in preview response
2020-07-23 12:51:35 +10:00
InfiniteTF
4ec6d62e01 Selectable wall preview type (#510)
* Add optional image preview generation
* Add setting for video preview encoding preset
2020-05-27 09:33:49 +10:00
WithoutPants
41c6d9e681 Revert preview generation change 2020-05-13 17:23:23 +10:00
bnkai
4829b4b214 Fix edge case preview generation, tweak preview generation preset (#528) 2020-05-11 17:24:52 +10:00
bnkai
3f511e48e8 Fix previews generation bug (#231) 2019-11-30 08:58:15 -08:00
WithoutPants
be12a9f5a1 Fix ffmpeg error output (#176) 2019-11-04 16:34:57 -05:00
rudi123github
b8f1cf9d53 Update encoder_scene_preview_chunk.go
Apply ffmeg max_uxing_queue_size option fix to avoid problems with some videos
2019-06-21 23:03:00 +02:00
Stash Dev
182afad695 Added -pix_fmt yuv420p to H264 encodes 2019-03-29 08:23:21 -07:00
Stash Dev
2e57c2a17a Fixes
Various fixes from Discord discussions.
2019-03-27 12:26:50 -07:00
Stash Dev
b488c1ed7d Reorg 2019-02-14 15:42:52 -08:00