1. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Hi everyone, I'm releasing a little tool written in JS and PHP for manage a JSON file fully compatible with Tinfoil.

    Would you like to see your NSP on Tinfoil directly without having to download on your PC, but downloading them directly on Switch? With This tool you can do it!

    Unfortunately at the moment this tool only works for Gdrive download links. I've already asked if others file hosters are supported.

    Simply paste the GDrive download link ID and the name of the NSP.
    It will create a list of links for download NSPs directly from Drive to Switch.

    How to use it:
    I've wrote every step in the github repo but for create a clearer post I'll write it here too.

    WEB STEPS:
    • Clone the repository and upload it through FTP to your website (if you have SSH access you can simply clone it over it)
    • Optional Change the folder name for something you like
    • You're ready to create and manage your NSP list.
    For manage them simply open your website and paste the Gdrive download link ID in the field and same for NSP name.

    SWITCH STEPS:
    • Add your website path + switch.json ( example.com/folder_name/switch.json ) to your locations.conf or file browser on Tinfoil.
    • Nothing else, Tinfoil will automatically refresh this JSON every time you open it so Switch will be always up-to-date with the JSON file.

    I've written also a little Command for Workflow on iPhone for managing the JSON directly from App.

    You can check that on the github repo here.

    Happy hacking :)
     
    Last edited: May 14, 2019
  2. CatmanFan

    CatmanFan Anxious and regretful
    Member

    Joined:
    Aug 14, 2016
    Messages:
    1,951
    Country:
    Morocco
    Nice.

    Looks like this will make things easier. ^^
     
  3. blawar

    blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,303
    Country:
    United States
    Nice, one trick you could do to shorten the url, is do what I believe HBG does: just give out the main url http://blah.com/ to put into locations.conf. On the server, check the HTTP headers, you will see some specific ones that are unique to the tinfoil client:

    user agent should be empty, should be a header called "Theme" which is a sha256 hash of the users active theme, and unique random UID that can be used for whitelisting or blacklisting clients.

    you can also encrypt the json file automatically if you do not want plain text links on the internet.
     
    Quantumcat likes this.
  4. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Thanks Blawar. I’ll check everything for sure.

    Unfortunately there’s not documentations on web about how tinfoil manage http so a lot of things has been made by testing.

    I guessed that how hbg works should be something which user agent, I had no time to test days ago but I’m going to do it this evening! I’ll let you update.

    Thanks again.
     
  5. Fan3k

    Fan3k Member
    Newcomer

    Joined:
    Dec 17, 2018
    Messages:
    22
    Country:
    Germany
    Last edited: May 15, 2019
  6. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Hi, I've tried to reproduce your issue and I've no problem at all.
    Do you get the issue with both files and folders? (folders atm is not supported)

    Here's a little video showing you all steps to follow.

    https://streamable.com/s/6veq3/iwflka

    Let me know if it helps you.
     
    Fan3k likes this.
  7. Fan3k

    Fan3k Member
    Newcomer

    Joined:
    Dec 17, 2018
    Messages:
    22
    Country:
    Germany
    All work after restart server. Folder not possible supported?
     
  8. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Mmm it was really strange. Because everything needed is already inside the github folder.
    Let me know if it works after that issue.
     
  9. blawar

    blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,303
    Country:
    United States
    Yeah I need to sit down and write all of the documentation. The last fun part of software development :)
     
  10. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Typo error: the last NOT SO fun part of software development :)
     
  11. masagrator

    masagrator The developper
    Member

    Joined:
    Oct 14, 2018
    Messages:
    2,116
    Country:
    Poland
    If this was typo, then "least" would be more correct. ;)
     
  12. homework

    homework GBAtemp Regular
    Member

    Joined:
    Mar 18, 2016
    Messages:
    202
    Country:
    Canada
    Folders are NOT working. I added a folder to my GDrive, but it's empty apparently on Tinfoil (it's actually NOT). Any ideas?
     
  13. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
  14. homework

    homework GBAtemp Regular
    Member

    Joined:
    Mar 18, 2016
    Messages:
    202
    Country:
    Canada
  15. _gianno

    OP _gianno Advanced Member
    Newcomer

    Joined:
    Jun 28, 2018
    Messages:
    72
    Country:
    Italy
    Ok, so you should not post it here lol

    Anyway, folders has been tested a lot nowadays. Maybe something's wrong with your folder link. Please try the following:
    - Update Tinfoil to latest version available ( > 2.0 )
    - Put a single link just to be sure that everything is working fine
    - Remember that folder appears in main menu of Tinfoil under NEW GAMES not in File Browser as single link does.
     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - directly, install, through