Jump to content


Photo

Using TinyMediaManager to Automatically Build Collection.xml

tinymediamanager collections xml folders tags datasources export media manager import

  • Please log in to reply
1 reply to this topic

#1 decrapinated OFFLINE  

decrapinated

    Newbie

  • Members
  • 3 posts
  • Local time: 04:12 PM

Posted 21 March 2019 - 04:04 PM

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.

 

TinyMediaManagerFolder\templates\EmbyCollectionXML\

 

In the conf file I needed the following:

 

name =EXCEL list

type=movie

list=list.jmte

extension=xml

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"?>
<Item>

  <LockData> true </LockData>

  <LocalTitle>Collection Title</LocalTitle>

  <DisplayOrder>PremiereDate</DisplayOrder>

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

 

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.

Attached Files


Edited by decrapinated, 21 March 2019 - 04:16 PM.


#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 135734 posts
  • Local time: 04:12 PM

Posted 22 March 2019 - 12:35 PM

Great, thanks for the info !
  • decrapinated likes this





Also tagged with one or more of these keywords: tinymediamanager, collections, xml, folders, tags, datasources, export, media, manager, import

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users