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

ROM shortcuts can't be deleted if there is a special character in game name #142

Open
daddeltrotter opened this issue May 3, 2021 · 8 comments

Comments

@daddeltrotter
Copy link
Contributor

I uploaded a game ROM and gave it a name with a special character (eg. "é" or "à").
I could not delete the game later on via steam buddy.
If I select "Delete" I get a web with an error as response:
"Error: 500 Internal Server Error
Sorry, the requested URL 'http://gameros-sbc.local/shortcuts/delete' caused an error:
Internal Server Error"

@sharkwouter
Copy link
Contributor

Could you check out what the shortcut file is called? You can find it in ~/.local/share/steam-shortcuts/ somewhere

@daddeltrotter
Copy link
Contributor Author

daddeltrotter commented May 4, 2021

In steam-buddy.gbc.yaml I have (Pokémon. I tried different versions of entering the name):

- banner: "/home/gamer/.local/share/steam-buddy/banners/gbc/Pok\xE9mon Pinball.png"
  cmd: gbc
  dir: '"/home/gamer/.local/share/steam-buddy/content/gbc"'
  hidden: false
  name: "Pok\xE9mon Pinball"
  params: "\"Pok\xE9mon Pinball.zip\""
  tags:
  - Game Boy Color
- banner: "/home/gamer/.local/share/steam-buddy/banners/gbc/Pok\xE9mon PB.png"
  cmd: gbc
  dir: '"/home/gamer/.local/share/steam-buddy/content/gbc"'
  hidden: false
  name: "Pok\xE9mon PB"
  params: "\"Pok\xE9mon PB.zip\""
  tags:
  - Game Boy Color

In steam-buddy.gba.yaml I have ried with an "à" ("Tetrisà" to check for a different emulator and a different character):

- banner: "/home/gamer/.local/share/steam-buddy/banners/gba/Tetris\xE0.png"
  cmd: gba
  dir: '"/home/gamer/.local/share/steam-buddy/content/gba"'
  hidden: false
  name: "Tetris\xE0"
  params: "\"Tetris\xE0.zip\""
  tags:
  - Game Boy Advance

@sharkwouter
Copy link
Contributor

That makes a lot of sense, thanks! I think I know how to fix this. We just need to use html.unescape in some places.

@Samsagax
Copy link
Contributor

@sharkwouter did you figure it out how to fix this?

@sharkwouter
Copy link
Contributor

I didn't test it, but you can probably just change this line:

name = name.strip()

To be the following:

name = html.unescape(name.strip())

@sharkwouter
Copy link
Contributor

That change might be needed in shortcut delete as well. Not sure, would need testing.

@Samsagax
Copy link
Contributor

I think the solution is on urllib.parse.quote() function. Maybe #198 fixes this as well

@daddeltrotter
Copy link
Contributor Author

Just retested. Issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants