[Finished] [MP2-603] Option to force a Re-Import of a media item (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Up to now the only way to force a re-import of an existing media item is to remove it from the share, run a refresh of this share to get rid of the wrong entry in the DB, move the media item back in place and run another refresh. This is way to complicated and time consuming for daily usage. We need a way to force the refresh of a media item directly from within the GUI (most likely from the context menu of the MI) or at least an option to remove a MI from DB or mark it as "faulty" so it will be re-imported during the next regular run of the importer...
    I would prefer a "grab now" menu entry in the context menu but also "can live" with the second option ...
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    873
    63
    NRW
    Home Country
    Germany Germany
    It would be great, if it would be possible to add support for auto watch shares for changes!
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    Yes, it would (and it's planed already), but this is a completely different thing. This here is to correct a wrong identification, to grab missing fanart/metadata if on first run TVDB or (not that common) TMDB wasn't reachable or similar scenarios. Here are no changes in the shares but nevertheless a re-import necessary.
     

    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
    Maybe I am missing something but I just did a quick test...

    First Import
    [2015-12-01 10:42:11,724] [340352748] [75 ] [INFO ] - VideoThumbnailer: Successfully created thumbnail for resource 'F:\MPMovies\American Sniper [tt2179136].mp4'

    Then I went in and renamed the movie to not have the [tt2179136] in the file name and did a Re-Import
    [2015-12-01 10:44:31,967] [340492991] [85 ] [DEBUG] - MovieTheMovieDbMatcher: Try to lookup movie "American Sniper" from cache: True
    [2015-12-01 10:44:32,037] [340493061] [69 ] [INFO ] - ImporterWorker.ImportJob(#6): Activated
    [2015-12-01 10:44:33,582] [340494606] [85 ] [INFO ] - VideoThumbnailer: Successfully created thumbnail for resource 'F:\MPMovies\American Sniper.mp4'


    Worked like a champ and the renamed movie does play in MP2.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,565
    3,946
    Lehmden
    Home Country
    Germany Germany
    It is no "clean" option as you need to fiddle in file system nevertheless.And in this case it even did not work, if the first import got a wrong result. The renamed file only got the same metadata and fanart it had got the first time. "Try to lookup movie "American Sniper" from cache: True" is not a solution if the movie wasn't "American Sniper" but e.g. "American Sniper 2" (don't know if this exists just as example)... What is needed is a full lookup not only re-reading the cache.
    And it has to be a proper solution from inside the MP2 GUI without modifying the file system...
     

    MJGraf

    Retired Team Member
  • Premium Supporter
  • January 13, 2006
    2,478
    1,385
    I think in total we are talking about five different things in total:
    • First one is that we need a possibility for the ImporterWorker to import only a single MediaItem. This applies to first-time-imports and refresh-imports. We would also need this e.g. for watching MediaSources and automatically import single MediaItems when they are added to the MediaSource (first-time-import) or the file has changed (refresh-import). The issue that currently needs to be solved for this is that the importer works "hierarchically" in a way that it assumes that the first MediaItem to process doesn't have a "parent" MediaItem (i.e. directory). For all following MediaItems it assumes that the parent-MediaItem has been processed before in the same import. This is obviously not true, if you let it import a single MediaItem "in the middle" of a MediaSource (i.e. in a sub-directory). This behavior is currently not ideal, but this change is doable.
    • Second one is that we need a possibility to perform a refresh-import (single import or complete MediaSource import) without checking whether the last-modified-date of a file has changed. Currently, if this date has not changed, the importer ignores the file during a refresh-import. This seems also doable.
    • The third one is that OnlineLibraries also cache "false hits". So even if the ImporterWorker does perform the desired refresh and triggers the MovieMDE or the SeriesMDE, these will in turn ask the OnlineLibraries for the metadata from theMovieDb or tvDb and they will currently return the same (wrong) metadata (or no metadata if on the first run for whatever reason no metadata was found). There is a timeout IIRC when OnlineLibraries do actually download metadata although they have it in cache, but i think the timeout was something like a month or so. To be honest, I have no idea, yet, how to solve this one, because the ImporterWorker has no way to tell the MDEs "force download" (and in general it wouldn't make sense because there are MDEs for which this switch would be meaningless). A real solution would only be if we used a real http caching framework and make use real http caching, but this requires a lot of work and I wouldn't want to do it before the MIA rework is done because otherwise, @MrTechno is likely to kill me ;)
    • Then we need to adapt our UPnP subsystem so that the above can be triggered from the client side.
    • And finally we need to integrate this into our frontend.
    So it sounds easy, but unfortunately it is not really a quick thing to do... But the good news is that a big part of it was already on my toDo list - I'll add the rest as well :)
     

    Users who are viewing this thread

    Top Bottom