Skip to content

by275/plex_autoscan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Plex Autoscan

A maintained fork of Plex Autoscan

Introduction

Plex Autoscan is a python script that assists in the importing of Sonarr, Radarr, and Lidarr downloads into Plex Media Server.

It does this by creating a web server to accept webhook requests from these apps, and in turn, sends a scan request to Plex. Plex will then only scan the parent folder (i.e. season folder for TV shows, movie folder for movies, and album folders for music) of the media file (versus scanning the entire library folder).

In addition to the above, Plex Autoscan can also monitor Google Drive for updates. When a new file is detected, it is checked against the Plex database and if this file is missing, a new scan request is sent to Plex (see section below).

Plex Autoscan is installed on the same server as the Plex Media Server.

Requirements

  • Ubuntu/Debian
  • Python 3.8 or higher (sudo apt install python3 python3-pip).
  • requirements.txt modules (see below).

Installation

  1. cd /opt
  2. git clone https://github.com/by275/plex_autoscan
  3. cd plex_autoscan
  4. sudo python -m pip install -r requirements.txt
  5. python3 -m autoscan sections - Run once to generate a default config.json file.
  6. /opt/plex_autoscan/config.json - Configure settings (do this before moving on).
  7. sudo cp /opt/plex_autoscan/system/autoscan.service /etc/systemd/system/
  8. sudo systemctl daemon-reload
  9. sudo systemctl enable autoscan.service
  10. sudo systemctl start autoscan.service

Installation with PIP

New in v0.1.0

With a recent version of pip and git, it can be installed by

python3 -m pip install git+https://github.com/by275/plex_autoscan.git

and run with autoscan. Tags/Branches/Hashes can be specified like this:

python3 -m pip install git+https://github.com/by275/plex_autoscan.git@v0.1.0
python3 -m pip install git+https://github.com/by275/plex_autoscan.git@feat

Please find more details here.

Configuration

Configuration Guide

Setup

Setup instructions to connect Sonarr/Radarr/Lidarr to Plex Autoscan.

Sonarr

  1. Sonarr -> "Settings" -> "Connect".

  2. Add a new "Webhook".

  3. Add the following:

    1. Name: Plex Autoscan

    2. On Grab: No

    3. On Download: Yes

    4. On Upgrade: Yes

    5. On Rename: Yes

    6. Filter Series Tags: Leave Blank

    7. URL: Your Plex Autoscan Webhook URL

    8. Method:POST

    9. Username: Leave Blank

    10. Password: Leave Blank

  4. The settings will look like this:

    Sonarr Plex Autoscan

  5. Click "Save" to add Plex Autoscan.

Radarr

  1. Radarr -> "Settings" -> "Connect".

  2. Add a new "Webhook".

  3. Add the following:

    1. Name: Plex Autoscan

    2. On Grab: No

    3. On Download: Yes

    4. On Upgrade: Yes

    5. On Rename: Yes

    6. Filter Movie Tags: Leave Blank

    7. URL: Your Plex Autoscan Webhook URL

    8. Method:POST

    9. Username: Leave Blank

    10. Password: Leave Blank

  4. The settings will look like this:

    Radarr Plex Autoscan

  5. Click "Save" to add Plex Autoscan.

Lidarr

  1. Lidarr -> "Settings" -> "Connect".

  2. Add a new "Webhook" Notification.

  3. Add the following:

    1. Name: Plex Autoscan

    2. On Grab: No

    3. On Album Import: No

    4. On Track Import: Yes

    5. On Track Upgrade: Yes

    6. On Rename: Yes

    7. Tags: Leave Blank

    8. URL: Your Plex Autoscan Webhook URL

    9. Method:POST

    10. Username: Leave Blank

    11. Password: Leave Blank

  4. The settings will look like this:

    Radarr Plex Autoscan

  5. Click "Save" to add Plex Autoscan.

About

A maintained fork of Plex Autoscan

Resources

License

Stars

Watchers

Forks

Languages

  • Python 97.7%
  • Dockerfile 2.3%