Skip to content

ListSync automates the import of your IMDB & Trakt lists into Overseerr & Jellyseerr, simplifying your movie management.

Notifications You must be signed in to change notification settings

Woahai321/list-sync

Repository files navigation

🍿 ListSync - Bridge Your Watchlist & Media Server 🎬

ListSync Logo GitHub last commit GitHub issues GitHub stars GitHub release Docker Python Website LinkedIn

Welcome to the ListSync Tool! πŸŽ‰

This powerful tool automates the import of your carefully curated IMDB and Trakt lists into Overseerr, transforming movie and TV show management into a breeze. Whether you're a cinephile, a librarian for multiple collections, or someone enchanted by the magic of automation, this tool is here to simplify your experience.

πŸ“œ Table of Contents

  1. Demo
  2. Key Features
  3. Compatibility
  4. Getting Started
  5. Obtaining List IDs
  6. How it Works
  7. Troubleshooting
  8. Roadmap
  9. Notes
  10. Contact
  11. Contributing
  12. License
  13. Fun Zone: Get to Know Your Tool!
  14. Legal Disclaimer

🎬 Demo

Bot In Action


πŸ”‘ Key Features

Feature Status
List Management
- Simultaneous List Import βœ…
- Support for IMDB & Trakt Lists βœ…
- Multi-page Trakt List Fetching βœ…
- List Management Menu βœ…
Media Processing
- Fetch & Import Movies & TV Shows βœ…
- Identify Media Already Requested βœ…
- Identify Media Already Available βœ…
Performance
- Thread Pool Executor for Concurrent Processing βœ…
Configuration & Security
- Encrypted Configuration Storage βœ…
- Configurable Sync Interval βœ…
User Experience
- Real-time Detailed Logging βœ…
- Graceful Exit During Sleep βœ…
- Dry Run Mode βœ…

πŸ“Š Compatibility

Application Status Notes
Overseerr βœ… Supported Full functionality with Overseerr
Jellyseerr βœ… Supported Full functionality with Jellyseerr
Radarr βœ… Supported Started with supporting movies
Sonarr βœ… Supported Now also supports TV shows

Supported List Services

Service Status Notes
IMDB βœ… Supported Currently supported
Trakt βœ… Supported Currently supported

Future List Services

Service Status Notes
Letterboxd ❌ Not Yet Future support planned

πŸš€ Getting Started

Installation Methods

Installation Method Command Notes
Docker sudo docker pull ghcr.io/woahai321/list-sync:main && sudo docker run -it --rm -v "$(pwd)/data:/usr/src/app/data" -e TERM=xterm-256color ghcr.io/woahai321/list-sync:main Easy containerized deployment
Python pip install -r requirements.txt && python add.py Requires Python 3.7+
Poetry poetry install && poetry run python add.py Simplifies dependency management

Docker (Recommended)

To ensure the tool runs consistently across different environments, use Docker.

  1. Install Docker:

    Ensure Docker is installed on your system. If it's not, follow the installation guide for your operating system.

  2. Create a working directory:

    Make a folder to house the application's log files (e.g. list-sync)

  3. Pull and Run the Docker Image:

    Navigate to your directory and use the following one-liner to pull and run the Docker image:

    sudo docker pull ghcr.io/woahai321/list-sync:main && sudo docker run -it --rm -v "$(pwd)/data:/usr/src/app/data" -e TERM=xterm-256color ghcr.io/woahai321/list-sync:main
  4. Use this command for subsequent runs:

    Use the following command to run the Docker image:

    sudo docker run -it --rm -v "$(pwd)/data:/usr/src/app/data" -e TERM=xterm-256color ghcr.io/woahai321/list-sync:main

Standard Python Environment

If you prefer running the tool in a standard Python environment, follow these steps:

  1. Clone the Repository and Navigate to the Directory:

    git clone https://github.com/woahai321/list-sync.git
    cd list-sync
  2. Install Dependencies:

    Make sure you have Python 3.9 or higher installed, then install the required dependencies:

    pip install -r requirements.txt
  3. Run the Script:

    python add.py

Poetry

Poetry offers several advantages over traditional Python dependency management methods:

  • Ease of Use: Simplifies the installation process with a single command and manages virtual environments automatically.
  • Version Control: Tracks exact package versions, making it easier to reproduce environments and avoid version drift.
  • Security: Integrates with security tools to scan for vulnerabilities in dependencies.
  • Cross-Platform Compatibility: Ensures consistent behaviour across different operating systems.

Installation and Usage with Poetry

  1. Install Poetry:

    curl -sSL https://install.python-poetry.org | python3 -
  2. Clone the Repository and Navigate to the Directory:

    git clone https://github.com/woahai321/list-sync.git
    cd list-sync
  3. Install Dependencies:

    Make sure you have Python 3.9 or higher installed, then install the required dependencies:

    poetry install
  4. Run the Script:

    poetry run python add.py

