3 releases
new 0.1.2 | Jan 16, 2025 |
---|---|
0.1.1 | Jan 15, 2025 |
0.1.0 | Jan 15, 2025 |
#197 in Command line utilities
63 downloads per month
42KB
999 lines
msort
msort is a powerful command-line tool designed to organize your movie and TV show files into a folder structure ideal for use with Plex Media Server. It processes file metadata to ensure your media library is clean, consistent, and easy to navigate.
Features
- Automatically detects and organizes movies and TV shows.
- Creates a Plex-friendly folder structure:
- Movies:
Movies/<Movie Title> (<Year>)/<Movie File>
- TV Shows:
TV Shows/<Show Title>/Season <Number>/<Episode File>
- Movies:
- Handles common naming conventions and formats.
- Supports additional metadata like release year, season, and episode numbers.
- Safe operation with a dry-run mode to preview changes.
Installation
Requirements
Rust programming language installed. Use the Rust toolchain installed.
Steps
Install the application via cargo
(Rust's package manager):
cargo install msort
Usage
Basic Command
msort --input <source_file_path> --base-dir <destination_directory> --api-key
Options
--input
(required): Path to the media file--base-dir
(required): Path to the directory where organized files will be saved.--dry-run
: Preview changes without moving any files.--overwrite
: Replace existing files in the destination folder.--verbose
: Enable detailed logging for debugging.
Examples
Organize Media Files
msort --input ~/Downloads/Media/house.s01e02.mkv --base-dir ~/MediaLibrary
Enable Verbose Logging
msort --input ~/Downloads/Media/house.s01e02.mkv --base-dir ~/MediaLibrary -vv
Folder Structure
The application creates a Plex-compatible folder structure:
Movies
Movies/
Inception (2010)/
Inception (2010).mp4
The Matrix (1999)/
The Matrix (1999).mkv
TV Shows
TV Shows/
Breaking Bad/
Season 01/
Breaking Bad - S01E01 - Pilot.mp4
Breaking Bad - S01E02 - Cat's in the Bag.mp4
Season 02/
Breaking Bad - S02E01 - Seven Thirty-Seven.mp4
Contributing
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-name
. - Open a pull request.
License
This project is licensed under the MIT License.
Acknowledgments
Contact
For questions or support, open an issue on the GitHub repository.
Dependencies
~8–19MB
~263K SLoC