Jump to content

Using TinyMediaManager to Automatically Build Collection.xml


Recommended Posts


Hi everyone.  I use TinyMediaManager to do all of my metadata.  I happen to move my files around a lot based on my own organizational madness, lol.  This would KILL Emby's collections method.  I switched over from Plex a few days ago and this was maddening because I was used to using tags.  So I wrote an export template for TinyMediaManager that exports a list of movies in xml form.  I wrote my template to conform to Emby's collection.xml scheme and placed the xml in a "CollectionName [boxset]" folder in the Collections folder.  I was pleasantly surprised to find that it worked.  So, I can rearrange my files at will, use whatever folder and naming scheme that I wish, replace files with better quality rips, re-tag or rename, or pretty much do whatever i want.  I just thought that I'd share my methods for people in the same situation.


I have several MoviesFolders though, including a folder containing all the movies that I haven't watched yet.  There's also a folder of movies that I consider temporary residents on my hard drive.


TinyMediaManager keeps it's export templates in a folder named "templates" in the main program folder.  In this folder, I had to create a folder named "EmbyCollectionXML".  In that folder, I need 2 files.  I need a "template.conf" file and a "list.jmte" file.




In the conf file I needed the following:


name =EXCEL list




description=This template exports a valid Emby collections.xml file


In the list.jmte I needed the following:


<?xml version="1.0" encoding="UTF-8"?>

  <LockData> true </LockData>

  <LocalTitle>Collection Title</LocalTitle>


  ${foreach movies movie}
        ${foreach movie.mediaFiles mediaFile} ${if first_mediaFile}<Path>${mediaFile.path}\\${mediaFile.filename}</Path>${end} ${end}


This template exports an xml that writes the path for every one of your movies inside a CollectionItem.


In TinyMediaManager, I simply filter the list by tags or by "datasource" or by  whatever I want, then I export the list using my template.  Open that xml and change "Collection Title" to whatever the name of my Collection will be.  Rename the xml to "Collection Title.xml"


Create a folder inside your Emby Collections folder: 

\Emby-Server\programdata\data\collections\Collection Title [boxset]\


Place your xml in that folder.  I put a folder.jpg in there too for my collection.  I refreshed my Collections in Emby and BOOM:  There it was.  I don't know if this will be helpful for anyone else, but that's how I do it for my custom collections that plugins might not pick up and to deal with me moving stuff around occasionally.  It's best for big collections or random custom collections.  Oh, and the reason I can't just filter by tags on the movies screen is because I'm using the Tizen version of Emby client on a Samsung Smart TV.  That means if I filter and there aren't enough movies, I can't get back to that "Filters" button.  It's been discussed in another thread.







Edited by decrapinated
  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...