Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix tinfoil issue with improper rom DL urls and support for rom folders #1316

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
7 changes: 4 additions & 3 deletions backend/endpoints/feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,13 @@ async def extract_titledb(roms: list[Rom]) -> dict[str, TinfoilFeedTitleDBSchema
TinfoilFeedFileSchema(
url=str(
request.url_for(
"get_rom_content", id=rom.id, file_name=rom.file_name
"get_rom_content", id=rom.id, file_name=file.get('filename')
)
),
size=rom.file_size_bytes,
size=rom.files[0].get('size'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rom.files[0] here now needs to be file, after the latest changes.

)
for rom in roms
for rom in roms if rom.files and len(rom.files) > 0
for file in rom.files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to expose all files to Tinfoil. Ideally, we could only include the ones with a valid extension that Tinfoil understands (in case users maintain other kind of resources within the rom folder).

],
directories=[],
success="RomM Switch Library",
Expand Down
Loading