Jump to content


Photo

GDrive - emby_autoscan

GDrive Autoscan Scan Google Drive

  • Please log in to reply
54 replies to this topic

#21 M3th0s OFFLINE  

M3th0s

    Advanced Member

  • Members
  • 105 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 05:10 PM

They are different things. mount point and folder are not related in terms of this script. The setting mountPoint for the drive in the config.json has to match the rclone mount point on the system otherwise it will not work.

Sorry just noticed there's a mountpoint variable :)



#22 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 05:15 PM

if i "mountPoint": null, change "mountPoint": /mnt/unionfs ,

 

do i stilll need credencials and drive id ?

 

 

Yes, the script needs a way to connect to the google drive api and query for changes. 

 

The script uses mountPoint to generate the complete system path and let emby know to go and scan that directory. Ex. From google drive api what we get is that something changed in folderId/Media/Movie/SomeMovieFolder. The script needs to convert that to /mnt/myMount/Media/Movie/SomeMovieFolder or in windows D:/Media/Movie/SomeMovieFolder.

 

Hope that helps.



#23 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 05:15 PM

do you have fully working sample file without credencials its bit confusig .



#24 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 05:24 PM

do you have fully working sample file without credencials its bit confusig .

 

Sure,

  • Are you using Windows or Linux?
  • How are you mounting the drive? (rclone or something else)
  • What is your mount point and or letter (if windows)?
  • Is this for a Team Drive (Shared Drive) or a Personal Drive?


#25 M3th0s OFFLINE  

M3th0s

    Advanced Member

  • Members
  • 105 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 05:33 PM

 

Sure,

  • Are you using Windows or Linux?
  • How are you mounting the drive? (rclone or something else)
  • What is your mount point and or letter (if windows)?
  • Is this for a Team Drive (Shared Drive) or a Personal Drive?

 

Hello again

 

I keep getting

 

  File "scan.py", line 19
    print(f'Starting scan for: {drive.driveId}')
                                              ^
SyntaxError: invalid syntax
 

Working on a headless machine, so changed that to true. Config json is there, but no dice.

 

Any help appreciated :)


Edited by M3th0s, 09 March 2020 - 05:36 PM.


#26 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 05:39 PM

Sure,

  • Are you using Windows or Linux? Linux
  • How are you mounting the drive? (rclone or something else) rclone 
  • What is your mount point and or letter (if windows)? /mnt/unionfs
  • Is this for a Team Drive (Shared Drive) or a Personal Drive? team drive 

Edited by tattoomees, 09 March 2020 - 05:44 PM.


#27 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 05:51 PM


Hello again

I keep getting



File "scan.py", line 19
print(f'Starting scan for: {drive.driveId}')
^
SyntaxError: invalid syntax


Working on a headless machine, so changed that to true. Config json is there, but no dice.

Any help appreciated :)


Make sure you are using python 3 or above.

#28 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 05:56 PM

atprm any ideas of getting sample config file please?



#29 M3th0s OFFLINE  

M3th0s

    Advanced Member

  • Members
  • 105 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 06:27 PM

Make sure you are using python 3 or above.

I am definitely using python3

 

EDIT:

Traceback (most recent call last):
  File "scan.py", line 1, in <module>
    from googleDriveService import getChanges
  File "/opt/emby_gdrive_autoscan/googleDriveService.py", line 4, in <module>
    from googleapiclient.discovery import build
ModuleNotFoundError: No module named 'googleapiclient'

Edited by M3th0s, 09 March 2020 - 06:28 PM.


#30 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 06:37 PM

hi M3th0s did you installed requirements python3 -m pip install -r requirements.txt

 
did u figured out config.json ? 


#31 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 06:39 PM

 

Sure,

  • Are you using Windows or Linux? Linux
  • How are you mounting the drive? (rclone or something else) rclone 
  • What is your mount point and or letter (if windows)? /mnt/unionfs
  • Is this for a Team Drive (Shared Drive) or a Personal Drive? team drive 

 

 

Here is a good example:

{
    "general": {
        "scanIntervalMinutes": 3,
        "headless": true
    },
    "drives": [
        {
            "driveId": "0AAH4-DGT097sZZZZZZZZ",
            "currentPageToken": null,
            "pageSize": 100,
            "changesStartDate": "2020-03-09T00:00:00",
            "credentialsPath": "credentials.json",
            "includeItemsFromAllDrives": true,
            "supportsAllDrives": true,
            "includeRemoved": true,
            "physicalDriveMountLetter": "/mnt/unionfs",
            "mountPoint": null,
            "retries": 3
        }
    ],
    "emby" : {
        "apiKey": "3509a0589231423ea896a3153ee44444",
        "ip": "localhost",
        "port": "8096",
        "protocol": "http",
        "retries": 3
    }
}


#32 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 06:40 PM

 

I am definitely using python3

 

EDIT:

Traceback (most recent call last):
  File "scan.py", line 1, in <module>
    from googleDriveService import getChanges
  File "/opt/emby_gdrive_autoscan/googleDriveService.py", line 4, in <module>
    from googleapiclient.discovery import build
ModuleNotFoundError: No module named 'googleapiclient'

 

 

You need to install requirements:  

pip3 install -r requirements.txt


#33 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 07:35 PM

thanks it scans but i moved folder to it and Current token: 567748

No changes found.
 any ideas ?


#34 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 07:39 PM


thanks it scans but i moved folder to it and Current token: 567748
No changes found.
any ideas ?


Is probably getting filter due to the changesStartDate settings. Also get the latest code, I fixed a bug related to that a few minutes ago.

#35 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 07:41 PM

how i can get latest code ? via git update ?



#36 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 07:43 PM

how i can get latest code ? via git update ?


Yes, google git pull.

#37 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 07:45 PM

getting an error
error: Your local changes to the following files would be overwritten by merge:
        config.json


#38 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 07:48 PM


getting an error
error: Your local changes to the following files would be overwritten by merge:
config.json


Make a copy of your config.json file in another directory, use the git pull -f to force the update, copy the config.json back and you should be good to got.

#39 tattoomees OFFLINE  

tattoomees

    Advanced Member

  • Members
  • 47 posts
  • Local time: 03:26 PM

Posted 09 March 2020 - 07:55 PM

still same error when i run git pull -f



#40 atrpm OFFLINE  

atrpm

    Advanced Member

  • Members
  • 66 posts
  • Local time: 11:26 AM

Posted 09 March 2020 - 08:40 PM

still same error when i run git pull -f


Just clone the repo again, in a different directory





Also tagged with one or more of these keywords: GDrive, Autoscan, Scan, Google, Drive

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users