yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.33k stars 1.56k forks source link

Cannot download mods using github links #4931

Closed ajustsomebody closed 3 years ago

ajustsomebody commented 3 years ago

the download mod from link absolutely does not work, atleast for me.

like try typing in www.github.com/logicminimal/Togglemod-Sightbonus/ and it will just fail, i tried to add unciv-mod topic to it then downloaded it directly from the game and it did work without any problems.

also another suggestion: enable the copy paste field for download from url button, i really can't type it myself, especially on mobile.

and dont make the field start with github.com/... it just causes frustration

edit: and add an option to get link from clipboard

xlenstra commented 3 years ago

Problem here is that the master branch of your repository is called 'main' instead of 'master'.

ajustsomebody commented 3 years ago

Problem here is that the master branch of your repository is called 'main' instead of 'master'.

can we just change it to download the sole branch if no other branches exist?

also a question; does the current system use repo names to detect seperate mods or their id? (will the game still act the same about my mod if i change its repo name?)

ajustsomebody commented 3 years ago

Problem here is that the master branch of your repository is called 'main' instead of 'master'.

btw why does it work differently when downloading from url and downloading from unciv? shouldnt it hypothetically work the same as it takes the code from main branch as well?

SomeTroglodyte commented 3 years ago

You're repeating yourself, I'm sure. I already explained somewhere that if and only if the mod is discovered through the repo search query (by the unciv-mod topic), then it knows the default branch name, because it's included in the search response. If you use the manual URL and your branch is not master, then you can and must give it the URL of the ZIP not the repo, otherwise it would need at least an extra roundtrip. All that has already been explained when the size and timestamp were discussed.

yairm210 commented 3 years ago

Not a bug, working as intended. Just rename your main branch to master.