this view could not be built (2 Viewers)

resa

Portal Pro
February 24, 2008
156
21
the sunny side.
Home Country
Germany Germany
Hi.

@JSchuricht :

Have you already tried to use MP2-Edit if it is maybe usefull for finding and removing the broken entries from database?
https://www.team-mediaportal.com/extensions/mp2-plugins/mp2-edit

Maybe there are also other tools for SQL-Lite that can help? I am actually not familiar with SQL-Lite, i.e. dunno if there is some kind of cache that can be left behind at dbase-file on errors etc.

Maybe an dbase-repair can already fix this issue, have you tried this already?

@HTPCSourcer and whom else interessted:

UserProfileDataMAnagement = MP2 backend-service, working on dbase; SetUserMediaItemData=function of this service, setting
Guid profileId, Guid mediaItemId, string key, string data
into dbase for the video, seems to be something like play-status and/or playcount, (haven't the patience to overflew all the source ;) )

First therory is "PlayerContext: ResumeState" is the issue, maybe unknown and therefore refused entry.

Second theory is, based upon the SQLite-erros following, that forcing automated remove of this dbase-entry by removing the videofile itselfs also failing, due to there are references in this table, needed by other tables, i.e. to know how to link for data in a third table or something similar... (i.e. this tables contains UserID and MediaID, second table contains only MediaID and data used in a query together with data from third table which contains only UserID, to get correct pairing of UserID and MediaID also the first table get's queried - therefore the entry in first table can not removed unless the data in table two and three are removed, since dbase would turn inconsistent in that case)

We'll see if something of that was correct or not ;)

Very interessting, i assume i have found a new hobby: Exploring MePo source by following errors.... hrhrhrhr... Maybe this kicks my ass moving finally in order for start trying to build some simple plugins - planning on since ~3 years now :D

regards.
 

MJGraf

Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Hi JSchuricht,
    Sweeney Todd The Demon Barber of Fleet Street (2007)
    When you have a look at TheMovieDB (https://www.themoviedb.org/search?query=Sweeney+Todd) , you can see that the 2007 movie is only listed with its German name ("Sweeney Todd - Der teuflische Barbier aus der Fleet Street") so that my first guess is that the movie cannot be found by its filename (I admit there is an "alternative title" in English, but I'm not sure whether alternative titles are used to find a movie by name).
    But you mention that you have nfo-files for all your movies and this should make all file or folder name matchin redundant. If the nfo-file is correct, the movie should be identified as movie (and therefore show up in the Movie section) in any case then. Can you please post the following:
    • Exact name of the Sweeney Todd movie file (including file name extension);
    • Exact name of the Sweeney Todd nfo-file (including file name extension); and
    • upload the nfo-file of Sweeney Todd as a whole here to the forum.
    Based on this, we can figure our why this movie is not recognized (at least I hope so ;) )
    Michael
     

    resa

    Portal Pro
    February 24, 2008
    156
    21
    the sunny side.
    Home Country
    Germany Germany
    Not intended to offend, more an question, since i currently working deep on the topic scrapers with kodi and some other tools....

    For me, if combination field on the left is set to "Deutsch" the page title is indeed
    Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007)

    But there is also the original title mentioned on that page, right below the combination field on the left:

    Original Title
    Sweeney Todd: The Demon Barber of Fleet Street

    Also I can set English at combination field and the page title turns to that original title... down the page on the left are also some additional titles are listed....
    So it seems, that all neccessary Data is available on tmdb...

    Did you really think the scraper in MePo2 isn't able to catch this up? Have you MePo2 installed and do you like to create a dummy video-file with the same filename to sort this out?

    Your Post frightend me about MePo2, if the scraper in there works that poor, i have to urgently plan new in a hurry now.... for the upcomming install at a friends mediastructure that i currently prearange all the things exactly just now - meaning in this momement.... :confused:

    Can someone confirm or unconfirm this?

    Sorry, but thanks and best regards.


     
    Last edited:

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    66
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    There seems to be more going on here than meets the eye...
    First there appears to be an issue with this movie, seem to be an issue with the name halcyon-swingers because even the DbMatcher is only doing a lookup for Swingers (btw: the matcher Caped the S) and it did the lookup twice

    VideoThumbnailer: Successfully created thumbnail for resource 'C:\video\Swingers (1996)\halcyon-swingers.720p-x264.mkv'
    MovieTheMovieDbMatcher: Try to lookup movie "Swingers" from cache: False
    MovieTheMovieDbMatcher: Try to lookup movie "Swingers" from cache: False


    Right after that is the movie in question, Is the system Now looking at the Directory Name instead of the Movie Name?
    Dir: Sweeney Todd The Demon Barber of Fleet Street (2007)
    Movie:confused:weeney Todd 2007
    It even looks like the Matcher did a double lookup for the Directory name....

    VideoThumbnailer: Successfully created thumbnail for resource 'C:\video\Sweeney Todd The Demon Barber of Fleet Street (2007)\Sweeney Todd 2007.mkv'

    MovieTheMovieDbMatcher: Try to lookup movie "Sweeney Todd The Demon Barber of Fleet Street" from cache: False
    MovieTheMovieDbMatcher: Try to lookup movie "Sweeney Todd The Demon Barber of Fleet Street" from cache: False


    As for the DB Error, there is a 34 minute gap between the Importer finishing and another system accessing the Sweeney Movie... These logs do not have any MP2 Client Logs so a remote system accessed the movie.
    With that, How can a lookup of a movie have such an impact on the DB?
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Your Post frightend me about MePo2
    There is no need to be frightened. I just checked the code and we use the "SEARCH" method of TheMovieDb's API. In the API documentation it says:
    Code:
    Text based search is the most common way. You provide a query string and we provide the closest match. Searching by text takes into account all original, translated, alternative names and titles.
    So my suspicion above was wrong: original, translated and alternative names and titles are all taken into account.
    But still interested in the nfo-file. @morpheus_xx coded the MovieMDE so he might know more about why the name search doesn't work. But I wrote the NfoMDE and obviously I'm very interested why it doesn't find the movie based on an IMDB-ID in the nfo-file...
     

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    Wow, this got a lot of attention. Thanks everyone for the help.

    resa, I have used MP2-Edit. From memory it crashed when I tried to access the corrupt entry that I originally had. I have not tried any SQL-Lite tools yet. I believe the database still has issues with marking movies watched as I keep finding watched movies marked unwatched but I will save that issue for later. Also saving a crash on screen resize issue I have had with the last 2-3 development versions. Too much to do in too little time.
    I am not entirely sure I am following what you want for a test but I created a blank file named Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007).mkv with a matching nfo file and MP2 did not detect it at all. I then renamed the original movie to Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007).mkv and it did detect it in videos but not in movies. I did notice the importer was still looking for the english title in the logs. On the assumption the the scraper is using the folder name still, I renamed the folder to Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007). It's still not showing up in movies but the log file now says MovieTheMovieDbMatcher: Try to lookup movie "Sweeney Todd - Der teuflische Barbier aus der Fleet Street " from cache: False instead of the english title.
    So the scraper seems to prefer the folder name which is good for a secondary, nfo should be first but it still doesn't show up in movies. On a side note, the year appears to not be used during the lookup which may be contributing to another issue I have where many recycled movie titles show up under the wrong year even with nfo files.

    MJGraf, movie title is Sweeney Todd 2007.mkv, nfo is Sweeney Todd 2007.nfo. I have also tried with both named Sweeney Todd The Demon Barber of Fleet Street (2007) and a few other shorter variations with the same results. The nfo is vary basic, just a text file created with notepad containing
    Code:
    http://imdb.com/title/tt0408236/

    breese, I think Swingers is being looked up by the folder name based on what I found above with Sweeney Todd. The movie was accessed by a remote client to see if it would play and it did. The test server is a virtual machine and even with Remote FX turned on, MP2 client is vary unusable.
     

    Attachments

    • Sweeney Todd 2007.zip
      210 bytes

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    If there are multiple results from an online query, then it is tried to find the best matching title by various steps:

    A single lookup is executed like this:
    https://github.com/MediaPortal/Medi...ies/TheMovieDB/TheMovieDbWrapper.cs#L127-L172

    1. Try to find exact one entry, where the text is the "same" (exact or LevenshteinDistance) exactMatches = movies.FindAll(s => s.Title == moviesName || s.OriginalTitle == moviesName || GetLevenshteinDistance(s, moviesName) == 0);
    2. If there are still multiple matches, a maybe given year is considered next: var yearFiltered = exactMatches.FindAll(s => s.ReleaseDate.HasValue && s.ReleaseDate.Value.Year == year);
    3. As last, it's tried to find exact one title with LevenshteinDistance with maximum tolerance: movies = movies.Where(s => GetLevenshteinDistance(s, moviesName) <= MAX_LEVENSHTEIN_DIST).ToList();

    Then there is additionally an outer processing which tries to split titles by "-" (which is quite common for translated titles, where the original one is followed by a localized title):
    https://github.com/MediaPortal/Medi...ries/TheMovieDB/TheMovieDbWrapper.cs#L82-L113


    So the lookup algorithmn is quite complex already, but will still fail if there are more then 1 possible result after all tests.

    In your case I also think that only the file name is used here for lookup, the full name in the parent folder is not considered.



    The best way is to have a IMDBId available, either from;
    • File name
    • Folder name
    • MatroskaTags
    • .NFO file
    Then there is no texual lookup, but a IMDBid based one, which gives exact matching.

    So if you name your file: C:/video/Sweeney Todd The Demon Barber of Fleet Street (2007)/Sweeney Todd [tt0408236].mkv it should be already enough for an unique match.


    Why the supplied .nfo was not considered in your last try, I don't know...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    Why the supplied .nfo was not considered in your last try, I don't know...
    I can :)
    Well, the easiest way is certainyl, as Morpheus said, to put the IMDB number into the file name.

    But you can also achieve this via the nfo-file. These nfo-files are a mess in so far as there is no standard. I know that Kodi accepts XML in nfo-files, but also - as you have it - plain links to imdb without any XML boilerplate around it. And the worst Thing is that KODI also accepts a mixture of both - some XML-tags and then a link to IMDB for the rest. The thing I don't like about this is that this is against the official XML-spec....
    Long story short: we currently only support XML in nfo-files. If you replace the content of your nfo-file with the following:
    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <movie>
      <id>tt0408236</id>
    </movie>
    Then your nfo-file will be correctly read and it will recognize the movie without changing the file Name.

    Maybe a few more explanation to what you experienced:
    I am not entirely sure I am following what you want for a test but I created a blank file named Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007).mkv with a matching nfo file and MP2 did not detect it at all.
    MP2 checks files with video extension first to make sure the file actually contains a Video (this is done with mediaInfo). If the file doesn't contain a Video (such as in your case with a blank file), it will not be imported at all.
    I then renamed the original movie to Sweeney Todd - Der teuflische Barbier aus der Fleet Street (2007).mkv and it did detect it in videos but not in movies.
    If a file is identified as actually containing a Video, it is flagged as Video and will Show up in the Video section of MP2. To make it show up in the Movies section as well, MP2 Needs to either find a unique hit on TheMovieDb (see Morpehus Explanation above) or there must be a "valid" nfo-file with a <movie> XML-tag. For you the <movie>-XML tag was missing....

    Hope that helps!
     

    JSchuricht

    MP Donator
  • Premium Supporter
  • January 13, 2009
    239
    45
    Arizona
    Home Country
    United States of America United States of America
    I tried both methods, imdb in the file and the xml nfo with different file names to make sure it reimports and they both seem to work with the movie showing up in movies. I like the xml nfo method better as I think it will be less likely to cause issues with the already imported movies. The question is how would I implement this. I think there are around 3,300 movies with about 10% missing but even if I manage checking and making one nfo per minute it's over 55 hours to convert everything.
     

    Users who are viewing this thread

    Top Bottom