Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hekmon/rcgdip
RClone GDrive Inotify for Plex
https://github.com/hekmon/rcgdip
google-drive google-drive-api inotify plex plex-api plex-media-server plex-server rclone rclone-crypt rclone-mount synchro synchronization
Last synced: about 1 month ago
JSON representation
RClone GDrive Inotify for Plex
- Host: GitHub
- URL: https://github.com/hekmon/rcgdip
- Owner: hekmon
- License: mit
- Created: 2022-01-27T00:17:44.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-28T18:52:44.000Z (over 2 years ago)
- Last Synced: 2024-11-05T21:45:07.519Z (about 2 months ago)
- Topics: google-drive, google-drive-api, inotify, plex, plex-api, plex-media-server, plex-server, rclone, rclone-crypt, rclone-mount, synchro, synchronization
- Language: Go
- Homepage:
- Size: 951 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rcgdip
RClone GDrive Inotify for Plex is a rclone companion for your plex server using a rclone mount on Google Drive. It will monitor changes on GDrive and launch targeted scans on your matching Plex libraries to automatically refresh your plex libraries as soon as your rclone drive mount can see the modifications.
It supports (directly from your rclone config file):
* [x] GDrive backend (scope `drive` only for now, `drive.file` support planned, see [GDrive scope](#gdrive-scope) for more details)
* [x] Custom root folder ID
* [x] Team Drives
* [x] Crypt backend on top of your GDrive backend for path decryption
* [x] OAuth2 token
* [ ] Service Account (planned)- [rcgdip](#rcgdip)
- [Installation](#installation)
- [Get the software](#get-the-software)
- [From official releases](#from-official-releases)
- [From source](#from-source)
- [Configure your system](#configure-your-system)
- [Execution environment](#execution-environment)
- [systemd service](#systemd-service)
- [Mono instance](#mono-instance)
- [Multi instances](#multi-instances)
- [Configure rcgdip](#configure-rcgdip)
- [Mono instance](#mono-instance-1)
- [Multi instances](#multi-instances-1)
- [Start rcgdip](#start-rcgdip)
- [Mono instance](#mono-instance-2)
- [Multi instances](#multi-instances-2)
- [Things to consider](#things-to-consider)
- [rclone mount config values](#rclone-mount-config-values)
- [deletion events](#deletion-events)
- [rclone version](#rclone-version)
- [scan list optimizations](#scan-list-optimizations)
- [same path optimization](#same-path-optimization)
- [same ancester optimization](#same-ancester-optimization)
- [GDrive scope](#gdrive-scope)
- [change the original rclone config](#change-the-original-rclone-config)
- [keep the original rclone config](#keep-the-original-rclone-config)
- [db backup](#db-backup)
- [Mono instance](#mono-instance-3)
- [Multi instances](#multi-instances-3)
- [Sponsoring](#sponsoring)## Installation
### Get the software
#### From official releases
Download a binary from the [releases page](https://github.com/hekmon/rcgdip/releases).
#### From source
```bash
env GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X 'main.appVersion=$(git describe)'" -trimpath -o rcgdip github.com/hekmon/rcgdip/cmd
```### Configure your system
While technically rcgdip can run anywhere, it is recommended to run it alongside your plex server and your rclone mount.
#### Execution environment
```bash
sudo useradd --home-dir '/var/lib/rcgdip' --create-home --system --shell '/usr/sbin/nologin' 'rcgdip'
sudo chown 'rcgdip:' '/var/lib/rcgdip'
sudo chmod 750 '/var/lib/rcgdip'
sudo wget 'https://github.com/hekmon/rcgdip/releases/download/v0.4.0/rcgdip_linux_amd64' -O '/usr/local/bin/rcgdip'
sudo chmod +x '/usr/local/bin/rcgdip'
# adapt to the group of your rclone config file, here the rclone config file is owned (and readable) by the rclone group
sudo usermod -a -G 'rclone' 'rcgdip'
```#### systemd service
If your rclone mount is started with systemd too (for example using [rclonemount](https://github.com/hekmon/rclonemount)), add it to `After=` and `BindsTo=` as well. Eg:
```ini
[Unit]
[email protected]
[email protected]
```Add it add while `systemd edit ...` on the next parts.
##### Mono instance
```bash
sudo wget 'https://raw.githubusercontent.com/hekmon/rcgdip/v0.4.0/systemd/rcgdip.service' -O '/etc/systemd/system/rcgdip.service'
sudo systemctl edit rcgdip.service # add your rclonemount unit as stated previously
sudo systemctl daemon-reload # not needed if you did systemctl edit
```##### Multi instances
Optional. If you intend to run multiples instances. Each instance must have a custom edit.
```bash
sudo wget 'https://raw.githubusercontent.com/hekmon/rcgdip/v0.4.0/systemd/rcgdip%40.service' -O '/etc/systemd/system/[email protected]'
sudo systemctl edit [email protected] # add the related rclonemount unit as stated previously
sudo systemctl edit [email protected] # add the (other) related rclonemount unit as stated previously
# ... repeat for each instance (1 rclone mount == 1 rcgdip instance)
sudo systemctl daemon-reload # not needed if you did systemctl edit
```### Configure rcgdip
Check the [plex documentation](https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/) to recover your Plex token.
#### Mono instance
Adapt the values to yours.
```bash
confFile="/etc/default/rcgdip"
cat <