Alternatively, use devcontainer to bootstrap a pre-built dev environment: DevContainer documentation

Configuration

  1. Run the Script and Fill in the Required Details When Prompted:

    • Overseerr URL: Your Overseerr instance's base URL.
    • API Key: The API key from your Overseerr account.
    • IMDB List ID(s): The ID(s) of the IMDB list(s) you want to import.
    • Trakt List ID(s): The ID(s) of the Trakt list(s) you want to import.
  2. Saving Configuration:

    • The script will prompt you to enter a password to encrypt your configuration.
    • This encrypted configuration will be saved and reused for future imports.

πŸ” Obtaining List IDs

IMDB List ID

To obtain an IMDB list ID:

  1. Navigate to your IMDB list.
  2. Look at the URL. It should be in the format: https://www.imdb.com/list/ls012345678/
  3. The list ID is the ls number. In this example, it would be ls012345678.

Trakt List ID

To obtain a Trakt list ID:

  1. Go to your Trakt list.
  2. Look for the blue "Share" button, located in the list
  3. trakt-help
  4. Hover over it, it should say "Copy Link".
  5. The copied link will be in the format: https://trakt.tv/lists/12345678
  6. The list ID is the number at the end. In this example, it would be 12345678.

Adding Multiple List IDs

When inputting list IDs, you can add multiple IDs by separating them with commas.

πŸ”Ž How it Works

The ListSync Tool is a Python-based application that leverages several libraries and the Overseerr API to seamlessly integrate your IMDB and Trakt lists with Overseerr. Here's a detailed breakdown of its functionality:

  1. Authentication and Security:

    • Credentials are encrypted using the cryptography library's Fernet symmetric encryption.
    • Encrypted data is stored locally, ensuring your sensitive information remains protected.
  2. List Fetching and Parsing:

    • For IMDB lists:
      • Utilizes requests to fetch the HTML content of the IMDB list.
      • Employs BeautifulSoup to parse the HTML and extract structured data.
    • For Trakt lists:
      • Nearly the same process 1:1
      • Parses the HTML response to extract media information.
  3. Overseerr Integration:

    • Interacts with the Overseerr API using the requests library.
    • Implements minimal rate limiting to prevent overwhelming the Overseerr server and webhooks.
    • Performs media searches, status checks, and request submissions via API endpoints.
  4. Intelligent Processing:

    • Differentiates between movies and TV shows for appropriate handling.
    • For TV shows, it determines the number of seasons and requests all available seasons.
    • Checks if media is already available or requested before submitting new requests.
  5. Error Handling and Logging:

    • Implements comprehensive error handling for network issues, API errors, and parsing problems.
    • Utilises Python's logging module to maintain detailed logs for troubleshooting.
    • Provides real-time status updates in the console using the colorama and halo libraries.
  6. Periodic Syncing:

    • Offers the option to set up recurring syncs at user-defined intervals.
    • Implements a sleep mechanism that can be interrupted for on-demand actions.
  7. User Interface:

    • Presents a user-friendly command-line interface with color-coded outputs.
    • Displays ASCII art and banners for an engaging user experience.
    • Provides summary statistics after each sync operation.

πŸ›  Troubleshooting

Common Issues and Solutions

  1. Invalid API Credentials

    • Symptom: Error messages related to API authentication or 401 Unauthorised responses.
    • Solution:
      • Double-check your Overseerr URL and API key in the Overseerr settings.
      • Ensure there are no trailing spaces in the URL or API key.
      • Try regenerating your API key in Overseerr and updating the script's configuration.
  2. Script Crashes or Unexpected Behavior

    • Symptom: Script terminates unexpectedly or produces unexpected results.
    • Solution:
      • Check the overseerr_sync.log file in the ./data directory for detailed error messages.
      • Look for Python tracebacks which can pinpoint the exact line causing the issue.
      • Ensure all required Python libraries are installed and up-to-date.
      • Verify that your Python version meets the minimum requirements (Python 3.7+).
  3. Failed to Fetch List

    • Symptom: Error messages indicating failure to retrieve IMDB or Trakt lists.
    • Solution:
      • Verify that the list ID is correct and the list is publicly accessible.
      • Check your internet connection and firewall settings.
      • For IMDB lists, ensure the list URL follows the format: https://www.imdb.com/list/ls012345678/
      • For Trakt lists, confirm the list URL is in the format when copied: https://trakt.tv/lists/1234567
  4. Decryption Error

    • Symptom: Unable to decrypt configuration or "Incorrect password" error.
    • Solution:
      • Ensure you're entering the correct password used during initial setup.
      • If you've forgotten the password, delete the config.enc file in the ./data directory and run the script again to reconfigure.
      • Check file permissions to ensure the script has read/write access to the ./data directory.
  5. Rate Limiting Issues

    • Symptom: Frequent "Too Many Requests" errors or slow processing.
    • Solution:
      • Increase the delay between requests by adjusting the time.sleep() value in the script.
      • Consider reducing the size of your lists or splitting them into smaller chunks.
  6. Media Not Found in Overseerr

    • Symptom: Many items reported as "Not found" during processing.
    • Solution:
      • Verify that Overseerr is properly connected to your media sources (Radarr/Sonarr).
      • Check if the titles in your lists match exactly with how they appear in Overseerr's search.
      • For TV shows, try using the original title rather than localised versions.

