Skip to content

Commit 76bbe3c

Browse files
authored
Version 5.10.0 (#640)
* Adding global disable interlace check (thanks to Hexenhammer) * Changing profile bitrate selector to be text field (thanks to Hexenhammer) * Fixing #637 saving temp files for seven days to allow for better debug and recovery (thanks to marillat) * Fixing #638 switching archived library appdirs to maintained platformdirs (thanks to marillat) * Fixing x265 passlog file name was not being applied properly * Fixing audio conversion list for rigaya encoders (thanks to Hexenhammer)
1 parent e2b3212 commit 76bbe3c

File tree

18 files changed

+105
-30
lines changed

18 files changed

+105
-30
lines changed

CHANGES

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## Version 5.10.0
4+
5+
* Adding global disable interlace check (thanks to Hexenhammer)
6+
* Changing profile bitrate selector to be text field (thanks to Hexenhammer)
7+
* Fixing #637 saving temp files for seven days to allow for better debug and recovery (thanks to marillat)
8+
* Fixing #638 switching archived library appdirs to maintained platformdirs (thanks to marillat)
9+
* Fixing x265 passlog file name was not being applied properly
10+
* Fixing audio conversion list for rigaya encoders (thanks to Hexenhammer)
11+
312
## Version 5.9.0
413

514
* Adding QP mode for FFmpeg Nvenc encoding
@@ -12,7 +21,6 @@
1221
* Fixing #631 VVC Level can't be set to 0 anymore (thanks to GT500org)
1322
* Removing Ubuntu 20.04, 22.04 and Mac 12 builds
1423

15-
1624
## Version 5.8.2
1725

1826
* Fixing #610 Do not try to divide by zero if HDR metadata has bad values (thanks to Noelle Leigh)

fastflix/conversion_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from datetime import datetime
77

88
import reusables
9-
from appdirs import user_data_dir
9+
from platformdirs import user_data_dir
1010
from pathvalidate import sanitize_filename
1111

1212
from fastflix.command_runner import BackgroundRunner

fastflix/encoders/hevc_x265/command_builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def build(fastflix: FastFlix):
170170
if fastflix.current_video.cll:
171171
pass
172172

173-
pass_log_file = fastflix.current_video.work_path / f"pass_log_file_{secrets.token_hex(10)}"
173+
pass_log_file = f"pass_log_file_{secrets.token_hex(10)}.log"
174174

175175
def get_x265_params(params=()):
176176
if not isinstance(params, (list, tuple)):
@@ -181,12 +181,12 @@ def get_x265_params(params=()):
181181
if settings.bitrate:
182182
if settings.bitrate_passes == 2:
183183
command_1 = (
184-
f'{beginning} {get_x265_params(["pass=1", "no-slow-firstpass=1"])} '
185-
f'-passlogfile "{pass_log_file}" -b:v {settings.bitrate} -preset:v {settings.preset} {settings.extra if settings.extra_both_passes else ""} '
184+
f'{beginning} {get_x265_params(["pass=1", "no-slow-firstpass=1", f"stats={pass_log_file}"])} '
185+
f' -b:v {settings.bitrate} -preset:v {settings.preset} {settings.extra if settings.extra_both_passes else ""} '
186186
f" -an -sn -dn {output_fps} -f mp4 {null}"
187187
)
188188
command_2 = (
189-
f'{beginning} {get_x265_params(["pass=2"])} -passlogfile "{pass_log_file}" '
189+
f'{beginning} {get_x265_params(["pass=2", f"stats={pass_log_file}"])} '
190190
f"-b:v {settings.bitrate} -preset:v {settings.preset} {settings.extra} {ending}"
191191
)
192192
return [

fastflix/entry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import coloredlogs
99
import requests
1010
import reusables
11-
from appdirs import user_data_dir
11+
from platformdirs import user_data_dir
1212
from box import Box
1313

1414
import fastflix.language # Have to set language first thing
@@ -53,7 +53,7 @@ def startup_options():
5353

5454
if "--test" in options:
5555
try:
56-
import appdirs
56+
import platformdirs
5757
import box
5858
import colorama
5959
import coloredlogs

fastflix/flix.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ def get_auto_crop(
407407

408408
def detect_interlaced(app: FastFlixApp, config: Config, source: Path, **_):
409409
"""http://www.aktau.be/2013/09/22/detecting-interlaced-video-with-ffmpeg/"""
410-
411410
# Interlaced
412411
# [Parsed_idet_0 @ 00000] Repeated Fields: Neither: 815 Top: 88 Bottom: 98
413412
# [Parsed_idet_0 @ 00000] Single frame detection: TFF: 693 BFF: 0 Progressive: 39 Undetermined: 269

fastflix/language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from pathlib import Path
1111
import importlib.resources
1212

13-
from appdirs import user_data_dir
13+
from platformdirs import user_data_dir
1414
from box import Box
1515

1616
ref = importlib.resources.files("fastflix") / "data/languages.yaml"

fastflix/models/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Literal
99
import json
1010

11-
from appdirs import user_data_dir
11+
from platformdirs import user_data_dir
1212
from box import Box, BoxError
1313
from pydantic import BaseModel, Field
1414
from reusables import win_based
@@ -127,6 +127,7 @@ class Config(BaseModel):
127127
custom_after_run_scripts: dict = Field(default_factory=dict)
128128
profiles: dict[str, Profile] = Field(default_factory=get_preset_defaults)
129129
priority: Literal["Realtime", "High", "Above Normal", "Normal", "Below Normal", "Idle"] = "Normal"
130+
disable_deinterlace_check: bool = False
130131
stay_on_top: bool = False
131132
portable_mode: bool = False
132133
ui_scale: str = "1"

fastflix/models/fastflix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
from typing import Any
44

5-
from appdirs import user_data_dir
5+
from platformdirs import user_data_dir
66
from pydantic import BaseModel, Field
77

88
from fastflix.models.config import Config

fastflix/program_downloads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import requests
1111
import reusables
12-
from appdirs import user_data_dir
12+
from platformdirs import user_data_dir
1313
from PySide6 import QtWidgets
1414

1515
from fastflix.language import t

fastflix/shared.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from subprocess import run
1010
import platform
1111

12-
from appdirs import user_data_dir
12+
from platformdirs import user_data_dir
1313
import importlib.resources
1414
import requests
1515
import reusables
@@ -352,3 +352,15 @@ def clear_list(the_list: list, close=False):
352352
if close:
353353
the_list[i].close()
354354
del the_list[i]
355+
356+
357+
def get_filesafe_datetime():
358+
return datetime.now().strftime("%Y%m%d")
359+
360+
361+
def parse_filesafe_datetime(dt: str):
362+
return datetime.strptime(dt, "%Y%m%d")
363+
364+
365+
def is_date_older_than_7days(dt: datetime):
366+
return (datetime.now() - dt) > timedelta(days=7)

0 commit comments

Comments
 (0)