copy only mode
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#! /usr/bin/python3
|
#! /usr/bin/python3
|
||||||
|
|
||||||
import os, click, time, logging
|
import os, click, time, logging, shutil
|
||||||
|
|
||||||
from ffx.configuration_controller import ConfigurationController
|
from ffx.configuration_controller import ConfigurationController
|
||||||
|
|
||||||
@@ -325,6 +325,8 @@ def checkUniqueDispositions(context, mediaDescriptor: MediaDescriptor):
|
|||||||
@click.option('--nice', type=int, default=99, help='Niceness of started processes')
|
@click.option('--nice', type=int, default=99, help='Niceness of started processes')
|
||||||
@click.option('--cpu', type=int, default=0, help='Limit CPU for started processes to percent')
|
@click.option('--cpu', type=int, default=0, help='Limit CPU for started processes to percent')
|
||||||
|
|
||||||
|
@click.option('--rename-only', is_flag=True, default=False, help='Only renaming, no recoding')
|
||||||
|
|
||||||
def convert(ctx,
|
def convert(ctx,
|
||||||
paths,
|
paths,
|
||||||
label,
|
label,
|
||||||
@@ -373,7 +375,8 @@ def convert(ctx,
|
|||||||
keep_mkvmerge_metadata,
|
keep_mkvmerge_metadata,
|
||||||
|
|
||||||
nice,
|
nice,
|
||||||
cpu):
|
cpu,
|
||||||
|
rename_only):
|
||||||
"""Batch conversion of audiovideo files in format suitable for web playback, e.g. jellyfin
|
"""Batch conversion of audiovideo files in format suitable for web playback, e.g. jellyfin
|
||||||
|
|
||||||
Files found under PATHS will be converted according to parameters.
|
Files found under PATHS will be converted according to parameters.
|
||||||
@@ -728,11 +731,14 @@ def convert(ctx,
|
|||||||
|
|
||||||
ctx.obj['logger'].info(f"Creating file {targetFilename}")
|
ctx.obj['logger'].info(f"Creating file {targetFilename}")
|
||||||
|
|
||||||
fc.runJob(sourcePath,
|
if rename_only:
|
||||||
targetPath,
|
shutil.copyfile(sourcePath, targetPath)
|
||||||
targetFormat,
|
else:
|
||||||
context['video_encoder'],
|
fc.runJob(sourcePath,
|
||||||
chainIteration)
|
targetPath,
|
||||||
|
targetFormat,
|
||||||
|
context['video_encoder'],
|
||||||
|
chainIteration)
|
||||||
|
|
||||||
endTime = time.perf_counter()
|
endTime = time.perf_counter()
|
||||||
ctx.obj['logger'].info(f"\nDONE\nTime elapsed {endTime - startTime}")
|
ctx.obj['logger'].info(f"\nDONE\nTime elapsed {endTime - startTime}")
|
||||||
|
|||||||
Reference in New Issue
Block a user