{"id":18096152,"url":"https://github.com/bbilly1/media_organizer","last_synced_at":"2025-04-13T10:05:16.665Z","repository":{"id":41550559,"uuid":"353394071","full_name":"bbilly1/media_organizer","owner":"bbilly1","description":"A set of python scripts to rename movies and tv shows.","archived":false,"fork":false,"pushed_at":"2024-01-30T14:59:29.000Z","size":272,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:23:55.183Z","etag":null,"topics":["api","emby","emby-api","media","organizer","themoviedb-api","tvmaze-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bbilly1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-31T14:56:52.000Z","updated_at":"2024-12-30T11:23:00.000Z","dependencies_parsed_at":"2024-01-30T16:09:30.836Z","dependency_job_id":"66f836dc-696f-488d-a112-96c9b2680f72","html_url":"https://github.com/bbilly1/media_organizer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fmedia_organizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fmedia_organizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fmedia_organizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbilly1%2Fmedia_organizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbilly1","download_url":"https://codeload.github.com/bbilly1/media_organizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695438,"owners_count":21146954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","emby","emby-api","media","organizer","themoviedb-api","tvmaze-api"],"created_at":"2024-10-31T19:12:50.202Z","updated_at":"2025-04-13T10:05:16.640Z","avatar_url":"https://github.com/bbilly1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![banner.jpg](assets/media-organizer-banner.png?raw=true \"Media Organizer Banner\")  \n\n# media_organizer\n*A set of python scripts to rename movies and tv shows.*\n\n![screenshot.jpg](assets/media-organizer-screenshot.png?raw=true \"Media Organizer Screenshot\") \n\nThis project is used and tested under Linux and is ideal to be used from something like a Raspberry Pi or a Linux based NAS. If you want to help me to get it to work under Windows, please contribute.\n\n## Run\nClone the repo, setup config file (see below) and run `interface.py`. Use your arrow keys to navigate up and down the menu.  \n* **q** quit the interface\n* **r** refresh the pending items by rescanning the file system.\n\n## Movies\nDetect movie names by querying [themoviedb.org](https://www.themoviedb.org/) API and renaming the file based on a selection of possible matches. Follow the config file instructions below to get your API key.\n\nAll data is courtesy of [The Movie Database](https://www.themoviedb.org), please contribute to this excellent database.\n\nMovies will get renamed to this naming style:  \n**{movie-name} ({Year})/{movie-name} ({Year}).{ext}**\n\n## TV shows\nDetect tv show filenames by querying the publicly available [tvmaze.com](https://www.tvmaze.com/) API to identify the show name and the episode name based on a selection of possible matches. Please contribute to this excellent database. \n\nEpisodes are named with this template:  \n**{show-name}/Season {nr}/show-name - S{nr}E{nr} - {episode-name}.{ext}**\n\n## Trailer download\nDownload trailers from links provided from emby and move them into the movie folder.  \nTrailers are named with this template:  \n**{movie-name} ({Year})_{youtube-id}_trailer.mkv**\n\n## Fix Movie Names\nSometimes Emby gets it wrong. Sometimes this script can get it wrong too. The *Fix Movie Names* function goes through the movie library looking for filenames that don't match with the movie name as identified in emby.\n\n## CSV export\nExport the library to csv files. Calles the Emby API to get a list of movies and episodes and exports this to a convenient set of CSV files.\n\n## setup\nNeeds Python \u003e= 3.6 to run.\n\n### install requirements\nThese are the non standard Python libraries in use in this project:\n* [requests](https://pypi.org/project/requests/)\n    * Install on Arch: `sudo pacman -S python-requests`\n    * Install with pip: `pip install requests`\n* [trash-cli](https://pypi.org/project/trash-cli/)\n    * Install on Arch: `sudo pacman -S trash-cli`\n    * Install with pip: `pip install trash-cli`\n* [yt-dlp](https://pypi.org/project/yt-dlp/)\n    * Install on Arch: `sudo pacman -S yt-dlp`\n    * Install with pip: `pip install yt-dlp`\n* curses\n    * Is already installed on most linux based systems.\n    * On Windows: `pip install windows-curses`\n\nOr use `pip` to install all the requirements:  \n`pip install -r requirements.txt`\n\n### config json file:\nDuplicate the config.sample.json file to a file named *config.json* and set the following variables:\n#### media\n* `tv_downpath`: Folder path where the tv episodes get downloaded to.\n* `movie_downpath`: Folder path where the movie files get downloaded to.\n* `sortpath`: Empty folder that can be used by *media_organizer* as a temporary sort path.\n* `moviepath`: Root folder where the organized movie files will go.\n* `tvpath`: Root folder where the organized tv episodes will go.\n* `ext`: A list of valid media file extensions to easily filter out non-media related files.\n* `log_path`: Path to a folder to output all renaming done to keep track, check for any errors and safe csv files.\n* `movie_db_api`: Register and get your themoviedb.com **API Key (v3 auth)** acces from [here](https://www.themoviedb.org/settings/api).\n* `min_file_size`: Minimal file size to be considered a relevant media file in bytes.  \n\n#### Emby integration\n*optional:* remove the 'emby' key from config.json to disable the emby integration. \n* `emby_url`: url where your emby instance is reachable\n* `emby_user_id`: user id of your emby user\n* `emby_api_key`: api key for your user on emby  \n\n#### ydl_opts *Trailer download:*  \n*optional:* remove the 'ydl_opts' key from config.json to disable the trailer download functionality.  \nArguments under the [ydl_opts] section will get passed in to yt-dlp for *trailers*. Check out the documentation for details.\n\n## Known limitations:\nMost likely *media_organizer* will fail if there are any files like Outtakes, Extras, Featurettes, etc in the folder. For these cases, move/delete them first before running *media_organizer*.  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbilly1%2Fmedia_organizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbilly1%2Fmedia_organizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbilly1%2Fmedia_organizer/lists"}