diff --git a/backend/endpoints/rom.py b/backend/endpoints/rom.py index a253fb25f..debae84b2 100644 --- a/backend/endpoints/rom.py +++ b/backend/endpoints/rom.py @@ -245,6 +245,7 @@ async def get_rom_content( ZipResponse: Returns a response for nginx to serve a Zip file for multi-part roms """ + current_user = request.user rom = db_rom_handler.get_rom(id) if not rom: @@ -254,12 +255,14 @@ async def get_rom_content( files_to_download = sorted(files or [r["filename"] for r in rom.files]) if not rom.multi: + log.info(f"User {current_user.username} is downloading {rom.file_name}") return FileRedirectResponse( download_path=Path(f"/library/{rom.full_path}"), filename=rom.file_name, ) if len(files_to_download) == 1: + log.info(f"User {current_user.username} is downloading {rom.file_name}") return FileRedirectResponse( download_path=Path(f"/library/{rom.full_path}/{files_to_download[0]}"), ) @@ -284,6 +287,7 @@ async def get_rom_content( filename=f"{file_name}.m3u", ) + log.info(f"User {current_user.username} is downloading {rom.file_name}") return ZipResponse( content_lines=content_lines + [m3u_line], filename=f"{quote(file_name)}.zip",