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

Get plugin name for development ZIP during installation #578

Merged
merged 4 commits into from
Feb 15, 2024
Merged

Get plugin name for development ZIP during installation #578

merged 4 commits into from
Feb 15, 2024

Conversation

eXhumer
Copy link
Contributor

@eXhumer eXhumer commented Jan 24, 2024

Please tick as appropriate:

  • I have tested this code on a steam deck or on a PC
  • My changes generate no new errors/warnings
  • This is a bugfix/hotfix
  • This is a new feature

Description

Currently the development plugin installation from ZIP / URL is broken partially, due to relying on ZIP name as the plugin name. This commit fixes the issue, by parsing the plugin name from the folder containing plugin.json from the ZIP. I tested this on my Steam Deck OLED and can confirm it to fix the issue. I installed a ZIP which previously failed installation and it now works without issue with this commit.

Related comments on issue

#527 (comment)

#527 (comment)

This fixes issue: #527

@TrainDoctor TrainDoctor requested review from TrainDoctor and a team January 24, 2024 23:04
@TrainDoctor TrainDoctor added enhancement New feature or request python Pull requests that update Python code labels Jan 24, 2024
Copy link
Contributor

@FineWolf FineWolf left a comment

Choose a reason for hiding this comment

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

Added some comments about how plugins are structured, and how the plugin.json name property is not reflective of the actual folder name in which the plugin is installed.

backend/src/browser.py Outdated Show resolved Hide resolved
backend/src/browser.py Outdated Show resolved Hide resolved
Signed-off-by: eXhumer <exhumer1@protonmail.com>
@eXhumer
Copy link
Contributor Author

eXhumer commented Jan 25, 2024

Added some comments about how plugins are structured, and how the plugin.json name property is not reflective of the actual folder name in which the plugin is installed.

Thanks for the comments regarding the plugin structure, I have amended changes based on the comments left.

@FineWolf
Copy link
Contributor

Sigh, wrong account, but yes. Looks good.

RodoMa92 and others added 3 commits January 25, 2024 17:21
Add another name placeholder for getting the toaster out of the HTML tree. Thanks to @eXhumer for the fix.
* Added translation using Weblate (Japanese)

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Update translation files

Updated by "Remove blank strings" hook in Weblate.

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/

* Translated using Weblate (Japanese)

Currently translated at 82.7% (115 of 139 strings)

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/ja/

* Translated using Weblate (Japanese)

Currently translated at 89.2% (124 of 139 strings)

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/ja/

* Translated using Weblate (Japanese)

Currently translated at 100.0% (139 of 139 strings)

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/ja/

* Translated using Weblate (Portuguese (Portugal))

Currently translated at 100.0% (139 of 139 strings)

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/pt_PT/

* Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (139 of 139 strings)

Translation: Decky/Decky
Translate-URL: https://weblate.werwolv.net/projects/decky/decky/pt_BR/

---------

Co-authored-by: Tak-attack <tak.bts@gmail.com>
Co-authored-by: Weblate <noreply@weblate.org>
Co-authored-by: Fábio Oliveira <fabio.an.oliveira@gmail.com>
Signed-off-by: eXhumer <exhumer1@protonmail.com>
@TrainDoctor
Copy link
Member

@SteamDeckHomebrew/decky-testers need a tester for this one. Please install this PR's binary and then download a zip for a plugin and then rename that zip however you'd like (just don't give it the same name :P) and check that this works.
If this works, this PR can be merged.

Copy link
Member

@TrainDoctor TrainDoctor left a comment

Choose a reason for hiding this comment

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

Works like a charm, and also helped me to discover that when you download a plugin zip file from github (built during an actions run etc) it downloads as a redundant zip file... Guess we should add some logic to account for that 🤦🏻

@TrainDoctor TrainDoctor merged commit 0dce3a8 into SteamDeckHomebrew:main Feb 15, 2024
6 checks passed
PartyWumpus pushed a commit that referenced this pull request Feb 20, 2024
* fix: get plugin name for dev builds from ZIP (#527)

Signed-off-by: eXhumer <exhumer1@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Pull requests that update Python code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants