Ember Media Manager Script Enhancement (1 Viewer)

Par3in

Portal Member
August 25, 2014
5
4
39
Home Country
Germany Germany
Hi Everybody.
First things first.
I'm a silent listener of the MP Forums since Years. My first MP Version was ...let me think.. something around 0.8.
Last week I started setting up a new Setup. Everything went fine until the import of movies with Moving Pictures.
I think I have to mention that I am from Germany. So finding a grabber which gets me Information in my language without the mission of correcting some lines or complement information by hand is nearly impossible. I tried Filminfo+ and IMDB+, which are great scripts though but do not come along with my detail loving mind.
In a German Thread i read about creating .nfo files for each Movie file. There started my search for a program creating nfo files Moving Pictures can grab.
I ended up with the Ember Media Manager and immediately started to work with it ( I use the 1.4 Beta ).
After the first nfo files were available I let Moving Pictures have a look at it with Ember Media Manager Script which comes natively with Moving Pictures. Shortly after, I realized that for each movie only one genre, director, writer and no studio is grabbed.
Most people would say: No matter! But as I said: Detail Loving ;) !
Some hours of search time later I found some other who got aware of this problem and also I found an Issue on the Google code Page of Moving Pictures.
Now that I knew that there is no enhancement available at the moment, I started to have a look at the script myself.
The first look told me, that I have no clue of this materia. I never worked before with xml or regex. Years ago I had a Java course :D .
With the help of some www sources and the Moving Pictures WiKi concernig the grabber scripts I managed to create a Ember Media Manager script which works for me. At this point I'd like to thank @LRFalk01 who is the original Author of the script and gave me permission to share my modified script with the community. Because he did the work, his name stands still in the Author line of the Script.
As I said I'm from Germany. I have no Idea if this script works with all languages, allthough it shuold.
Now I wish everybody a happy Setting up without Up Setting. :D

Greetings
Par3in

German:
Hallo zusammen.
An erster Stelle möchte ich sagen, dass ich seid Jahren ein stiller beobachter der Mediaportal Foren bin und meine ersten Erfahrungen mit ...ich glaube Version 0.8 gemacht habe.
Letzte Woche habe ich mal wieder angefangen ein neuees Setup aufzubauen. Lief auch alles reibungslos bis es darum ging Filme mit Moving Pictures zu importieren. Wie wohl jeder deutsche Nutzer von MediaPortal weiß, ist es nahezu unmöglich einen Grabber für Moving Pictures zu finden, der deutsche Texte inkl. aller anderen Informationen grabbed ohne, dass man danach etliches kottigieren oder nachtragen muss.
Ich habe Filminfo+ und IMDB+ ausprobiert, aber so richtig bin ich mit beiden nicht warm geworden. Beides sind super Scripte und ich finds super, dass Leute sich die Arbeit in ihrer Freizeit machen, aber Detail liebendes Gemüt (zumindest wenn es um Filme geht) gab sich leider nicht zufrieden.
In einem anderen deutschen Thread hab ich davon gelesen nfo Datein von jeder Filmdatei zu erstellen und diese von Moving Pictures einlesen zu lassen. Also begab ich mich auf die Suche nach einem Programm, welches mir diese Dateien erstellt, welche Moving Pictures grabben kann.
Am landete ich beim Ember Media Manager und fing an mit diesem zu arbeiten (Ich nutze Vers. 1.4 Beta).
Nachdem die ersten nfo Dateien verfügbar waren, ließ ich Moving Pictures mit dem integrierten Ember Media Manager Script auf die Dateien los.
Kurz darauf musste ich feststellen, dass nur jeweils ein Rgisseur, Autor und Genre gegrabbed wird. Das produzierende Studio wird garnicht gefunden.
Die meisten würden sagen: Is doch egal. Aber wie gesagt: Detail liebend ;)
Nach einigen Stunden Internetsuchzeit, erfur ich, dass noch ein paar wenige andere ebenfalls Probleme damit haben und ich fand sogar ein Issue auf der Google Code Page von Moving Pictures.
Nun wurde mir klar, dass es hierfür in nächster Zeit keine Abhilfe geben wird. Also warf selsbt einen Blcik auf das Script. Der erste Blick sagte mir sofort, dass ich nicht die geringste Ahnung von dem hatte, was dort drinstand. Vorher hab ich mich nie sonderlich mit xml oder regex beschäftigt. Vor Jahren hatte ich mal nen Java Kurs :D .
Mit der Hilfe einiger Internetquellen und der WiKi von Moving Pictures hab ich es dann hinbekommen das Script so zu modifizieren, dass es für mich passt. Alle Felder sollten nun befüllt werden (hoffe ich). An diesem Punkt möchte ich LRFalk01 für das erstellen dieses Scripts danken und für die Erlaubnis meine modifizierte Version, dieses hier bereit zu stellen. Er steht auch weiterhin als Autor im Script, da er ja auch die ganze Arbeit gemacht hat.
Das ganze hat mich übrigens fast das ganze WE gekostet :D
Jetzt wünsche ich allen ein fröhliches basteln, ohne Abstürze ;) .

Grüße
Par3in


Instructions:
- Delete old Script
- Add the new Script
- Have fun

Anleitung:
- Das alte Script entfernen
- Das neue Script einfügen
- Spaß haben.
 

Attachments

  • EmberMediaManager.xml
    8 KB

DaKill3r185

New Member
February 14, 2012
2
1
Home Country
Germany Germany
Danke sehr!
Hatte bis eben ein von mir angepasstest Script (basierend auf dem von LRFalk01) im Einsatz. Habe vor einer weile den Genre Import und Jahr ändern müssen.

