I'm using rclone mount Gdrive + a python script to detect new files , and then use cURL to send refresh request to Plex Media Server.
I've heard about API ban from google and tried researching about it. I now know that excess api usage might cause ban from Google drive temp/permanent.
To counter this , I've create a python script to detect new files in the rclone mount /mnt/content/Movies for example. It works fine for now , send curl request , plex takes it , works good. But it was after a lot of ChatGPT prompting , I realized that I was doing the same thing as that plex would have. I wanted to use Partial Media Scan In plex , but before even that , my script will be completely scanning the whole drive hence using APIs. Which is what i dont want (the ban part).
So i came here asking if I'm thinking about it the right way. That plex scan and my dir scan is ending up doing the same thing.
PS:-
I haven't used my own client id and client secret. Does that make any difference ?
I'll attach my script here.
Run the command 'rclone version' and share the full output of the command.
rclone v1.65.2
os/version: ubuntu 20.04 (64 bit)
os/kernel: 5.4.0 (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.21.6
go/linking: static
go/tags: none
Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
-->No
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
based on other forum posts, that would not be the case.
if you are concerned about api limits, create a client id+secret for your remote.
i believe that gdrive allows for 1,000,000,000 api calls per 24 hours.
can greatly reduce the number of api calls by using capturing the ouput from subproces.popen rclone test changenotify
Yes , this is not a kind of ban from services. But like a temp ban from using the APIs. Will this also not be caused as of Today? Seems unlikely.
I'm concerned as a kind of , if my using default client id and secret , will that help ? Like kind of , it's api calls must not be adding upto my account. This also seems unlikely , but I'm new to this and don't think that this can be the case.
as far as i know, the only way to get banned from gdrive is to upload copyrighted material.
in your case, not using client id+secret, rclone will get throttled very quickly.
rclone will be forced to slow down the number of api calls as a result.
really, create the client id+secret, use your script and plex.
can monitor the api calls at gdrive website.
based on that, i do not think you need to worry too much about your script using too many api calls.
in fact, very few api calls are required.
your script is iterating over the mount, which is really asking rclone to iterate over its in-memory list of files.
so after the first initial scan, rclone has the full list of files.
after that, rclone should not have use api calls to re-scan the entire gdrive structure.
a new file is added to gdrive
rclone mount using polling, will notice the new file and update its in-memory list of files.
so next time your script scans, rclone is not even contacting gdrive.
of course, how well that works is based on your rclone mount command?