From da302c07acabcde6c8ac87003880ea341a7b481e Mon Sep 17 00:00:00 2001 From: zurdi Date: Fri, 21 Feb 2025 12:12:22 +0000 Subject: [PATCH] fix: correct M3U file path handling for hidden folders --- backend/endpoints/rom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/endpoints/rom.py b/backend/endpoints/rom.py index d910f2ce4..eb93bb437 100644 --- a/backend/endpoints/rom.py +++ b/backend/endpoints/rom.py @@ -392,7 +392,12 @@ async def get_rom_content( # Add M3U file m3u_encoded_content = "\n".join( - [f.full_path.replace(rom.full_path, ".hidden") for f in files] + [ + f.full_path.replace( + rom.full_path, ".hidden" if hidden_folder else "" + ) + for f in files + ] ).encode() m3u_filename = f"{rom.fs_name}.m3u" m3u_info = ZipInfo(filename=m3u_filename, date_time=now.timetuple()[:6])