Feature request: override on filename / tag (1 Viewer)

vpupkin

Portal Pro
March 26, 2011
84
8
I use IMDB+ extensively :cool: and nowadays it is just about perfect for my setup. I recently switched to "update all fields" on refresh, and really like it as it keeps my DB fields in sync with IMDB changes as they happen. All my edits happen in custom xml override file (and there are not that many), so these edits are not affected by refresh. However, there is a usecase that I can't support using existing plugin - different versions of the same movie. An example would be 2D and 3D versions of the same movie - say Ice.Age.mkv and Ice.Age.3D.mkv, and previously I manually mapped them to Ice Age 2D and Ice Age 3D. Both naturally correspond to the same tt-id, so I can't use xml override as it is - and so these edits are lost.

It would be great if in addition to tt-id i would be possible (optionally) to differentiate on filename / path (maybe even with regexps for flexibility - might be an overkill, simple substring will suffice):

<rename id="tt1080016" file="Ice.Age.mkv" title="Ice Age: Dawn of the Dinosaurs 2D" />
<rename id="tt1080016" file=".*3D.*" title="Ice Age: Dawn of the Dinosaurs 3D" />

This might be applicable for other cases - for instance Theatrical vs Director's Cut. Most people will just keep Director's Cut, but sometimes the two are quite different (see e.g. The Butterfly Effect)

