mirror of
https://github.com/simon987/sist2.git
synced 2025-04-21 03:06:47 +00:00
Compare commits
2 Commits
ce1e241dea
...
50771bd1dc
Author | SHA1 | Date | |
---|---|---|---|
50771bd1dc | |||
bc884e137c |
@ -46,6 +46,7 @@ Scan options
|
|||||||
--fast Only index file names & mime type
|
--fast Only index file names & mime type
|
||||||
--treemap-threshold=<str> Relative size threshold for treemap (see USAGE.md). DEFAULT: 0.0005
|
--treemap-threshold=<str> Relative size threshold for treemap (see USAGE.md). DEFAULT: 0.0005
|
||||||
--mem-buffer=<int> Maximum memory buffer size per thread in MB for files inside archives (see USAGE.md). DEFAULT: 2000
|
--mem-buffer=<int> Maximum memory buffer size per thread in MB for files inside archives (see USAGE.md). DEFAULT: 2000
|
||||||
|
--read-subtitles Read subtitles from media files
|
||||||
|
|
||||||
Index options
|
Index options
|
||||||
-t, --threads=<int> Number of threads. DEFAULT=1
|
-t, --threads=<int> Number of threads. DEFAULT=1
|
||||||
@ -91,7 +92,7 @@ Made by simon987 <me@simon987.net>. Released under GPL-3.0
|
|||||||
Specify an existing index. Information about files in this index that were not modified (based on *mtime* attribute)
|
Specify an existing index. Information about files in this index that were not modified (based on *mtime* attribute)
|
||||||
will be copied to the new index and will not be parsed again.
|
will be copied to the new index and will not be parsed again.
|
||||||
* `-o, --output` Output directory.
|
* `-o, --output` Output directory.
|
||||||
* `--rewrite-url` Set the `rewrite_url` option for the web module (See [rewrite_url](#rewrite_url))
|
* `--rewrite-url` Set the `rewrite_url` option for the web module (See [rewrite_url](#rewrite_url))
|
||||||
* `--name` Set the `name` option for the web module
|
* `--name` Set the `name` option for the web module
|
||||||
* `--depth` Maximum scan dept. Set to 0 only scan files directly in the root directory, set to -1 for infinite depth
|
* `--depth` Maximum scan dept. Set to 0 only scan files directly in the root directory, set to -1 for infinite depth
|
||||||
* `--archive` Archive file mode.
|
* `--archive` Archive file mode.
|
||||||
@ -123,6 +124,7 @@ Made by simon987 <me@simon987.net>. Released under GPL-3.0
|
|||||||
larger than this number will be read sequentially and no *seek* operations will be supported.
|
larger than this number will be read sequentially and no *seek* operations will be supported.
|
||||||
|
|
||||||
To check if a media file can be parsed without *seek*, execute `cat file.mp4 | ffprobe -`
|
To check if a media file can be parsed without *seek*, execute `cat file.mp4 | ffprobe -`
|
||||||
|
* `--read-subtitles` When enabled, will attempt to read the subtitles stream from media files.
|
||||||
|
|
||||||
### Scan examples
|
### Scan examples
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ typedef struct scan_args {
|
|||||||
const char* treemap_threshold_str;
|
const char* treemap_threshold_str;
|
||||||
double treemap_threshold;
|
double treemap_threshold;
|
||||||
int max_memory_buffer;
|
int max_memory_buffer;
|
||||||
|
int read_subtitles;
|
||||||
} scan_args_t;
|
} scan_args_t;
|
||||||
|
|
||||||
scan_args_t *scan_args_create();
|
scan_args_t *scan_args_create();
|
||||||
|
@ -132,6 +132,7 @@ void initialize_scan_context(scan_args_t *args) {
|
|||||||
ScanCtx.media_ctx.logf = _logf;
|
ScanCtx.media_ctx.logf = _logf;
|
||||||
ScanCtx.media_ctx.store = _store;
|
ScanCtx.media_ctx.store = _store;
|
||||||
ScanCtx.media_ctx.max_media_buffer = (long) args->max_memory_buffer * 1024 * 1024;
|
ScanCtx.media_ctx.max_media_buffer = (long) args->max_memory_buffer * 1024 * 1024;
|
||||||
|
ScanCtx.media_ctx.read_subtitles = args->read_subtitles;
|
||||||
init_media();
|
init_media();
|
||||||
|
|
||||||
// OOXML
|
// OOXML
|
||||||
@ -448,6 +449,7 @@ int main(int argc, const char *argv[]) {
|
|||||||
OPT_INTEGER(0, "mem-buffer", &scan_args->max_memory_buffer,
|
OPT_INTEGER(0, "mem-buffer", &scan_args->max_memory_buffer,
|
||||||
"Maximum memory buffer size per thread in MB for files inside archives "
|
"Maximum memory buffer size per thread in MB for files inside archives "
|
||||||
"(see USAGE.md). DEFAULT: 2000"),
|
"(see USAGE.md). DEFAULT: 2000"),
|
||||||
|
OPT_BOOLEAN(0, "read-subtitles", &scan_args->read_subtitles, "Read subtitles from media files."),
|
||||||
|
|
||||||
OPT_GROUP("Index options"),
|
OPT_GROUP("Index options"),
|
||||||
OPT_INTEGER('t', "threads", &common_threads, "Number of threads. DEFAULT=1"),
|
OPT_INTEGER('t', "threads", &common_threads, "Number of threads. DEFAULT=1"),
|
||||||
|
2
third-party/argparse
vendored
2
third-party/argparse
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 3f4e3594a6891b942d5a711781d5425111aa13bf
|
Subproject commit ffd9c23427d0cb105e27f27f0cf97b463b6a8bf8
|
2
third-party/libscan
vendored
2
third-party/libscan
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 0a9742b6865da7b60b77790b8288ca6d8b17471c
|
Subproject commit 49d4f1ae4834b1716887db28f4e1156b1d47816e
|
Loading…
x
Reference in New Issue
Block a user