adventures in metadata aka IMP

IMP: Infuse Metadata Proxy

To understand this, you need to understand Doctor Who (1963). It is a long running series, with the entire cast having changed many times over. The main character of The Doctor defines an “era”. The episodes were all multi-part, so a number of episodes comprise a complete story arc, referred to by wikipedia et al. as a “serial” or “story”. People had longer attention spans back then. DVDs are generally grouped 1 disc per serial, and a set of extras per serial.

I want to organize my Doctor Who Collection on disk as such:

Doctor Who (1963)
  D01 William Hartnell
    S01A01 An Unearthly Child (The Beginning)
      S01E01 An Unearthly Child (1).mkv
      S01E02 The Cave of Skulls (2).mkv
      ...
    S01A02 The Daleks (The Beginning)
      S01E05 The Dead Planet (1).mkv
      ...
  D02 Patrick Troughton
    S04A03 The Power of the Daleks (BD)
      S04E09 The Power of the Daleks (1).mkv
      ...
  • The folder naming captures the story arcs and the source ... there are often multiple sources, DVD, SE, BD, etc
  • The mkv naming is a concession to tvdb, not my preference
  • There are more (many more for BD source) mkv's in each story arc folder, for the extras
  • .

    The “problems” here are that:

  • infuse will only go up two folder levels above the mkv, to find the series name (D01 ...)
  • tvdb only lists actors per series, not per episode, so episodic metadata is wrong
  • tvdb does have guest actors per episode, but for dr who this just doesn't work, plus infuse ignores it
  • infuse has pretty poor support for embedded metadata, and .nfo/.xml metadata will pollute my folders
  • .

    So I configured my ATV to go through a proxy (How to Set Up Charles Proxy with tvOS: A Step-by-Step Guide). Those instructions are ancient and won’t work today but they are close enough. I used proxyman and Apple Configurator 2. You also have to “supervise” your ATV in order to install the proxyman CA cert on the ATV, so you can intercept SSL traffic. (not for the faint of heart – you can brick your ATV)

    Then I took the tvdb data and “split” it into 7 eras, setting the actor fields appropriately (differently) for each era and altering the series id to be unique per era. This actually took the most time – about a day to write and debug the tool against infuse. I set proxyman to return my split versions of series info instead of the tvdb single version. Now, on infuse I had 7 separate Doctor Who series (with main actor appended so they are differentiable), but this isn’t bad at all, especially in the list view, since each era really represents a different sub-series anyway.

    Nearly perfect! There’s still not a good way to deal with extras without just using list view in the favorites browser. I haven’t properly evaluated different sources yet either. eg, some of the stories come in an original and updated versions (eg bw and colour). Shada is maybe the worst with multiple versions.

    Proxyman was just for testing and figuring out the rules. In “production” it would be better to use something like proxy.py (GitHub - abhinavsingh/proxy.py: 💫 Ngrok FRP Alternative • ⚡ Fast • 🪶 Lightweight • 0️⃣ Dependency • 🔌 Pluggable • 😈 TLS interception • 🔒 DNS-over-HTTPS • 🔥 Poor Man's VPN • ⏪ Reverse & ⏩ Forward • 👮🏿 "Proxy Server" framework • 🌐 "Web Server" framework • ➵ ➶ ➷ ➠ "PubSub" framework • 👷 "Work" acceptor & executor framework) and have dynamic rules based on what exists in the filesystem, rather than the more static rules of proxyman. What is powerful is that it could read out the local metadata (attached, kodi style) and return that to infuse instead of tvdb data, thus a workaround for this lack of feature by infuse. Or read mp4 tags and return that as moviedb data.

    Then I erased the whole setup. It’s easier just to go into the UI and set the series name for one of the mkv’s, then all the episodes for that Doctor (ie, the folder name 2 levels up) get recognized as Doctor Who. So only 7 manual UI changes are required. You lose the per-doctor-era views and you lose the per-era cast/actor corrections, but you gain not having to use a fragile supervised+proxy setup. It was fun to experiment but not going to be fun to maintain it.

    In the end, I’ll either use a combination of infuse and infuse pro (with different settings for each), or MrMC and infuse pro. But firecore can address this by implementing very simple better local metadata handling!

    Wow, nice write up!

    We have some improvements for embedded metadata on our list for 6.4.x, so hopefully this will make things easier to manage in the future.

    I get access denied for that link. I’m very eager to see what you have in store.

    Here are screenshots from MrMC vs infuse, both using local metadata. Note that these are different screens. For MrMC, there is an episode list screen (episodes listed vertically) with a thumb, plot, etc but not cast/director/etc. Then you click on an episode and you get the single episode screen as I’ve shown, with full actor list etc. infuse doesn’t have this extra level – for infuse the screen is a combination of the two levels of detail you get with MrMC, but you avoid an extra click.

    It turns out that MrMC doesn’t actually work with attached metadata, like its parent Kodi. But I can drop .nfo turds all over the place. I wrote a small program to do it, it’s all very automatic and easy. I based it on the “splitter” program I wrote as described in the first post. The difference is that with the local metadata, infuse won’t recognize the mkv’s as part of a tvshow. Notice in the infuse screenshot it doesn’t show S/E. So I can only get access either via the ‘Other’ browser or the favorites browser. Also, infuse doesn’t give me access to the extras at all (as documented). With MrMC, if I enter the TV Show browser, likewise, extras are excluded. But in the source navigator, it’s readily available.

    MrMC has many weaknesses, so overall, infuse is a better experience but its pain points are painful. If it could “just” read mkv-attached metadata (overriding data from tvdb), and if there were a way to access extras, I’d be very happy.

    Whoops, fixed the link (not much detail there…just our general roadmap).

    Still a few things to flush out with regard to this, but having the ability to move shows out of Other and into TV Shows with only embedded metadata is one of the goals.

    I’ve figured out how to access the extras in infuse. Instead of a folder named ‘Extras’, I called it ‘Ω Extras’ (to sort last in Finder). That content doesn’t show up in the ‘TV Shows’ browser, and I can access it via the favorites browser – that’s pretty good but a long press somewhere in TV Show browser would be nice to pull them up as well. Annoyingly, it pollutes the ‘Other’ browser and there’s >1000 of them. In the list view, extras works a lot better IMHO.

    I guess this is good enough. Better local metadata would help, but now it isn’t a make it or break it deal.

    screenshot of list view w/ extras folder showing.

    Additional Library filters (by actor, director, etc…)

    so for doctor who, if you are going to filter by actor, this will work quite poorly if you use the tvdb data. you need embedded per-episode metadata for that to work at all. Please, getting this to work would be so easy!