Nach dem ich heute mein MediaPortal und MovingPictures aktualisiert habe, ist mir aufgefallen, dass nicht mehr "Jahr" sondern "Veröffentlichungsdatum" verwendet wird. Somit steht dort nun das Datum an dem ich den Film hinzugefügt habe.
Mit Deinem Script ist alles Super! DANKE!

PS: Möchte einen kompletten reimport machen. Gibt es eine Möglichkeit den Status gesehen/ ungesehen zu exportieren und in die neue DB zu importieren?

------------

Google Translate

Thank you very much!
Had to just be a pass from me scripts (based on that of LRFalk01) in use. Had to change the genre Import and years before a while.

After today I have updated my Media Portal and MovingPictures, I noticed that no more "year" but "publication date" is used. Thus, there is now the date on which I have added to the film.
With your script everything is super! Thank you!

PS: Want to make a complete reimport. Is there a way saw the status / unseen to export and import them into the new DB?w DB?
 

schwarzrz

Portal Pro
May 23, 2010
370
57
Frankfurt
Home Country
Germany Germany
Klingt super, danke für die tolle Arbeit.
Wenn ich nun EMM nutze, wo kopiere die obige *.xml Datei hin?
Sorry falls das eine doofe Frage ist.;)
 

DaKill3r185

New Member
February 14, 2012
2
1
Home Country
Germany Germany
Du nutzt EMM wie gewohnt. Lässt von EMM das Hintergrundbild, Cover und die movie.nfo (und ggf. Filmname.nfo) ausgeben.

Im Moving Pictures gehtst Du auf den Reiter "Importer Settings" klickst unten auf "Movie Details Data Sources", deaktiverst alles (-) und fügst mit (+) [kleinen Pfeil daneben] die XML Datei als neuen Importer hinzu

Cover und Artwork habe ich auf internal Importer gesetzt. Bei Artwork (selber Registerreiter) kannst Du angeben nach was für Dateinamen der interne Importer für Cover und Hintergrund suchen soll. (Bsp. folder.jpg und fanart.jpg)

Achja, wegen meiner Frage: MovPicNFO kann wohl den watched Status ex- und importieren.
 

Edalex

Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    Hi @Par3in
    Did you try themoviedb grabber since it should be multilanguage?
    Also it will be wise to ask @RoChess to join the discussion as one of high-level experts in MovPIcs
     

    Par3in

    Portal Member
    August 25, 2014
    5
    4
    39
    Home Country
    Germany Germany
    Hi.
    @DaKill3r185
    MoPicNFo would have been my suggestion for importing watched flags. Nice you found it yourself.

    At the moment I really don't have any time to mess around with htpc stuff.
    Originally i edited the above Script just for myself. Then I thought that it would be cool if it could help other people.
    I know that it is not perfect and probably a professional would close his Eyes forever if he reads it.

    @Edalex
    Thanks for your advice. I thought that tried themoviedb grabber, but can't say for sure at the moment.
    As I said theres not much time in these days.

    German:
    Hi
    @DaKill3r185 MovPicNFO wäre auch mein Vorschlag für die watched flags gewesen. Freut mich, dass du es schon gefunden hast.

    Im Moment hab ich leider keine Zeit mich dem Hobby Htpc zu widmen.
    Ursprünglich hab ich Script nur für mich gemacht und hab mir dann überlegt, dass es doch super wäre, wenn es ein paar anderen Leuten auch hilft.
    Ich weiß, dass das gute Stück nicht perfekt ist und wahrscheinlich würde ein Professioneller Programmierer die Hände über dem Kopf zusammenschlagen, wenn er es liest.

    VG
    Par3in
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Also it will be wise to ask @RoChess to join the discussion as one of high-level experts in MovPIcs

    LOL, far from an expert, and that is a lot of German that Google translate will fail on I am sure.

    Still if any scraper-script developer needs help on RegExp or how to go about making their script work, I will be happy to assist. Drop me a PM or hop on IRC freenode server and look for "RoChess". Due to weird hours and timezones you will have to be patient, but majority of the time I will be available and can solve complex matters much quicker then in real-time chat then Q&A back and forth via forum. Of course if it is a one-off then PM or forum thread works fine.

    Now from what I gather the main questions are to preserve/transfer the watched status over. You can use the Trakt plugin for this, MovPicNFO plugin, or manually edit the SQLite database. Just keep in mind for the latter that the watched flag is spread over multiple tables so you need to know what a JOIN is in order to make it work. Seem to recall somebody made a forum post with detailed examples on how they did it, so then you can just copy and paste their efforts.

    Totally with you on the "no time" remark though, these forum posts are easy to do, and feel more like a nice distraction. Finding time to do actual scripting, especially when it gets tricky with RegExp or dozens of different configurations has not been easy these last two years due to new job. Still hoping I can this Christmas though and rewrite IMDb+, maybe even figure out a way to solve the German support :)
     

    immigrant

    New Member
    February 14, 2015
    1
    0
    Home Country
    Germany Germany
    Hi allerseits,
    vielen Dank an alle beteiligten grabber-Checker, nach einiger Suche finde ich hier die Lösung!

    Einen kleinen Bug habe ich gefunden: das <certification> flag aus der nfo wurde nicht übernommen. Der reguläre Ausdruck im grabber script scheint mit fehlerhaft zu sein:

    <set name="rx_certification">
    <![CDATA[
    \:?<certification>[^<]+)
    ]]>

    Wenn ich vor der Klammer das \: weglasse geht es:

    also statt \:?<certification>[^<]+)
    so (?<certification>[^<]+)

    immigrant
     

    Users who are viewing this thread

    Top Bottom