1. Arkangelshadow

    Arkangelshadow GBAtemp Regular
    Member

    Joined:
    Jun 6, 2013
    Messages:
    139
    Country:
    Mexico
    Thx, everything worked fine as I have access to the files via "mounting" the google drive folder; but it takes too long to load, and it didn't tell me which games require updates or dlc.
     
  2. lahma

    OP lahma Member
    Newcomer

    Joined:
    Nov 29, 2017
    Messages:
    23
    Country:
    United States
    I'm not sure what you mean by "mounting" the Google Drive folder (do you mean the "File Browser"?). When I load Tinfoil (without connecting to a NUT server), it only takes a few seconds to parse my Google Drive folder. I have my gdrive path set directly to the folder containing only my Switch files though, so even though my Switch folder has many hundreds of NSPs/XCIs/etc, it only has to parse those files and not everything else on my Google Drive. If you want Tinfoil to parse your gdrive path on startup (so that it can be used in the list of new games/updates/dlc), highlight it inside of "File Browser", hit "X" on your controller, set ENABLED to 'YES', and then hit "X" again to save. If ENABLED is set to 'NO', then Tinfoil does not parse the directory at all upon startup and the only way to access the files within is directly through "File Browser".

    Another thing to be aware of is if you have ENABLED set to 'YES' on a location that is inaccessible (such as a 'nut://' address but you do not have your NUT server running), it will take a very long time for Tinfoil to startup because it is trying to access that address but can't. The timeout value for how long it continues to try to access an inaccessible address can be changed but its probably best just to set the ENABLED value appropriately for all of your locations instead.

    One thing I'm not sure of is how Tinfoil parses Switch files on Google Drive. While it may actually read the header of each file in order to ascertain the title id and version # of each, it parses my gdrive folder so quickly that I doubt whether this is actually the case. If I had to guess, I would say that it is instead reading that info from the filename of each file instead. If this is indeed the case (perhaps @blawar can answer this), then you will need to ensure that you have all of your Switch files on your Google Drive are named appropriately (such as 'Celeste [01002b30028f6800][v196608].nsp') so that it can correctly parse them to use them in the New Games/Updates/DLC sections.

    Hopefully I was able to answer your question. If I misunderstood, please clarify what you need help with, and I'll do my best to help out.
     
  3. Arkangelshadow

    Arkangelshadow GBAtemp Regular
    Member

    Joined:
    Jun 6, 2013
    Messages:
    139
    Country:
    Mexico
    Hi, thx for your answer. I'm using SX Installer; and by "mounting the gdrive" i'm refering to the file browser.

    I went to the file browser, and i was already enabled. The file browser is pointed to a folder in the gdrive that has 3 subfolders (base,dlc,updates).

    If i click on dlc, it takes a large amount of time before it can show me files; wich i can now order (thx to you) but can't know if i have it installed or not.

    But the gdrive files only appear via file browser; and not on the left menu as in some "packs".
     
  4. straumli

    straumli Member
    Newcomer

    Joined:
    May 17, 2018
    Messages:
    40
    Country:
    Netherlands
    This works very well, thank you for the very readable guide!
     
  5. lahma

    OP lahma Member
    Newcomer

    Joined:
    Nov 29, 2017
    Messages:
    23
    Country:
    United States
    Obviously, I'm a bit late here lol... Sorry, I didn't even see that I had a reply on the thread. As far as having the gdrive files show up in the left menu, you can now "Pin" any gdrive directory and those files should show up there. Just browse to the Google Drive folder you desire and push in/click the right stick (I think.. it should say at the bottom of the screen) and it should accomplish what you're trying to do.

    On the newest version of Tinfoil (7.01), I'm experiencing some other issues with gdrive paths that I contacted @blawar about (such as having issues using folder IDs as the 'path' and also issues using raw path labels as 'path' that are pointing to folders containing lots of files, ex: 'root/switch/games'). Whenever I hear back from him, I will update the thread as well as the instructions on my Github.

    — Posts automatically merged - Please don't double post! —

    You're very welcome! Took me a lot of trial, error, and heartache to figure it all out, so I felt compelled to share my findings with others :) Glad you found it useful.
     
  6. eXhumer1

    eXhumer1 Newbie
    Newcomer

    Joined:
    May 1, 2019
    Messages:
    7
    Country:
    Canada
    I have a few questions.

    Why have you opted for oauth2client, a deprecated oauth2 python library instead of the ones mentioned in the deprecation notice?
    Why have you not used the same methods outlined in nut for token creation and the oauth library used in nut instead of making your own methods and using deprecated oauth library?

    https://pastebin.com/bf8Fx2up

    EDIT: Also forgot to ask another question, why are you building a Google Drive service for, returning it with your method and not using it anywhere?
    EDIT2: Also forgot to ask another question, why is your scope read-only? IIRC (although I could very well be wrong here), you can also write to the gdrive protocol in tinfoil/sx-installer. So, I'm not sure why you did that for also.
     
    Last edited: Feb 5, 2020
  7. lahma

    OP lahma Member
    Newcomer

    Joined:
    Nov 29, 2017
    Messages:
    23
    Country:
    United States
    I already replied to the issue you filed on my Github. I will try to reply to your other questions here when I get a chance. Just a bit busy at the moment. (Quick Hint: Lots of things have changed in Tinfoil since I wrote the utility and all its documentation... Tinfoil used to only support reading from GDrive (no save support to gdrive) and you could only create the initial authentication token while being connected to a PC via NUT.)
     
    Last edited: Feb 5, 2020
  8. blawar

    blawar Developer
    Developer

    Joined:
    Nov 21, 2016
    Messages:
    1,349
    Country:
    United States
    Your app is still useful when the user doesn't want to use NUT or manually create the required files on a PC.
     
  9. lahma

    OP lahma Member
    Newcomer

    Joined:
    Nov 29, 2017
    Messages:
    23
    Country:
    United States
    Hey @blawar , I sent you a PM a couple of days ago but I'm going to repeat my msg/questions here in case someone else has input on the topic or can answer any of my questions. If/when you have time to address any of this, your input would be greatly appreciated.

     
Draft saved Draft deleted
Loading...

Hide similar threads Similar threads with keywords - (Authenticated, Generator, Installer