10-05-2015, 08:53 AM
Dean Roddey Wrote:How is the metadata stored? Is it embedded in the files, or does KODI keep it somewhere in a database of its own?
There are a couple of options for metadata. I rip each movie to a separate directory. I then use Tiny Media Manager to scrape metadata. It creates a JPG for the movie, the fanart, and a poster. Metadata goes into a small xml file called movie.nfo. Kodi looks in the movie directory if there is no metadata for a given title. I use a MySql repository for metadata so all instances of Kodi share the single library rather than having local instances of a .DB file. An example NFO file is below.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- created on 2015-07-10 14:48:15 - tinyMediaManager 2.6.8 -->
<movie>
<title>A Beautiful Mind</title>
<originaltitle>A Beautiful Mind</originaltitle>
<set></set>
<sorttitle>Beautiful Mind, A</sorttitle>
<rating>7.1</rating>
<year>2001</year>
<top250></top250>
<votes>725</votes>
<outline>At Princeton University, John Nash struggles to make a worthwhile contribution to serve as his legacy to the world of mathematics. He finally makes a revolutionary breakthrough that will eventually earn...</outline>
<plot>At Princeton University, John Nash struggles to make a worthwhile contribution to serve as his legacy to the world of mathematics. He finally makes a revolutionary breakthrough that will eventually earn him the Nobel Prize. After graduate school he turns to teaching, becoming romantically involved with his student Alicia. Meanwhile the government asks his help with breaking Soviet codes, which soon gets him involved in a terrifying conspiracy plot. Nash grows more and more paranoid until a discovery that turns his entire world upside down. Now it is only with Alicia's help that he will be able to recover his mental strength and regain his status as the great mathematician we know him as today.</plot>
<tagline>I need to believe that something extra ordinary is possible....</tagline>
<runtime>135</runtime>
<thumb>http://image.tmdb.org/t/p/w500/4SFqHDZ1NvWdysucWbgnYlobdxC.jpg</thumb>
<fanart>http://assets.fanart.tv/fanart/movies/453/moviebackground/a-beautiful-mind-4fec17662d36d.jpg</fanart>
<mpaa>Rated PG-13</mpaa>
<certification>US:PG-13 / US:Rated PG-13</certification>
<id>tt0268978</id>
<ids>
<entry>
<key>tmdbId</key>
<value xsi:type="xs:int" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">453</value>
</entry>
<entry>
<key>imdbId</key>
<value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">tt0268978</value>
</entry>
</ids>
<tmdbId>453</tmdbId>
<trailer>plugin://plugin.video.youtube/?action=play_video&videoid=WFJgUm7iOKw</trailer>
<country>US</country>
<premiered>2001-12-12</premiered>
<fileinfo>
<streamdetails>
<video>
<codec>Microsoft</codec>
<aspect>1.78</aspect>
<width>1920</width>
<height>1080</height>
<durationinseconds>8119</durationinseconds>
</video>
<audio>
<codec>DTSHD_MA</codec>
<language>eng</language>
<channels>6</channels>
</audio>
<audio>
<codec>DTS</codec>
<language>eng</language>
<channels>6</channels>
</audio>
<subtitle>
<language>eng</language>
</subtitle>
</streamdetails>
</fileinfo>
<watched>false</watched>
<playcount>0</playcount>
<genre>Drama</genre>
<genre>Romance</genre>
<studio>Universal Pictures</studio>
<credits>Sylvia Nasar</credits>
<credits>Akiva Goldsman</credits>
<director>Ron Howard</director>
<actor>
<name>Russell Crowe</name>
<role>John Nash</role>
<thumb>http://image.tmdb.org/t/p/w185/ktuOAyUHM2u2YPPChH8gAArxJ7b.jpg</thumb>
</actor>
<actor>
<name>Ed Harris</name>
<role>William Parcher</role>
<thumb>http://image.tmdb.org/t/p/w185/a9ITc3shCAWjV4qKf3rgR0Opu3y.jpg</thumb>
</actor>
<actor>
<name>Jennifer Connelly</name>
<role>Alicia Nash</role>
<thumb>http://image.tmdb.org/t/p/w185/jjsSmMATyYbM6cKauHOAcfKEk4F.jpg</thumb>
</actor>
<actor>
<name>Christopher Plummer</name>
<role>Dr. Rosen</role>
<thumb>http://image.tmdb.org/t/p/w185/fauMGxa6dc86nHNenQ8X6DlE6YV.jpg</thumb>
</actor>
<actor>
<name>Paul Bettany</name>
<role>Charles</role>
<thumb>http://image.tmdb.org/t/p/w185/1zmr8C7TCqsoCjDVKJycVp2wWyf.jpg</thumb>
</actor>
<actor>
<name>Adam Goldberg</name>
<role>Sol</role>
<thumb>http://image.tmdb.org/t/p/w185/tkkfy3uTzv7WMW5xpBOkpgXRBSJ.jpg</thumb>
</actor>
<actor>
<name>Josh Lucas</name>
<role>Hansen</role>
<thumb>http://image.tmdb.org/t/p/w185/26PGwKgybp1YRvnQkHcaEOEfdrw.jpg</thumb>
</actor>
<actor>
<name>Anthony Rapp</name>
<role>Bender</role>
<thumb>http://image.tmdb.org/t/p/w185/ejYAZ05qEQub5W0SsPn17EB4ayr.jpg</thumb>
</actor>
<actor>
<name>Jason Gray-Stanford</name>
<role>Ainsley</role>
<thumb>http://image.tmdb.org/t/p/w185/rvSf3Or7B74xO0MUWqv5KMNybr9.jpg</thumb>
</actor>
<actor>
<name>Judd Hirsch</name>
<role>Helinger</role>
<thumb>http://image.tmdb.org/t/p/w185/5KXEekVgmWQkhvtOd7BtOnQBSQh.jpg</thumb>
</actor>
<actor>
<name>Austin Pendleton</name>
<role>Thomas King</role>
<thumb>http://image.tmdb.org/t/p/w185/5zCfkpsDFAilHv1nMFWiz5lx6ZH.jpg</thumb>
</actor>
<actor>
<name>Vivien Cardone</name>
<role>Marcee</role>
<thumb>http://image.tmdb.org/t/p/w185/kPE1dEd7obmXyc3vOfJSnTkDSXS.jpg</thumb>
</actor>
<actor>
<name>Jillie Simon</name>
<role>Bar Co-Ed</role>
</actor>
<actor>
<name>Victor Steinbach</name>
<role>Prof. Horner</role>
</actor>
<actor>
<name>Tanya Clarke</name>
<role>Becky</role>
<thumb>http://image.tmdb.org/t/p/w185/zLpLrVzihPObD6h72KFxTNqdKuq.jpg</thumb>
</actor>
<actor>
<name>Thomas F. Walsh</name>
<role>Captain</role>
</actor>
<actor>
<name>Jesse Doran</name>
<role>General</role>
</actor>
<actor>
<name>Kent Cassella</name>
<role>Analyst</role>
</actor>
<actor>
<name>Patrick Blindauer</name>
<role>MIT Student</role>
</actor>
<actor>
<name>John Blaylock</name>
<role>Photographer</role>
</actor>
<actor>
<name>Roy Thinnes</name>
<role>Governor</role>
<thumb>http://image.tmdb.org/t/p/w185/tb8ZfsFfl8Smhr719E3pRutPJa9.jpg</thumb>
</actor>
<actor>
<name>Anthony Easton</name>
<role>Young Man</role>
</actor>
<actor>
<name>Cheryl Howard</name>
<role>Harvard Administrator</role>
<thumb>http://image.tmdb.org/t/p/w185/3b7Xe3F2DX4N17T8oFQPENyzvx3.jpg</thumb>
</actor>
<actor>
<name>Josh Pais</name>
<role>Princeton Professor</role>
<thumb>http://image.tmdb.org/t/p/w185/wchEfDovGnrFEWAA4emC1iV3T4N.jpg</thumb>
</actor>
<actor>
<name>David B. Allen</name>
<role>John Nash Teenager</role>
</actor>
<actor>
<name>Michael Esper</name>
<role>John Nash Young Man</role>
<thumb>http://image.tmdb.org/t/p/w185/5BWyi5UY1hm6qeGcEztULi2vzmR.jpg</thumb>
</actor>
<actor>
<name>Erik Van Wyck</name>
<role>Princeton Student</role>
<thumb>http://image.tmdb.org/t/p/w185/bEst6J6rjGWtIazgE4KqJc9R8qG.jpg</thumb>
</actor>
<producer>
<name>Brian Grazer</name>
<role>Producer</role>
<thumb>http://image.tmdb.org/t/p/w185/jEar20rOczc6ve2jy8zYxiBkPw5.jpg</thumb>
</producer>
<producer>
<name>Ron Howard</name>
<role>Producer</role>
<thumb>http://image.tmdb.org/t/p/w185/67WIgpOGIeb4NSN9yIxsOITbnns.jpg</thumb>
</producer>
<producer>
<name>Todd Hallowell</name>
<role>Executive Producer</role>
</producer>
<producer>
<name>Karen Kehela</name>
<role>Executive Producer</role>
</producer>
<producer>
<name>Maureen Peyrot</name>
<role>Producer</role>
</producer>
<producer>
<name>Kathleen McGill</name>
<role>Producer</role>
</producer>
<producer>
<name>Aldric La'Auli Porter</name>
<role>Executive Producer</role>
</producer>
<producer>
<name>Louisa Velis</name>
<role>Executive Producer</role>
</producer>
<producer>
<name>Janet Hirshenson</name>
<role>Casting</role>
</producer>
<producer>
<name>Jane Jenkins</name>
<role>Casting</role>
</producer>
<producer>
<name>Lyn Pinezich</name>
<role>Location Manager</role>
</producer>
<languages>en</languages>
</movie>
Mark Stega