pinakes-core: fix subtitle i32 overflow in postgres

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I3b43f97c96905953fd58f051667c59096a6a6964
This commit is contained in:
raf 2026-03-12 19:41:01 +03:00
commit 6d68a83003
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 33 additions and 8 deletions

View file

@ -392,7 +392,13 @@ pub async fn cleanup_orphaned_thumbnails(
if thumbnail_dir.exists() {
let entries = std::fs::read_dir(thumbnail_dir)?;
for entry in entries.flatten() {
for entry in entries.filter_map(|e| {
e.map_err(|err| {
warn!(error = %err, "failed to read thumbnail directory entry");
err
})
.ok()
}) {
let path = entry.path();
if let Some(stem) = path.file_stem().and_then(|s| s.to_str())
&& !known_ids.contains(stem)