This commit is contained in:
TylerCG 2026-08-22 02:05:40 -04:00
parent 24ca1a406f
commit f32177e69a
6 changed files with 64678 additions and 85561 deletions

View File

@ -442,13 +442,13 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
# In forced mode, skip the file # In forced mode, skip the file
print(f"{method} failed: {error_msg}") print(f"{method} failed: {error_msg}")
failure_logger.warning(f"{file.name} | {method} failed: {error_msg}") failure_logger.warning(f"{file.name} | {method} failed: {error_msg}")
print(f" Temp input preserved at: {temp_input}")
print(f" Temp output preserved at: {temp_output}")
consecutive_failures += 1 consecutive_failures += 1
if consecutive_failures >= max_consecutive: if consecutive_failures >= max_consecutive:
print(f"\n{max_consecutive} consecutive failures in forced {method} mode. Stopping.") print(f"\n{max_consecutive} consecutive failures in forced {method} mode. Stopping.")
logger.error(f"{max_consecutive} consecutive failures. Stopping process.") logger.error(f"{max_consecutive} consecutive failures. Stopping process.")
_cleanup_temp_files(temp_input, temp_output)
break break
_cleanup_temp_files(temp_input, temp_output)
continue continue
# Encoding succeeded - reset failure counter # Encoding succeeded - reset failure counter
@ -456,13 +456,14 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
# FFmpeg execution failed # FFmpeg execution failed
error_msg = str(e).split('\n')[0][:100] # First 100 chars of error error_msg = str(e) # Full error message
if test_mode: if test_mode:
# In test mode, stop immediately on any error and keep temp files # In test mode, stop immediately on any error and keep temp files
print(f"❌ Test mode: Encode failed. Stopping script.") print(f"❌ Test mode: Encode failed. Stopping script.")
print(f" Temp input preserved at: {temp_input}") print(f" Temp input preserved at: {temp_input}")
print(f" Temp output preserved at: {temp_output}") print(f" Temp output preserved at: {temp_output}")
print(f" Check logs for details: {Path(__file__).parent.parent / 'logs' / 'conversion.log'}")
logger.error(f"Test mode: Encode failed for {file.name}: {error_msg}") logger.error(f"Test mode: Encode failed for {file.name}: {error_msg}")
raise raise
@ -506,9 +507,11 @@ def process_folder(folder: Path, cq: int, transcode_mode: str, resolution: str,
if consecutive_failures >= max_consecutive: if consecutive_failures >= max_consecutive:
print(f"\n{max_consecutive} consecutive failures in forced {method} mode. Stopping.") print(f"\n{max_consecutive} consecutive failures in forced {method} mode. Stopping.")
logger.error(f"{max_consecutive} consecutive failures. Stopping process.") logger.error(f"{max_consecutive} consecutive failures. Stopping process.")
_cleanup_temp_files(temp_input, temp_output) print(f" Temp input preserved at: {temp_input}")
print(f" Temp output preserved at: {temp_output}")
break break
_cleanup_temp_files(temp_input, temp_output) print(f" Temp input preserved at: {temp_input}")
print(f" Temp output preserved at: {temp_output}")
continue continue
# If we get here, encoding succeeded - save file and log # If we get here, encoding succeeded - save file and log

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -182,3 +182,5 @@
2026-08-20 12:25:00 | The Morning Show - S02E01 - My Least Favorite Year x265 EAC3 Atmos WEBDL-1080p t3nzin.mkv | Unexpected error: 'charmap' codec can't decode byte 0x81 in position 79: character maps to <undefined> 2026-08-20 12:25:00 | The Morning Show - S02E01 - My Least Favorite Year x265 EAC3 Atmos WEBDL-1080p t3nzin.mkv | Unexpected error: 'charmap' codec can't decode byte 0x81 in position 79: character maps to <undefined>
2026-08-20 12:25:34 | The Morning Show - S02E02 - Its Like the Flu x265 EAC3 Atmos WEBDL-1080p t3nzin.mkv | Unexpected error: 'charmap' codec can't decode byte 0x81 in position 13: character maps to <undefined> 2026-08-20 12:25:34 | The Morning Show - S02E02 - Its Like the Flu x265 EAC3 Atmos WEBDL-1080p t3nzin.mkv | Unexpected error: 'charmap' codec can't decode byte 0x81 in position 13: character maps to <undefined>
2026-08-22 00:50:44 | Dungeons and Dragons - Honor Among Thieves_t00.mkv | Unexpected error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\U 2026-08-22 00:50:44 | Dungeons and Dragons - Honor Among Thieves_t00.mkv | Unexpected error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\U
2026-08-22 01:04:47 | Dungeons and Dragons - Honor Among Thieves_t00.mkv | Unexpected error: Command '['ffmpeg', '-y', '-i', 'C:\\Users\\Tyler\\Documents\\GitHub\\conversion_project\\processing
2026-08-22 01:11:39 | Dungeons and Dragons - Honor Among Thieves_t00.mkv | CQ error: Command '['ffmpeg', '-y', '-i', 'C:\\Users\\Tyler\\Documents\\GitHub\\conversion_project\\processing