Introduction
Managing a media library can be a daunting task, especially when dealing with large collections of movies, TV shows, music, and books. Traditional methods of scanning and updating libraries often fall short in terms of efficiency and real-time updates. Enter Autoscan, a powerful tool that replaces the default behavior of Plex and Emby for picking up file changes on the file system. Autoscan integrates seamlessly with popular media managers like Sonarr, Radarr, Readarr, Lidarr, and Google Drive to fetch changes in near real-time. This comprehensive guide will explore what Autoscan is, its features, installation, and how to configure it to revolutionize your media library management.
What is Autoscan?
Autoscan is a rewrite of the original Plex Autoscan, developed in the Go programming language. It offers a more modular approach, making it easier to extend and integrate with various media management tools. Autoscan improves upon the original Plex Autoscan by adding support for multiple platforms, including Plex, Emby, and Jellyfin, and introducing advanced features like Google Drive integration and path rewriting.
Key Features of Autoscan
Integration with Sonarr, Radarr, Readarr, and Lidarr: Automatically updates your media library when new content is added.
Google Drive Integration: Monitors changes in Shared Drives in near real-time.
Support for Multiple Media Servers: Works with Plex, Emby, and Jellyfin.
Automatic Path Rewriting: Translates file paths between different environments and containers.
Pre-compiled Binaries and Docker Support: Easy installation on Linux and macOS, with Docker image availability.
Why Use Autoscan?
Near Real-Time Updates
Autoscan provides near real-time updates to your media library by directly integrating with your media managers and cloud storage. This ensures that new content is quickly and accurately reflected in your media servers.
Simplified Management
With Autoscan, you no longer need to manually trigger library scans or worry about missed updates. Autoscan handles all the heavy lifting, allowing you to focus on enjoying your media.
Cross-Platform Support
Whether you use Plex, Emby, or Jellyfin, Autoscan has you covered. It supports multiple media servers and can send scans to multiple instances, making it a versatile solution for any media setup.
Modular and Extensible
Autoscan's modular architecture makes it easy to extend and customize. Future updates and integrations are simplified, ensuring that Autoscan remains a cutting-edge tool for media library management.
Comparison to Plex Autoscan
Enhanced Google Drive Integration
Autoscan's Google Drive integration, known as A-Train, supports Shared Drives and requires Service Account authentication. However, it does not support RClone Crypt remotes.
Improved Efficiency
Unlike Plex Autoscan, Autoscan does not rely on manual trash deletion when connected to Plex. Users should re-enable the "Empty trash automatically after every scan" setting in Plex for optimal performance.
Additional Features
Support for Plex Music Libraries: Autoscan extends its functionality to include Plex music libraries.
Extended Support for Emby and Jellyfin: Autoscan can send scans to multiple Plex, Emby, and Jellyfin servers, enhancing its versatility.
Installing Autoscan
Pre-compiled Binaries
Autoscan offers pre-compiled binaries for both Linux and macOS for each official release.
Download and Install:
Download the appropriate binary from the Autoscan GitHub releases page.
Extract the binary and place it in a directory included in your system's PATH.
Make the binary executable:
bash
chmod +x autoscan |
Building from Source
To build the Autoscan binary yourself, ensure your machine meets the following requirements:
Runs Linux, macOS, or WSL2
Has Go installed (1.16 or later)
Steps:
Clone the Autoscan repository and navigate to it:
bash
git clone https://github.com/cloudbox/autoscan.git cd autoscan |
Build the binary:
bash
go build -o autoscan ./cmd/autoscan |
Move the binary to a directory in your system's PATH for global availability:
bash
sudo mv autoscan /usr/local/bin/ |
Using Docker
Autoscan also provides a Docker image for easy deployment.
Running the Docker Container:
bash
docker run \ --name=autoscan \ -e "PUID=1000" \ -e "PGID=1000" \ -p 3030:3030 \ -v "/path/to/config:/config" \ -v "/mnt/unionfs:/mnt/unionfs:ro" \ --restart=unless-stopped \ -d cloudb0x/autoscan |
Configuring Autoscan
Autoscan is configured using a YAML file, typically named config.yml. The configuration file includes settings for authentication, triggers, processor, and targets.
Example Configuration
config.yml:
yaml
# Authentication authentication: username: "hello there" password: "general kenobi" # Server Settings port: 3030 # Triggers triggers: manual: priority: 5 rewrite: - from: "^/Media/" to: "/mnt/unionfs/Media/" a-train: priority: 5 rewrite: - from: "^/Media/" to: "/mnt/unionfs/Media/" drives: - id: "0A1xxxxxxxxxUk9PVA" rewrite: - from: "^/TV/" to: "/mnt/unionfs/TV/" sonarr: - name: "sonarr-docker" priority: 2 rewrite: - from: "/tv/" to: "/mnt/unionfs/Media/TV/" # Processor minimum-age: "30m" anchors: - "/mnt/unionfs/drive1.anchor" - "/mnt/unionfs/drive2.anchor" # Targets targets: plex: - url: "https://plex.domain.tld" token: "PLEX_API_TOKEN" rewrite: - from: "/mnt/unionfs/Media/" to: "/data/" emby: - url: "https://emby.domain.tld" token: "EMBY_API_TOKEN" rewrite: - from: "/mnt/unionfs/Media/" to: "/data/" |
Advanced Configuration
Path Rewriting
Path rewriting is crucial for translating file paths between different environments. This feature allows you to ensure that paths used by triggers, Autoscan, and targets are correctly mapped.
Example Rewriting Rules:
yaml
triggers: sonarr: - rewrite: - from: "/tv/" to: "/mnt/unionfs/Media/TV/" targets: plex: - rewrite: - from: "/mnt/unionfs/Media/" to: "/data/" |
Handling Network Requests
Autoscan can handle network requests from various sources, ensuring seamless integration with your media management tools.
Example Network Request Handling:
yaml
triggers: a-train: priority: 5 rewrite: - from: "^/Media/" to: "/mnt/unionfs/Media/" drives: - id: "0A1xxxxxxxxxUk9PVA" rewrite: - from: "^/TV/" to: "/mnt/unionfs/TV/" |
Best Practices for Using Autoscan
Regular Updates
Keep Autoscan and its dependencies updated to benefit from the latest features and bug fixes.
Path Consistency
Ensure that path rewriting rules are consistent and accurately map paths between triggers, Autoscan, and targets.
Use Docker for Isolation
Deploying Autoscan using Docker can provide better isolation and ease of management, especially in complex environments.
Monitor Logs
Regularly monitor Autoscan logs for any errors or issues. This helps in identifying and resolving problems promptly.
Conclusion
Autoscan is a powerful and versatile tool that revolutionizes media library management. By integrating with popular media managers and providing real-time updates, Autoscan ensures that your media libraries are always up-to-date and accurately reflect the content available. Whether you're using Plex, Emby, or Jellyfin, Autoscan offers a seamless and efficient solution to enhance your media management experience. With detailed installation and configuration instructions, this guide has equipped you with the knowledge to get started and make the most of Autoscan.
Key Takeaways
What is Autoscan?
Autoscan is a Go-based rewrite of Plex Autoscan, providing a more modular approach.
Supports Plex, Emby, Jellyfin, and integrates with Sonarr, Radarr, Readarr, Lidarr, and Google Drive.
Key Features:
Integration: Automatic updates for media libraries with new content from Sonarr, Radarr, etc.
Google Drive: Monitors changes in Shared Drives in near real-time.
Multiple Media Servers: Supports Plex, Emby, and Jellyfin.
Path Rewriting: Translates file paths between different environments and containers.
Installation: Pre-compiled binaries, Docker support, and building from source.
Why Use Autoscan?
Real-Time Updates: Ensures new content is quickly reflected in media servers.
Simplified Management: Eliminates the need for manual scans.
Cross-Platform Support: Works with multiple media servers.
Modular and Extensible: Easy to extend and customize.
Comparison to Plex Autoscan:
Enhanced Google Drive Integration: Supports Shared Drives but not RClone Crypt remotes.
Efficiency: Avoids manual trash deletion; re-enable Plex's auto trash setting.
Additional Features: Supports Plex music libraries and extended support for Emby and Jellyfin.
Installation:
Pre-compiled Binaries: Available for Linux and macOS.
Building from Source: Requires Go (1.16+), runs on Linux, macOS, or WSL2.
Using Docker: Easy deployment with provided Docker image.
Configuration:
Uses a YAML file (config.yml) for settings, including authentication, triggers, processor, and targets.
Path Rewriting: Crucial for translating file paths between environments.
Best Practices:
Keep Autoscan and dependencies updated.
Ensure consistent path rewriting rules.
Use Docker for better isolation.
Monitor logs for errors.
FAQs
What is Autoscan?
Autoscan is a tool that integrates with media managers like Sonarr, Radarr, and Plex to provide real-time updates to your media library without relying on the file system for changes.
How does Autoscan differ from Plex Autoscan?
Autoscan is a rewrite of Plex Autoscan with added support for multiple media servers, Google Drive integration, and a more modular architecture.
Can Autoscan be used with Emby and Jellyfin?
Yes, Autoscan supports both Emby and Jellyfin, allowing you to send scan requests to multiple instances of these media servers.
How do I install Autoscan?
Autoscan can be installed using pre-compiled binaries, built from source, or deployed using Docker. Detailed installation instructions are provided in this guide.
What are path rewriting rules in Autoscan?
Path rewriting rules translate file paths between different environments and containers, ensuring that all components of Autoscan can access the necessary files.
Can I use Autoscan with Google Drive?
Yes, Autoscan includes Google Drive integration through a module called A-Train, which supports monitoring changes in Shared Drives.
Comments