This feature suggestion was marked as implemented even though it is not fully implemented into Plex.
Metadata agents still cannot add theme songs to movies it appears.
This code should work but it does not work fully.
load_file = Core.storage.load
theme_song = <full filepath or url to theme song>
theme_data = load_file(theme_song)
#theme_data = HTTP.Request(theme_song) #for a url instead
metadata.themes[theme_song] = Proxy.Media(theme_data, sort_order = y)
metadata.themes.validate_keys(theme_song)
The mp3 file is actually added to the metadata folder and if renamed to have the .mp3 extension you can play the file in a media player; however Plex will not play the theme song in any client.
There is a workaround possible with a modified version of python-plexapi, but it’s not practical for most metadata agent developers to modify python-plexapi. For one the api wrapper doesn’t include a method to add theme songs by default. For two, the api wrapper is setup for python 3.x and Plex is still on python 2.7.
Please add the ability for metadata agents to use the method in my code above.