CineSync is a Python & Bash based library management system designed to facilitate the organization of debrid libraries for Shows efficiently, without the need for Sonarr. Users downloading from DMM Manager can easily sort their library into seasons, whether it's a single file or a folder. CineSync smoothly organizes the library and creates symbolic links, giving users full control over their data locally.
This project will seamlessly integrate with any files that need to be organized (TV shows for now). This project will also work with Zurg. Special thanks to yowmamasita.
CineSync works by creating symbolic links from the source directory to the destination directory and organizing them according to the user's preferences. This allows users to maintain a well-structured library without physically moving or duplicating the original files.
- Library Organization: Easily sort your library into seasons, regardless of file or folder structure.
- Symbolic Link Creation: Create symbolic links to organize your library without moving or duplicating files.
- Real-Time Monitoring for Files: Monitor the watch directory for any new files and automatically create symbolic links for them, ensuring your library stays updated in real-time.
- Support for Single Symlinks Creation: CineSync now supports creating symbolic links for single files or folders, providing flexibility in managing your library.
- Ability to Skip Already Present Symlinks: CineSync includes the ability to skip the creation of symbolic links for files or folders that are already present, even if the folder name is different. This feature ensures efficient management of your library by preventing duplicate symlinks.
- Cross-Platform Support: Works on both Linux and Windows operating systems.
CineSync offers a powerful real-time monitoring feature that allows users to keep track of changes in their library automatically. This feature is particularly useful for handling daily series or shows that are regularly downloaded. Here's how it works:
-
Watch Directory: CineSync continuously monitors a designated watch directory where new files or folders are expected to be added.
-
Default Monitoring Interval: By default, CineSync checks the watch directory every 60 seconds for any changes. You can Increase/Decrease the time limit inside RealTime-Monitoring.py
-
Automatic Identification: When a new file or folder is detected in the watch directory, CineSync automatically identifies it.
-
Symbolic Link Creation: After identification, CineSync creates symbolic links for the newly added file or folder. These symbolic links ensure that the organization of the library remains intact without physically moving or duplicating the files.
-
Efficiency: Real-time monitoring ensures that users stay up-to-date with their library changes without manual intervention. It streamlines the process of handling daily series or shows by automatically organizing new additions.
-
Customization: Users have the flexibility to customize the monitoring interval according to their preferences or specific requirements.
By leveraging real-time monitoring in CineSync, users can effortlessly manage their library and maintain a well-organized collection of media files.
- Python 3.x
- For Windows: Git Bash with symbolic links enabled
- NSSM for Windows (if you want to enable real-time monitoring).
- Zurg (optional)
Here's an enhanced version of the instructions:
-
Clone the Repository: Clone the CineSync repository from GitHub and navigate to the cloned directory:
git clone https://github.com/sureshfizzy/CineSync.git && cd CineSync
-
Install the Requirements: Install the required dependencies for CineSync:
pip install -r requirements.txt
-
Update Paths in
library.sh
: Open thelibrary.sh
file located inside theScripts
folder. Update the following paths:show_source_dir
: Specify the path for the Zurg-mounted shows directory.destination_dir
: Set the ultimate destination directory where you want to save the symbolic links.
Note: Ensure that the paths are correctly updated to reflect your system's configuration.
-
Execute CineSync: After updating the paths, execute the main script:
bash CineSync.sh
This will launch the CineSync interface, allowing you to perform various library management tasks, including full library scans, real-time monitoring, and more.
By following these steps and updating the necessary paths, you'll be able to successfully use CineSync to manage your debrid library.
-
Install Python: Install Python from the official website: Python.org. Make sure to add Python to your system PATH during installation.
-
Install Git Bash: Install Git Bash from Git for Windows. During installation, enable the symbolic links checkbox.
Enabling symbolic links is important for certain operations, so ensure that the checkbox for symbolic links is checked during installation.
-
Edit
.bashrc
(Windows): Open Git Bash as an administrator and edit the.bashrc
file. You can use thenano
editor to open the file by running the following command:nano /etc/bash.bashrc
Add the following line at the bottom of the file:
export MSYS=winsymlinks:nativestrict
Save the changes by pressing
Ctrl + O
, then pressEnter
to confirm. Exit the editor by pressingCtrl + X
.Important: Ensure that the
export MSYS=winsymlinks:nativestrict
line is added to the.bashrc
file. This configuration is essential to ensure that symbolic links are handled correctly on Windows when using Git Bash. Without this setting, CineSync may copy files instead of creating symbolic links, leading to undesired behavior. -
Enable Windows Developer Mode:
Enabling Developer Mode grants your system additional privileges necessary for certain operations, helping to prevent permission-related errors during development.
To avoid "Operation not permitted" errors during symlink process, it's essential to enable Windows Developer Mode. Follow these steps:
- Open Settings.
- Go to Update & Security.
- Click on For developers.
- Enable the Developer mode option.
- Restart the PC
-
Clone the Repository:
git clone https://github.com/sureshfizzy/CineSync.git
-
Update Paths in
library.sh
: Open thelibrary.sh
file located inside theScripts
folder. Update the following paths:show_source_dir
: Specify the path for the Zurg-mounted shows directory.destination_dir
: Set the ultimate destination directory where you want to save the symbolic links.
Note: Ensure that the paths are correctly updated to reflect your system's configuration.
-
Run the Script:
bash CineSync.sh
This guide will walk you through the process of setting up real-time monitoring for CineSync Monitor on Windows using NSSM (Non-Sucking Service Manager). Real-time monitoring ensures that CineSync Monitor runs continuously in the background as a system service.
- NSSM: Download and install NSSM from the official website: NSSM Releases
- Download the latest version of NSSM from the official website.
- Extract the downloaded ZIP file to a location on your computer.
- Open the extracted folder and locate the
nssm.exe
executable.
-
Place NSSM Executable Inside the Scripts Folder: Move the
nssm.exe
executable into the Scripts folder. -
Run NSSM Install Command: Open a Command Prompt with administrative privileges, navigate to the Scripts folder, and run the following command:
nssm install CineSync-Monitor
-
Configure NSSM: In the NSSM GUI that appears:
- Application Path: Choose the
python.exe
executable. You can find it by opening Git Bash and runningwhich python
. - Arguments: Pass the folder path where
realtime-monitor.py
is located, for example:C:\Users\YourUserName\Desktop\CineSync\Scripts\RealTime-Monitor.py
. - Click "Install Service".
- Application Path: Choose the
-
Set Source and Destination Paths: Before running
realtime-monitor.py
as a system service, ensure that source and destination paths are correctly set insidelibrary.sh
. -
Run Real-Time Monitoring: After installation, the files will be watched in real-time, and symlinks will be created if any changes are detected.
-
Removing the System Service: To remove the system service, simply type:
nssm remove CineSync-Monitor
Additionally, you can also directly run the Python script on Git Bash if needed.
CineSync provides a user-friendly interface for managing your debrid library. Upon running the script, you'll be presented with a main menu where you can choose from various options:
- 1) Full Library Scan: Perform a comprehensive scan of your entire library.
- 2) Real-Time Monitoring (Linux Only): Enable real-time monitoring to stay updated on library changes. System services are automatically created, and the scan is triggered every 60 seconds. You can adjust the frequency inside
RealTime-Monitor.py
. - 3) Remove Broken Symlinks : Identify and remove broken symbolic links within your library.
- 4) Exit: Quit the CineSync application.
Note: Real-Time Monitoring is currently supported only on Linux due to system service limitations on Windows. However, you can still manually trigger real-time monitoring using the provided instructions in the README.
CineSync also supports the creation of single file or folder symlinks. Follow these steps to create a symlink for a single file or folder:
-
Navigate to Scripts Folder:
- Open your terminal or command prompt and navigate to the Scripts folder of the CineSync repository.
-
Enter Series Name and Full Path:
- Inside the Scripts folder, run the following command:
Replace
bash ./library.sh "/mnt/Real-Debrid/remote/rclone/Shows/13.Reasons.Why.S03.1080p.WEBRip.x265-RARBG/13.Reasons.Why.S03E09.1080p.WEBRip.x265-RARBG.mp4"
"/mnt/Real-Debrid/remote/rclone/Shows/13.Reasons.Why.S03.1080p.WEBRip.x265-RARBG/13.Reasons.Why.S03E09.1080p.WEBRip.x265-RARBG.mp4"
with the full path to the file or folder you want to create a symlink for.
- Inside the Scripts folder, run the following command:
-
Execute Command:
- Press Enter to execute the command.
By following these steps, you can easily create a symlink for a single file or folder using CineSync.