:D in advance!
 

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I use IMDB+ extensively :cool: and nowadays it is just about perfect for my setup. I recently switched to "update all fields" on refresh, and really like it as it keeps my DB fields in sync with IMDB changes as they happen. All my edits happen in custom xml override file (and there are not that many), so these edits are not affected by refresh. However, there is a usecase that I can't support using existing plugin - different versions of the same movie. An example would be 2D and 3D versions of the same movie - say Ice.Age.mkv and Ice.Age.3D.mkv, and previously I manually mapped them to Ice Age 2D and Ice Age 3D. Both naturally correspond to the same tt-id, so I can't use xml override as it is - and so these edits are lost.

    It would be great if in addition to tt-id i would be possible (optionally) to differentiate on filename / path (maybe even with regexps for flexibility - might be an overkill, simple substring will suffice):

    <rename id="tt1080016" file="Ice.Age.mkv" title="Ice Age: Dawn of the Dinosaurs 2D" />
    <rename id="tt1080016" file=".*3D.*" title="Ice Age: Dawn of the Dinosaurs 3D" />

    This might be applicable for other cases - for instance Theatrical vs Director's Cut. Most people will just keep Director's Cut, but sometimes the two are quite different (see e.g. The Butterfly Effect)

    You just need to make a small modification to your filename and it will work.

    What you want is the 'special edition' system, which by default is enabled (but verify otherwise).

    Filename needs to be in the following form:


    • Ice Age (3D).mkv
    • Ice Age (3D Edition).mkv
    • Ice Age (Director's Cut).mkv
    • Ice Age (Director's Cut Edition).mkv
    • Ice Age (Extended).avi
    • Ice Age (Extended Edition).avi
    • Ice Age (Unrated).avi
    • Ice Age (Unrated Edition).avi
    • Ice Age (Alternate Ending).mkv
    • Ice Age (Alternate Ending Edition).mkv

    PS: You can also use [3D] or {3D} bracket style.

    And whatever is between those brackets (from the pre-approved list shown above) will be appended to the end of the title in MovingPictures. Since this system is done at the very end, it will append it to renamed titles from the group+rename system, as well as English corrected titles. Theatrical is left out on purpose as that would be the title as-is, since the IMDb website refers to the versions as shown in theaters.

    So "Casino Royale (Extended).avi" will become "James Bond XXI: Casino Royale (Extended)" inside MovPic.

    The IMDb tt-ID *has* to be provided during import for this to work, either via filename as shown in the examples, or via NFO file (I forgot I adjusted the IMDb+ scraper-script a while ago where that is no longer required and it will work without it now.

    You will have to sent the movies in question back to the importer if you have already added them, because only the search-node makes this system functional. After a movie has been imported ony the details-node of the scraper-script is used, which has no access to the filename to get the (3D) info.

    :D
     

    vpupkin

    Portal Pro
    March 26, 2011
    84
    8
    Thanks, this will achieve most of the things that I wanted to. Couple of smaller touch ups:

    - is it possible to accept tags in .Extended. format as well? Historically, I named everything in this format (i.e. Death.Proof.2007.Unrated.mkv), and while renaming is possible, that would be a pain as all the supplementary files (such as subtitles, checksums, etc) will need to be redone, and I'd rather avoid this without making my own custom edits in the scraper. I also believe that this is not an uncommon naming convention, so this might be useful for other people.

    - is it possible to make a list of tags customizable? While in most cases existing one is sufficient, there are cases when I'd like to add some. For instance, Dawn of the Dead (1978) had a theatrical release, Romero's Director's Cut and Argento's Cut and who knows what other versions

    - (nitpicking alert :) ) sorting with tags: it doesn't seem that I can control sorting when tags are present. So for The Butterfly Effect I am ending up with 2 entries:

    The Butterfly Effect I (Director's Cut)
    The Butterfly Effect I

    and the director's cut is sorted before theatrical because sorting is by

    butterfly effect i directors cut the
    butterfly effect i the

    I'd prefer director's cut on the second line, but it doesn't seem to be possible - I can't override sort order without losing the tag.

    :D again!
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Thanks, this will achieve most of the things that I wanted to. Couple of smaller touch ups:

    - is it possible to accept tags in .Extended. format as well? Historically, I named everything in this format (i.e. Death.Proof.2007.Unrated.mkv), and while renaming is possible, that would be a pain as all the supplementary files (such as subtitles, checksums, etc) will need to be redone, and I'd rather avoid this without making my own custom edits in the scraper. I also believe that this is not an uncommon naming convention, so this might be useful for other people.

    There is a high risk of conflicts with titles that contain the tags then, for example: Saw 3D, a user might have that as "Saw.3D.avi" not wanting it to match with "Saw I (3D)" but to have it be the "Saw III" movie it is. However you can use 3rd party tools such as ReNamer that will make it very easy for you to mass rename your existing files, including supplementary files.

    - is it possible to make a list of tags customizable? While in most cases existing one is sufficient, there are cases when I'd like to add some. For instance, Dawn of the Dead (1978) had a theatrical release, Romero's Director's Cut and Argento's Cut and who knows what other versions

    I use regular expression inside the scraper-script.

    Line #1362 to be exact via: ([\(\[\{](?:3D|Extended|Unrated|Director's Cut|Alternate Ending)(?: Edition)?[\}\]\)])

    I was forced to go with a whitelist to avoid conflict with any other type of filename setup another user might have and getting it wrong. It is however possible to add a few other strings to that list if they are valid ones.

    - (nitpicking alert :) ) sorting with tags: it doesn't seem that I can control sorting when tags are present. So for The Butterfly Effect I am ending up with 2 entries:

    The Butterfly Effect I (Director's Cut)
    The Butterfly Effect I

    and the director's cut is sorted before theatrical because sorting is by

    butterfly effect i directors cut the
    butterfly effect i the

    I'd prefer director's cut on the second line, but it doesn't seem to be possible - I can't override sort order without losing the tag.

    This is going to change in next MovPic release, where article removal setting is not appended at the end, but actually 'removed'. It has already been fixed at SVN level via: Issue #1348 and will make it into MovPic v1.3.1
     

    vpupkin

    Portal Pro
    March 26, 2011
    84
    8
    There is a high risk of conflicts with titles that contain the tags then, for example: Saw 3D, a user might have that as "Saw.3D.avi" not wanting it to match with "Saw I (3D)" but to have it be the "Saw III" movie it is. However you can use 3rd party tools such as ReNamer that will make it very easy for you to mass rename your existing files, including supplementary files.

    Actually, it turns out that there is a better solution - it seem that special tags are also looked up in parent directory name, and these ones I can rename without too much hassle. This is awesome!

    - is it possible to make a list of tags customizable? While in most cases existing one is sufficient, there are cases when I'd like to add some. For instance, Dawn of the Dead (1978) had a theatrical release, Romero's Director's Cut and Argento's Cut and who knows what other versions

    I use regular expression inside the scraper-script.

    Line #1362 to be exact via: ([\(\[\{](?:3D|Extended|Unrated|Director's Cut|Alternate Ending)(?: Edition)?[\}\]\)])

    I was forced to go with a whitelist to avoid conflict with any other type of filename setup another user might have and getting it wrong. It is however possible to add a few other strings to that list if they are valid ones.

    I still think that it would be great to expose this regexp for advanced users; it doesn't even have to have a GUI interface, and can be edited in the old-fashioned way in Options IMDb+ Scraper.xml directly - as long as this setting will be kept on between automatic scraper updates. Here are some of the "special-edition" type tags that I could find in my collection that are not picked up by current regexp (not all of these make sense for the general whitelist, I'd much rather add the ones I want to see rather then rely on general whitelist):

    (Unrated Director's Cut)
    (Extended Director's Cut)
    (Extended Collector's Edition)
    (Special Collector's Edition)
    (Special Extended Edition)
    (Collector's Edition)
    (Ultimate Edition)
    (Special Edition)
    (Limited Edition)
    (Deluxe Edition)
    (Extended Cut)
    (Uncut)
    (Remastered)
    (Criterion Collection)
    (Superbit Collection)
    (??th Anniversary)
    (Argento's Cut)

    Speaking of special editions, an interesting pickle is Apocalypse Now Redux (2001). themoviedb lists it as a separate movie, alluding to that users, critics and director consider edits to be so extensive as to constitute a new movie. imdb, however, has only one tt-id, and that is for Apocalypse Now (1979). The best I can think of supporting the redux version is with name like Apocalypse Now (Redux), with (Redux) being recognized as a special edition tag. This will still get me incorrect (original) year and original summary, but it will be correctly displayed in the movie list, and will allow coexistence with the original, 1979, edit. I don't think I can achieve it any other way while still using IMDB+ as a scraper.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I can not use the options XML file at search-node level inside the scraper-script, at least not without serious changes that I do not want to make yet. So I could hardcode all of your suggestions into both regular expressions used for the details-node and search-node, because the brackets make it easy to avoid false-positives with the title itself.

    I'll have another look at it, because I could also skip extending the current whitelist method and add a seperate system that allows for custom entries via something that would never normally occur, such as for example double brackets.

    So "Avatar ((whatever you want)).avi" can then be used by those that wish to go beyond the default whitelisted ones.

    That way you don't even have to mess with IMDb+ options and have much more room to add whatever tag you want.
     

    vpupkin

    Portal Pro
    March 26, 2011
    84
    8
    I'll have another look at it, because I could also skip extending the current whitelist method and add a seperate system that allows for custom entries via something that would never normally occur, such as for example double brackets.

    So "Avatar ((whatever you want)).avi" can then be used by those that wish to go beyond the default whitelisted ones.

    That way you don't even have to mess with IMDb+ options and have much more room to add whatever tag you want.

    I actually like this idea, if you will be able to specify it on the folder level as well; I would probably argue for hijacking one of the existing brackets (probably curly ones {} as these are not widely used, I believe) - double brackets look just... weird ;)

    So in this case I can have

    Avatar {Enhanced Special Deluxe Popcorn Edition}/Avatar.avi

    and the popcorn edition will be sucked in as a tag in MovPic list; correspondingly, there are some tags that I want to skip in the list (some editions are purely DVD collections and do not change the main video), I can just rename brackets on the folder level, not touching video files:

    Avatar (Enhanced Special Deluxe Popcorn Edition)/Avatar.avi

    This one will show up as plain Avatar in MovPic, while I still can see tags in the folder list.

    I think this would be great!
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I know it will not look nice, but considering that the end result is to browse the collection via MovingPictures and not Windows Explorer, I think you will survive. I just do not want to run the risk of false-positives on somebody else's collection that works perfect now. The whole "fix one thing, break another" is very annoying, so I want to avoid it.

    Due to other issues that crept up, the format I'm testing with right now is "Movie title ([Custom Tag]).avi" which will result in a MovingPictures title of "Movie title [Custom Tag]". I couldn't use the (..) brackets methods due to conflicts with the way things currently work for other features.

    Reason being is that right now "English Title (Foreign Title)" is used, and only via whitelisting can I preserve existing special edition tags at scraper-script level, because there is no seperate MovingPictures database field for me to work with. That is why to preserve tags on a refresh I need to make sure I'm not duplicating other (...) bracket info that is used to display other functions.

    So [...] brackets will be used to display the custom tags inside GUI and I think that's a good compromise. I did think of {...} but the skin results in GUI looked ugly if you ask me, and [...] did not look too bad. The added benefit is that you will be able to quickly identify their seperation from the whitelisted special edition tags.

    And yes, if the filename fails to find a match, then the foldername is checked. That will remain functional even for this new method :cool:

    So can you live with "([...])"? Because I did some small tests and it seems to work fine at my end without breaking existing function (only tested with a small sample set), so I can release it as IMDb+ scraper-script v4.2.1 for you to try.

    On a side note: If MovPic would get a few extra database fields for scraper-scripts to use then I could do soooooo much more. Unfortunatly the lead developer does not like scraper-scripts to be as powerful as IMDb+ and wants to integrate it into the plugin itself. On a theoretical level I totally agree as it would benefit a lot more users and work for all other scraper-scripts as well, but unfortunatly my C# skills are not good enough to get the IMDb+ function integrated into MovPic itself. So I have to keep pushing the scraper-script system to its limits and use all these dirty workarounds to get close enough.

    :D
     

    vpupkin

    Portal Pro
    March 26, 2011
    84
    8
    I know it will not look nice, but considering that the end result is to browse the collection via MovingPictures and not Windows Explorer, I think you will survive. I just do not want to run the risk of false-positives on somebody else's collection that works perfect now. The whole "fix one thing, break another" is very annoying, so I want to avoid it.

    Due to other issues that crept up, the format I'm testing with right now is "Movie title ([Custom Tag]).avi" which will result in a MovingPictures title of "Movie title [Custom Tag]". I couldn't use the (..) brackets methods due to conflicts with the way things currently work for other features.

    Reason being is that right now "English Title (Foreign Title)" is used, and only via whitelisting can I preserve existing special edition tags at scraper-script level, because there is no seperate MovingPictures database field for me to work with. That is why to preserve tags on a refresh I need to make sure I'm not duplicating other (...) bracket info that is used to display other functions.

    So [...] brackets will be used to display the custom tags inside GUI and I think that's a good compromise. I did think of {...} but the skin results in GUI looked ugly if you ask me, and [...] did not look too bad. The added benefit is that you will be able to quickly identify their seperation from the whitelisted special edition tags.

    And yes, if the filename fails to find a match, then the foldername is checked. That will remain functional even for this new method :cool:

    So can you live with "([...])"? Because I did some small tests and it seems to work fine at my end without breaking existing function (only tested with a small sample set), so I can release it as IMDb+ scraper-script v4.2.1 for you to try.

    Actually, I don't mind ([]) - somehow this looks better than (()), and having [] in the MovPic list is just fine. So this should work quite well for me.

    Question though, what what would happen if I'll put whitelisted tag into ([])? I assume this will still work, i.e. Avatar ([Director's Cut]) will be parsed into Avatar [Director's Cut]. If that's the case, I may just standardize on ([]) tagging without thinking what's whilelisted and what not.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Actually, I don't mind ([]) - somehow this looks better than (()), and having [] in the MovPic list is just fine. So this should work quite well for me.

    Question though, what what would happen if I'll put whitelisted tag into ([])? I assume this will still work, i.e. Avatar ([Director's Cut]) will be parsed into Avatar [Director's Cut]. If that's the case, I may just standardize on ([]) tagging without thinking what's whilelisted and what not.

    Done, v4.2.1 is available.

    Test it well please, as you have a much larger collection to play with then the few test movies I used myself.

    And yes, anything goes between ([...]) so you can indeed repeat the whitelisted items as well, it is taken as-is, so have fun :D
     

    Users who are viewing this thread

    Top Bottom