Since e627c723, attachments can be extracted by filename in
one ffmpeg command. This makes the auto-filename codepath redundant.
Letting ffmpeg extract all attachments is broken in ffmpeg upstream.
This was worked around in jellyfin/jellyfin-ffmpeg#720 but affects
distributions that do not use jellyfin-ffmpeg.
Since there is no good reason to keep this codepath, just delete it.
This obsoletes the above ffmpeg patch and should be more robust in
the future, since Jellyfin no longer depends on guessing exactly
what behavior ffmpeg has when constructing, allowing, or denying
attachment filenames.
* Cleanup extracted files
* Pagination and fixes
* Add migration for attachments to MigrateLibraryDb
* Unify attachment handling
* Don't extract again if files were already extracted
* Fix MKS attachment extraction
* Always run full extraction on mks
* Don't try to extract mjpeg streams as attachments
* Fallback to check if attachments were extracted to cache folder
* Fixup
Check attachment path for null before use
Original-merge: 122da8f447
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Extract media attachment one by one if the filename appears to be a path
Original-merge: 45e8872cc0
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Similar to https://github.com/jellyfin/jellyfin/pull/10884
---
Jellyfin clients need fonts for subtitles, and each font is a separate
attachment, which causes a lot of re-reads of the file. Certain contents,
like anime in a lot of cases, contain 50-80 different attachments.
Spawning 80 ffmpeg processes at the same time on the same file might
cause swapping on slower HDDs and can bring disk subsystem to a crawl.
(For more info, see https://github.com/jellyfin/jellyfin/3215)
This change helps a lot in this scenario.
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Escape the path to pass as a command line argument
Original-merge: 09f1c7f535
Merged-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
Backported-by: crobibero <cody@robibe.ro>
Did a simple search/replace on the whole repo (except the RSSDP project)
This reduces LOC and should improve performance (methods containing a throw statement don't get inlined)
```
if \((\w+) == null\)
\s+\{
\s+throw new ArgumentNullException\((.*)\);
\s+\}
```
```
ArgumentNullException.ThrowIfNull($1);
```