Synchronize a local directory of songs' (MP3, MP4) metadata (genre, ratings) and playlists with a Plex server.

Related tags

AudioPlexMusicSync
Overview

PlexMusicSync

Synchronize a local directory of songs' (MP3, MP4) metadata (genre, ratings) and playlists (m3u, m3u8) with a Plex server. The song files must already be present in Plex.

I'm a long time Plex user, but until recently I've only used Plex for Movies and TV shows because I found Plex music support to be lacking. I have a large msuic library and need smart playlists based on track rating, track genre, track explicit lyrics, disabling of duplicate tracks (from compilations), etc. None of this metadata was present in Plex or supported by the Plex import. This script fills that gap by syncing that metadata from song files and playlists.

Syncing tags:

  • MP3 or MP4 file genre to.
    • Song artist genre on Plex.
    • Song album genre on Plex.
    • Song mood on Plex (since Plex doesn't have per-song genre).
  • MP3 or MP4 song rating to song rating on Plex.
  • If MP3 or MP4 file comment contains the word explicit, then 'Explicit' is added to the Plex song mood tags.

Syncing Playlists

  • Sync m3u and m3u8 files found locally to music playlists on Plex.
    • If a playlist named 'Unchecked' is found it is considered special and is assumed to be a list of songs that are NOT checked in Apple Music. Songs in this playlist are tgged with a mood value 'Unchecked'.
    • If a playlist named 'Explicit' is found it is considered special and is assumed to be a list of songs that contain explciti lyrics. Songs in this playlist are tgged with a mood value 'Explicit'.

Clearing tags:

  • For each MP3 or MP4 file.
    • Clear all song artist genre tags on Plex.
    • Clear all song album genre tags on Plex.
    • Clear all song mood tags on Plex.

Usage

Install required Python modules with

pip3 install -r requirements.txt

then run the script as follows:

usage: plex_music_sync.py [-h] [-v] [-s SERVER] [-u USERNAME] [-p PASSWORD] [-d DIRECTORY] [-S] [-P] [-c] [-D] [-f]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         Print the program's version
  -s SERVER, --server SERVER
                        Hostname of the Plex server
  -u USERNAME, --username USERNAME
                        Username of the Plex server
  -p PASSWORD, --password PASSWORD
                        Password of the Plex server
  -d DIRECTORY, --directory DIRECTORY
                        Directory that contains the music files
  -S, --sync            Sync genres, ratings, and playlists to Plex
  -P, --specialplaylists
                        Sync special playlists as playlists. Don't just tag the songs in them.
  -c, --clear           Clear ratings and genre on Plex
  -D, --debug           Log more error messages

Todo:

  • Token based Plex server login.
  • Some way of handling track year.
Owner
Tom Goetz
Tom Goetz
A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.

Audiomentations A Python library for audio data augmentation. Inspired by albumentations. Useful for deep learning. Runs on CPU. Supports mono audio a

Iver Jordal 1.2k Jan 07, 2023
Klangbecken: The RaBe Endless Music Player

Klangbecken Klangbecken is the minimalistic endless music player for Radio Bern RaBe based on liquidsoap. It supports configurable and editable playli

Radio Bern RaBe 8 Oct 09, 2021
Royal Music You can play music and video at a time in vc

Royals-Music Royal Music You can play music and video at a time in vc Commands SOON String STRING_SESSION Deployment 🎖 Credits • 🇸ᴏᴍʏᴀ⃝🇯ᴇᴇᴛ • 🇴ғғɪ

2 Nov 23, 2021
Gammatone-based spectrograms, using gammatone filterbanks or Fourier transform weightings.

Gammatone Filterbank Toolkit Utilities for analysing sound using perceptual models of human hearing. Jason Heeris, 2013 Summary This is a port of Malc

Jason Heeris 188 Dec 14, 2022
Port Hitsuboku Kumi Chinese CVVC voicebank to deepvocal. / 筆墨クミDeepvocal中文音源

Hitsuboku Kumi (筆墨クミ) is a UTAU virtual singer developed by Cubialpha. This project ports Hitsuboku Kumi Chinese CVVC voicebank to deepvocal. This is the first open-source deepvocal voicebank on Gith

8 Apr 26, 2022
A python script that can play .mp3 URLs upon the ringing or motion detection of a Ring doorbell. The sound plays through Sonos speakers.

Ring x Sonos A python script that plays .mp3 files whenever a doorbell is rung or a doorbell detects motion. Features Music! Authors @braden Running T

braden 0 Nov 12, 2021
A python package for calculating the PESQ.

PyPESQ (WIP) Pypesq is a python wrapper for the PESQ score calculation C routine. It only can be used in evaluation purpose. INSTALL pip install https

Jingdong Li 269 Dec 18, 2022
convert-to-opus-cli is a Python CLI program for converting audio files to opus audio format.

convert-to-opus-cli convert-to-opus-cli is a Python CLI program for converting audio files to opus audio format. Installation Must have installed ffmp

4 Dec 21, 2022
The venturimeter works on the principle of Bernoulli's equation, i.e., the pressure decreases as the velocity increases.

The venturimeter works on the principle of Bernoulli's equation, i.e., the pressure decreases as the velocity increases. The cross-section of the throat is less than the cross-section of the inlet pi

Shankar Mahadevan L 1 Dec 03, 2021
DaisyXmusic ❤ A bot that can play music on Telegram Group and Channel Voice Chats

DaisyXmusic ❤ is the best and only Telegram VC player with playlists, Multi Playback, Channel play and more

TeamOfDaisyX 34 Oct 22, 2022
Voice helper on russian

Voice helper on russian

KreO 1 Jun 30, 2022
Audio pitch-shifting & re-sampling utility, based on the EMU SP-1200

Pitcher.py Free & OS emulation of the SP-12 & SP-1200 signal chain (now with GUI) Pitch shift / bitcrush / resample audio files Written and tested in

morgan 13 Oct 03, 2022
This is a python package that turns any images into MIDI files that views the same as them

image_to_midi This is a python package that turns any images into MIDI files that views the same as them. This package firstly convert the image to AS

Rainbow Dreamer 4 Mar 10, 2022
A Python wrapper around the Soundcloud API

soundcloud-python A friendly wrapper around the Soundcloud API. Installation To install soundcloud-python, simply: pip install soundcloud Or if you'r

SoundCloud 84 Dec 31, 2022
Python library for audio and music analysis

librosa A python package for music and audio analysis. Documentation See https://librosa.org/doc/ for a complete reference manual and introductory tut

librosa 5.6k Jan 06, 2023
Full LAKH MIDI dataset converted to MuseNet MIDI output format (9 instruments + drums)

LAKH MuseNet MIDI Dataset Full LAKH MIDI dataset converted to MuseNet MIDI output format (9 instruments + drums) Bonus: Choir on Channel 10 Please CC

Alex 6 Nov 20, 2022
Pythonic bindings for FFmpeg's libraries.

PyAV PyAV is a Pythonic binding for the FFmpeg libraries. We aim to provide all of the power and control of the underlying library, but manage the gri

PyAV 1.8k Jan 03, 2023
spafe: Simplified Python Audio-Features Extraction

spafe aims to simplify features extractions from mono audio files. The library can extract of the following features: BFCC, LFCC, LPC, LPCC, MFCC, IMFCC, MSRCC, NGCC, PNCC, PSRCC, PLP, RPLP, Frequenc

Ayoub Malek 310 Jan 01, 2023
Music player - endlessly plays your music

Music player First, if you wonder about what is supposed to be a music player or what makes a music player different from a simple media player, read

Albert Zeyer 482 Dec 19, 2022
Audio2midi - Automatic Audio-to-symbolic Arrangement

Automatic Audio-to-symbolic Arrangement This is the repository of the project "Audio-to-symbolic Arrangement via Cross-modal Music Representation Lear

Ziyu Wang 24 Dec 05, 2022