Skip to content

Commit 3f8f223

Browse files
committed
2.4.009
1 parent 0c47097 commit 3f8f223

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

.github/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
9595
<details><summary>List all subcommands</summary>
9696

9797
$ library
98-
xk media library subcommands (v2.4.008)
98+
xk media library subcommands (v2.4.009)
9999

100100
Create database subcommands:
101101
╭───────────────┬────────────────────────────────────────────────────╮

xklb/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.4.008"
1+
__version__ = "2.4.009"

xklb/fs_extract.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def extract_metadata(mp_args, path) -> Optional[Dict[str, int]]:
190190
if getattr(mp_args, "process", False):
191191
if mp_args.profile == DBType.audio and Path(path).suffix not in [".opus", ".mka"]:
192192
path = media["path"] = process_audio.process_path(
193-
path, split_longer_than="36mins" if "audiobook" in path.lower() else None
193+
path, split_longer_than=2160 if "audiobook" in path.lower() else None
194194
)
195195

196196
if getattr(mp_args, "move", False) and not file_utils.is_file_open(path):

xklb/scripts/rel_mv.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
from pathlib import Path
44

55
from xklb import usage
6-
from xklb.utils import objects, path_utils, processes
6+
from xklb.utils import arg_utils, file_utils, objects, path_utils, processes
77
from xklb.utils.log_utils import log
88

99

1010
def parse_args() -> argparse.Namespace:
1111
parser = argparse.ArgumentParser(prog="library relmv", usage=usage.relmv)
1212
parser.add_argument("--verbose", "-v", action="count", default=0)
1313
parser.add_argument("--dry-run", action="store_true")
14+
parser.add_argument("--ext", "-e", action=arg_utils.ArgparseList)
1415

1516
parser.add_argument("sources", nargs="+", help="one or more source files or directories to move")
1617
parser.add_argument("dest", help="destination directory")
@@ -72,6 +73,9 @@ def rel_mv() -> None:
7273
args = parse_args()
7374

7475
dest = Path(args.dest).expanduser().resolve()
76+
77+
if args.ext:
78+
args.sources = [p for source in args.sources for p in file_utils.rglob(source, args.ext)[0]]
7579
rel_move(args.sources, dest, dry_run=args.dry_run)
7680

7781

0 commit comments

Comments
 (0)