Skip to content

Commit fc21552

Browse files
committed
3.0.168
1 parent dc74f2f commit fc21552

File tree

7 files changed

+625
-581
lines changed

7 files changed

+625
-581
lines changed

.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
9999
<details><summary>List all subcommands</summary>
100100

101101
$ library
102-
library (v3.0.167; 103 subcommands)
102+
library (v3.0.168; 103 subcommands)
103103

104104
Create database subcommands:
105105
╭─────────────────┬──────────────────────────────────────────╮

library/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from library.utils import argparse_utils, iterables
66
from library.utils.log_utils import log
77

8-
__version__ = "3.0.167"
8+
__version__ = "3.0.168"
99

1010
progs = {
1111
"Create database subcommands": {

library/folders/filter_src.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010

1111
def add_time_filters(parser, prefix="move"):
1212
"""Add time-based filtering arguments (ctime/mtime) to a parser.
13-
13+
1414
Args:
1515
parser: The argument parser or argument group
1616
prefix: Prefix for argument names (e.g., 'move' for --move-sizes)
1717
"""
1818
prefix_dash = f"--{prefix}-" if prefix else "--"
19-
19+
2020
time_group = parser.add_argument_group("Time Filters")
2121
time_group.add_argument(
2222
f"{prefix_dash}time-created",
@@ -68,22 +68,22 @@ def add_time_filters(parser, prefix="move"):
6868

6969
def process_time_filters(args, prefix="move"):
7070
"""Process time-based filtering arguments into filter functions.
71-
71+
7272
Args:
7373
args: Parsed arguments namespace
7474
prefix: Prefix for argument names (e.g., 'move' or empty)
7575
"""
7676
prefix_underscore = f"{prefix}_" if prefix else ""
7777
now = time.time()
78-
78+
7979
# Process time-created arguments
8080
created_within = getattr(args, f"{prefix_underscore}created_within", [])
8181
created_before = getattr(args, f"{prefix_underscore}created_before", [])
82-
82+
8383
# Calculate threshold timestamps
8484
created_within_thresholds = [now - nums.human_to_seconds(s) for s in created_within]
8585
created_before_thresholds = [now - nums.human_to_seconds(s) for s in created_before]
86-
86+
8787
# Create filter function: timestamp must be >= all within thresholds AND < all before thresholds
8888
def time_created_filter(timestamp):
8989
if timestamp is None:
@@ -95,17 +95,17 @@ def time_created_filter(timestamp):
9595
if timestamp >= threshold:
9696
return False
9797
return True
98-
98+
9999
args.time_created = time_created_filter
100-
100+
101101
# Process time-modified arguments
102102
modified_within = getattr(args, f"{prefix_underscore}modified_within", [])
103103
modified_before = getattr(args, f"{prefix_underscore}modified_before", [])
104-
104+
105105
# Calculate threshold timestamps
106106
modified_within_thresholds = [now - nums.human_to_seconds(s) for s in modified_within]
107107
modified_before_thresholds = [now - nums.human_to_seconds(s) for s in modified_before]
108-
108+
109109
# Create filter function
110110
def time_modified_filter(timestamp):
111111
if timestamp is None:
@@ -117,7 +117,7 @@ def time_modified_filter(timestamp):
117117
if timestamp >= threshold:
118118
return False
119119
return True
120-
120+
121121
args.time_modified = time_modified_filter
122122

123123

library/mediafiles/process_ffmpeg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ def process_path(args, path, include_timecode=False, **kwargs) -> str | None:
267267
source_rate = int(audio_stream.get("sample_rate") or 44100)
268268

269269
duration = float(audio_stream.get("duration") or probe.format.get("duration") or 0)
270-
is_split = args.always_split or (not video_stream and args.split_longer_than and duration > args.split_longer_than)
270+
is_split = args.always_split or (
271+
not video_stream and args.split_longer_than and duration > args.split_longer_than
272+
)
271273

272274
try:
273275
assert bitrate > 0

library/mediafiles/process_text.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def update_manifest(output_path, avif_files):
118118
# Update media-type attribute
119119
old_media_type = get_media_type(os.path.splitext(old_name)[1])
120120
if old_media_type and f'media-type="{old_media_type}"' in line:
121-
lines[i] = line.replace(
122-
f'media-type="{old_media_type}"', f'media-type="{new_media_type}"'
123-
)
121+
lines[i] = line.replace(f'media-type="{old_media_type}"', f'media-type="{new_media_type}"')
124122
modified = True
125123
content = "\n".join(lines)
126124

0 commit comments

Comments
 (0)