If you encounter persistent issues not covered here, please remeber this is in beta development and you will find bugs.


πŸ›€οΈ Roadmap

Small Tasks

  • Enhanced Error Messages: Improve error descriptions for easier troubleshooting.
  • Advanced Error Handling: Improved error messages for clearer troubleshooting.
  • Secure User Profiles: Ability to save and load Overseerr details from an encrypted configuration file.
  • Real-time Progress Updates: Real-time progress updates for importing movies and TV shows.

Medium Tasks

  • Integration with Other Services: Trakt
  • Interruptible Sleep Mode: Functionality for interrupting sleep mode for on-demand sync or clean exit.
  • Configuration Management: Save and reuse configuration setups.
  • Batch Processing: Enable batch processing for multiple lists simultaneously.
  • Support for TV Shows: Extend functionality to import TV shows from IMDB and Trakt lists.
  • Database Integration: Implement a real database to track sync history and metrics, not just a file.
  • Integration with Other Services: Letterboxd, etc.
  • Customisation Options: Allow users to fully customise the UI and behaviour of the tool.

Big Tasks

  • Automated Syncing: Schedule automatic syncing between IMDB/Trakt and Overseerr.
  • Movie Status Identification: Identify movies already available, already requested, or to be requested.
  • TV Series Status Identification: Identify TV series already available, already requested, or to be requested.
  • Encrypted Configuration Storage: Implemented encrypted storage for Overseerr API credentials.
  • External Notifications: Add webhook notifications for sync status and errors.
  • Web Dashboard: Create a web-based interface for more user-friendly interaction.
  • Advanced Analytics Dashboard: Provide detailed analytics and insights into the sync operations.
  • Machine Learning Suggestions: Use ML to suggest movies and TV shows based on user preferences and history.

πŸ“‹ Notes

  • Security Best Practices: Please read scripts you find online before running them.
  • Security Best Practices (Cont.): Always keep your API credentials secure.
  • Rate Limiting Awareness: Be mindful of Overseerr's rate limiting policies during imports.
  • Permission Compliance: Only import and manage media you have the rights to handle.

πŸ“ž Contact

Need help or have questions? Don't hesitate to raise an issue on this repo; we're here to help!


🀝 Contributing

We appreciate your contributions! Here's how to get involved:

  1. Fork the repository on GitHub.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and commit them with descriptive messages.
  4. Submit a pull request for review.

πŸ“„ License

This project is licensed under the MIT License. Review the LICENSE file for more details.


πŸŽ‰ Fun Zone: Get to Know Your Tool!

Buckle up for some fun insights and interesting facts! Your ListSync Tool is more than just software; it's your new best friend in movie and TV show management.

πŸ€“ Fun Facts

  • Cinema History: The first drive-in theater opened in 1933 in New Jersey. πŸš—πŸŽ₯ Source
  • Legendary Cameo: Alfred Hitchcock made cameo appearances in 39 of his 52 surviving major films! 🎭 Source
  • Oscar Records: Walt Disney holds the record for the most Oscars with 22 wins and 59 nominations. πŸ† Source
  • Expensive Set: "Pirates of the Caribbean: On Stranger Tides" is one of the most expensive movies ever made, with a budget of $379 million. πŸ΄β€β˜ οΈ Source
  • Film Length: The longest movie ever made is the experimental film "Modern Times Forever," which runs for 240 hours (10 days). 🎬 Source
  • Box Office King: "Avengers: Endgame" surpassed "Avatar" to become the highest-grossing film of all time. πŸ’° Source

πŸ›‘οΈ Legal Disclaimer

Using the ListSync Tool responsibly and in accordance with Overseerr's, IMDB's & Trakt's Terms of Service (ToS) and policies is crucial! Here are some key points:

  1. Compliance with Overseerr and IMDB:

    • Users must adhere to the ToS of all third parties in use.
  2. No Spamming or Abuse:

    • This tool should not be used for spam or unauthorised import activities. Respect the guidelines and policies of the platforms.
  3. Managing Rate Limits:

    • Use the tool thoughtfully to avoid hitting rate limits set by Overseerr. Excessive usage can lead to rate limiting or bans.
  4. User Consent:

    • Ensure you have the necessary permissions to import and manage media from IMDB lists.
  5. Security:

    • Protect your API credentials and never share them publicly.
  6. Responsibility:

    • Users are responsible for their actions while using this tool. The creators of the ListSync Tool are not liable for any misuse or legal consequences arising from its use.