MP2-Edit - A MediaPortal 2 Media Library Editor (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Link to German thread:
    https://forum.team-mediaportal.com/threads/mp2-edit-ein-editor-für-die-mediaportal2-medienbibliothek.129077

    In this thread I like to introduce you a tool to edit the MediaPortal2 media library (ML). As there is no "official" way to correct mistakes in the MP2 ML I've started developing this tool. Aside this, MP2-Edit is offering help during migration from MP1 over to to MP2. There is a heavy work going on this not even tiny project, so mistakes, bugs and other glitches are to be expected.

    Some notes before to start. As there is no "official" way recently available to access the MP2 database, MP2-Edit is using the SQLite database with "illegal" direct access. No other DB plugins than the default SQLite plugin is working with MP2-Edit. All fanart is stored in a cache on local file system of the MP2 server, so MP2-Edit needs to run on the same machine than the MP2 server itself. And as it needs to access system folders it needs to run with Admin rights. All this is planed to be changed later, but right now it's necessary.

    In future MP2-Edit should be able to edit all aspects of the MP2 ML. But this will take a long time until this happens. As a big fan of TV series, I've started with the series part for sure...

    This is working in the current version:

    Generic management and migration:
    A full blown Backup tool is integrated as with version 0.4.0. With this you can do automatic backups triggered by a scheduled task. You can add the schedule, edit and delete it. And you can manually delete or restore backup files to the MP2 server. An extra tool named MP2-Backup is doing the backups invisible and without disturbing the usage of MP2 and/or your PC at all. MP2-Backup also is called every time you close MP2-Edit, just to have your latest work stored...
    Zwischenablage-2.jpg

    The task scheduler needs the time in 24 hours format so you have to enter it this way. The time on screen-shot is 7pm. If you set 0 as number of backups to keep then all backups are kept and you are responsible for the disk space your own.
    Default settings are do a backup every day of the week at 8pm and keep 7 days of backup...
    When you leave MP2-Edit a manual backup is triggered.

    You can backup and restore the "watched flags" of your series collection too. As the format of the watched backup is compatible with TVSeries you simply can import your watched flags from TVSeries into MP2. This is done in TVSeries config, tab general:
    Zwischenablage-1.jpg


    Here you also can import watched flags from MP2 into TVSeries. As with v 0.5.0 the watched status of the MP2 movies- part can be exported in a similar format. And it's possible to export those flags from MovingPictures, MyFilms and MyVideos too. Later you can import those flags into MP2 ML. But as none of those plugins has an import function similar to TVSeries this is an "one way only" option here for movies.
    Zwischenablage-4.jpg



    Media management:
    The series part is fully functional. You can edit all series specific data in the MP2 ML. And the fanart management is working too. You can replace unwanted fanart, remove broken files or add missing fanart of all types available (Poster, Banner, Backdrop, Season-Poster, Season-Banner and Episodes-Thumb) ClearArt and similar is not used by MP2 at all today. If this will change, MP2-Edit will add those features too. As with version 0.3.0 the movies part is working too.
    And with v 0.5.0 the movieset management also is working.

    A full manual will be written later. Some notes for a quick start.
    MP2-Edit is installed by an average installer and will find it's home in "C:\Program Files (x86)\Team MediaPortal\MP2-Edit\" (or without the (x86) on 32 bit OS). So nothing special here.

    To edit the database it's necessary to stop MP2 server prior to use MP2-Edit.
    This normally is no big deal, but if you use TV with MP2 this will interrupt all running recordings and also prevent scheduled recordings from starting. That's why MP2-Edit is asking if it's safe to stop MP2 Server. The start of MP2-Edit can last a while, so a splash-screen is showing what happens under the hood.
    After start-up the settings are presented. If you change something here (e.G. the GUI language) you need to restart MP2-Edit to make the changes work.
    Zwischenablage-2.jpg


    When you select the tab "series" it will look like this:

    Zwischenablage-3.jpg


    For further work it's absolutely necessary that all episodes will have the TVDB ID field filled with proper ID. Due to various circumstances during import it's possible that not all episodes will have this very important data. This can and will lead to errors. An indicator is shown, if a series has at least a single episode without a TVDB ID. If it looks like the screen-shot above, all is good and you can go on with whatever you want to do. But attention, if it's looking like this:
    Zwischenablage-4.jpg


    Have a look at the red "X" near the TVDB ID field.
    Zwischenablage-4a.jpg


    This shows up if a series has at least one episode without TVDB ID and needs to be changed before you can do other work on this series. This is done easily by refreshing the complete series. All episodes will get the TVDB and IMDB ID entered in the corresponding fields. And you can set the whole series as watched or unwatched, if you want. This is selected by the three radio buttons in the south. After clicking on OK all is fine:
    Zwischenablage-5.jpg


    No more red "X"...

    All other fields are not jet supported by MP2 and are there just for information (read from local file cache) and to fill the space until they become available in MP2. The series name could probably be changed, but then MP2 don't find any fanart and also don't refresh any data on the renamed series. That's why the series name stays untouched. The long field above is meant for a future "sorttitle" filed...

    Even less is to be editable if you expand a series tree to get the seasons shown...
    Zwischenablage-6.jpg


    Only thing to change here is the watched status. You can set the whole season to watched or unwatched, if you like.

    There is more to do if you expand the season to show the episodes info...
    Zwischenablage-7.jpg


    Here you can edit the episodes title, the storyplot, the rating and the watched flag. Later can be done in MP2 GUI also, but if you are here, so why not change it too.

    If you click on the thumb, you can exchange the thumbnail stored in DB. MP2 generates it's own thumbnails and don't download them from TheTVDB like most other programs. Normally this is the better way, as the TVDB server isn't that much loaded and you got thumbs for every episode. Lots of episodes don't have thumbs online... But sometimes the generation fails. Then you can exchange the thumb here. The original size of the thumbs is 240x135 px. I don't know what's happened if this will be extend a lot...

    And now the fanart management. You can reach it by clicking on the big series banner, if you're on series or season level... usage is identical on every section. Only on adding new season fanart you need to select the season belonging to the new fanart. on series specific fanart this is not necessary.

    There are three buttons, "Replace", Delete" and "Add new". With replace you can exchange the graphics of as unwanted poster (banner,...) As I'm not able to read or speak Russian, I don't like this poster too much...
    Zwischenablage-8.jpg


    If you simply delete this poster, it will be downloaded again on next import. So if you replace it with another image MP2 still "thinks" it's there and don't grab it again... After replacing the Russian poster I like it the better:


    Same name, different poster.
    Zwischenablage-9.jpg


    Delete is suitable for broken files. You can recognise them easily as the are not shown. To be precise if you select a broken image the previous image is still there. Delete it and hopefully the next download has more success. But you also can replace a broken image like it's done with unwanted, for sure.

    And, as you may have thought, "Add new" is to add missing fanart to MP2.

    To leave fanart management simply close the window ("x" on top right)...

    With v0.3 the movies part is working too.
    Zwischenablage-2.jpg

    The sort title field and the fields with "n.a." (not available) are not jet used by MP2. As this will be changing soon, the fields are prepared to be usable instantly after this functionality is added to MP2. Aside this the usage is 99% identical to the series part. To reach the fanart management you need to click on the poster. Aside this the only difference is the watched status. This will be toggled by clicking on the "eye" and is written to the database instantly instead of storing it when pressing "save".

    The movieset management is ready as with v 0.5.0
    Zwischenablage-1.jpg


    You need to have an eye on the TheMovieDB_ID here, similar to the series part. If you can see a red "x" next to the input field you need to fix this before you can do anything else. If necessary a button to do the fix is shown.
    Aside this you can add or remove movies to/from this collection. With the Remove button the marked movie in the middle list will be removed from this set. If you click on add movies a new window pops up with a list of all your movies
    Zwischenablage-2.jpg

    As none of the movies recently belonging to this set are removed here you only need to mark the movies you want to add new.
    Fanart for moviesets is managed in an identical way to the movies fanart. Click on the poster in the movieset list and the fanart- management window appears.
    Zwischenablage-3.jpg



    Recent version is

    0.6.2

    and can be found in our repo:
    https://www.team-mediaportal.com/extensions/mp2-plugins/mp2-edit

    I will add new information and new releases as soon as they are available here...

    Edit:
    New download link as the path in our repository was changed recently
     
    Last edited:

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Short Update...
    A resizeable GUI really is tricky. Adds a lot of extra work but it's needed to have enough space for editing the library. The main GUI is working (I pray), including the resize functionality. I've added a progressbar to all time consuming actions and I've successfully done some transfers of watched flags from MP2 DB into MP1 TVSeries plugin and vice versa.

    Next to do is to read the MP2 DB and make a list of all series in ML as sometimes not all entries are completely filled for what reasons ever. About 600 out of my 20.000 series episodes don't have the TVDB-ID field filled in my database, but this is the most important metadata for every series episode imho. So this will the first step in editing the ML I'll implement....

    For the very brave out there I've attached the 0.1.0 version, not even to be classified as "Alpha". But as the first step always is a backup of the DB there should not be much harm in trying it.
    If you change the GUI language or some of the path on first tab, you need to restart the tool to get the new settings to work.

    By the way, I only tried it running on Win7 x64 (program is compiled as 32 bit application, but I haven't done any tests on x86) and with latest weekly of MP2 and version 4.1.0.2089 of the MPTVSeries plugin. So if you use other versions there probably may be issues...
     

    Attachments

    • MP2-Edit_0.1.0.7z
      620.6 KB

    osre

    Retired Team Member
  • Premium Supporter
  • December 14, 2014
    772
    387
    Home Country
    Germany Germany
    A resizeable GUI really is tricky. Adds a lot of extra work but it's needed to have enough space for editing the library
    Using WPF, a resizable GUI is really easy, but if you're used to WinForms, switching to WPF is not.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I've learned programming on Commodore C64 some 30 years ago and never was able to make the step to object oriented programming... Al those classes, namespaces or methods I never was able to follow. My tools are written in AutoIt. Also development in AutoIt really is fun in general, a resizeable GUI is a lot more complicated than a fixed sized one. An average GUI element is defined with one command and 2 or 3 parameter (position, size and maybe style). But if the GUI is resizeable you need at least three commands with lots of different parameters to adjust the behaviour when resizeing. So it's three times the work. And as this is my first flexible GUI I have to learn all that from scratch...
     

    MaxMan23

    MP Donator
  • Premium Supporter
  • September 8, 2007
    380
    48
    Home Country
    Germany Germany
    Sorry mal auf deutsch, ist es nicht besser das web based zu machen, so könnte man überall im Netzwerk drauf zugreifen. So wie es bei jedem linux Receiver möglich ist. Wäre das nicht sinnvoller? Man könnte z. B. vom Sofa aus mit dem Handy oder IPad auf nicht erkannt Filme zugreifen und diese richtig erkennen lassen.

    Aber trotzdem, danke für die Arbeit :)
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    There is a German thread:
    https://forum.team-mediaportal.com/...telobjekt-fürs-neue-jahr.129077/#post-1117461
    Short translation: Why not using a Web based solution?
    Short answer in English:
    This will probably be the "official" solution (very few steps are done in this direction), but this is much, much, much more work to do and will last some more years, I fear. I'm not willing to wait that long, so I'm doing what I can do, and that is this tool. I see it as an BTN temporary solution until the "super duper high end" solution is ready.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    The design will be similar to but not a 100% copy of MP1 Plugins TVSeries and Moving Pictures so it is as we all know it.

    Today's progress:
    Zwischenablage-1.jpg

    A TreeView containing all series with the corresponding seasons is generated from MP2 database. And I can read other values like TVDBID based on the selected item.
    Next is to trigger the read by simply clicking on a tree- item instead on pressing a button. Have to figure out how this is done (it's possible for sure)

    There definitely will be an option to set a whole series or season as watched or unwatched at once.

    After that is working I'll add management of fanart.

    Another thing to think of is the necessary stop of MP2 Server at the beginning. I would prefer to do this automatically on program start (similar to the restart of the server on exiting MP2 Edit). But what happens to running recordings if MP2 Edit is started by accident and the user is using TVE3.5 (native TV)? The recording is broken in this case. Don't know if I can catch this somehow. As I'm not using TVE3.5 atm, this problem don't exist to me, as the MP1 TV server is running independently of MP2 server...
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Update
    The series GUI is nearly complete. All that is readable from MP2 database is read. The rest is from cache on C: Drive. Just to be prepared if finally the MIA rework is ready.

    Some screenshots (sorry for German language, final program will completely be in English too...)
    Zwischenablage-1.jpg

    Zwischenablage-2.jpg

    Zwischenablage-3.jpg

    Now I can work on the season part of the GUI. When this is working, a first release will be done....
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,387
    3,816
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Small Update....
    Did lots of debugging last days, but find some time to start with fanart management.
    Zwischenablage-1.jpg


    Zwischenablage-2.jpg


    Zwischenablage-3.jpg


    Again, sorry for German language....
     

    Users who are viewing this thread

    Similar threads

    This is not possible if it is a self made series, like personal travel videos etc.
    This is not possible if it is a self made series, like personal travel videos etc.
    Hi! I have videos that I want to show in TV-Series, such as personal TV series and educational series. As some examples I have...
    Replies
    8
    Views
    947
    • Sticky
    Great work and release!! Contrats to all involved developers :):D I installed MP1 initially, but didn’t get along with it. Many things were not intuitive, too frumpy and the gui had hardcoded dependencies to plug-ins, some buttons didn’t work even without a note due to that. Same for player controls, why do I see always play and pause...
    Great work and release!! Contrats to all involved developers :):D I installed MP1 initially, but didn’t get along with it. Many...
    We are proud to present MediaPortal 2.4 MediaPortal 2.4 is a full-blown media center software that addresses most common user...
    Replies
    4
    Views
    585
    Afternoon guys, As the title implies, I have my movies and series organised using tiny media manager and as of an update to tMM (maybe 6 months ago) it now includes keyart.jpg as a downloadable media file. My folders include. poster.jpg banner.jpg etc. and keyart.jpg After an import, for me, MP2 displays the keyart.jpg as the...
    Afternoon guys, As the title implies, I have my movies and series organised using tiny media manager and as of an update to tMM...
    Afternoon guys, As the title implies, I have my movies and series organised using tiny media manager and as of an update to tMM...
    Replies
    0
    Views
    436
    Tested on other uptodate hardware, sata3 helped a lot. When client take info from serveew cpu is arround 50 % Envoyé de mon LG-H870S en utilisant Tapatalk
    Tested on other uptodate hardware, sata3 helped a lot. When client take info from serveew cpu is arround 50 % Envoyé de mon...
    Hi, I have been trialling MP2 since the release of 2.3 and I am having a big problem with it's usability. I have a server on a...
    Replies
    30
    Views
    2K
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common user requirements out of the box. Aside from its support for Live TV and Radio, it offers a complete media server for music, movies, and TV shows. Info is automatically downloaded from various sources to...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    We are proud to present MediaPortal 2.3.1 MediaPortal 2.3.1 is a full-blown media center software that addresses the most common...
    Replies
    0
    Views
    1K
    Top Bottom