Problem with Moving Articles in Movie Title (i.e. Art of War, The)? (1 Viewer)

RoChess

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Added by fforde @ Issue 700 - moving-pictures - Add third title sorting option to REMOVE preceding articles - Project Hosting on Google Code

    The current configuration option to enable/disable the "Articles for Removal" doesn't actually remove anything, so as per the above link you select between option #1 (True) and option #2 (False). After implementation of issue 700, there will be a 3rd option to remove the actual prefixes, so that sequel titles will sort more as expected for those that prefer it that way (like me :D).

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

    Ok I finally setup the wife with MPC-HC, so that she can keep watching her stuff, and I can mess around with MovingPictures plugin via RDP :p

    So as I'm studying the "Advanced Settings" -> "MediaPortal GUI" -> "Sorting" -> "Articles for Removal"

    I have the default: "the|a|an|ein|das|die|der|les|la|le|el|une|de|het" in there.

    But when I force "The Art Of War" to be reimported (or update the sortby field), it doesn't seem to use the above entries to remove the "The" part (and yes, the setting to 'fix' the sortby field is set to True).

    Title = "The Art of War"
    Sorty By ="art of war the"

    Perhaps in the code, the conversion from "The Art of War" into "Art of War, The" is done before the "Articles for Removal" step is done. I had already surrendered myself to the fact that I would have to go over my entire collection and manually correct all the SortBy fields, but it does look like I stumbled upon a little bug.

    I still had debug logging enabled, but nothing shows in there that relates to this, so for a developer, the steps to reproduce are:

    • add file "The Art Of War.avi"
    • wait for auto approval steps to finish
    • goto "Movie Manager" tab
    • locate "The Art Of War" movie
    • look at the "Sort By" field
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    This is how the function is intended to work RoChess. It swaps the article for sorting purposes but leaves the actual movie title intact. There is currently no option to reverse the article for the movie title itself. If there is demand for this though we could add it fairly easily.

    EDIT: Maybe I am misunderstanding you... What is the desired result?
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #3
    As you know my original problem was that the sequels wouldn't sort correctly.

    This was due to the SortBy field not having the correct information imho. Now I had just surrendered myself to the fact that I would have to manually correct all the SortBy fields, until I was reminded that there is some automatic process done by the Moving Pictures plugin in regards to removing parts of the title before it gets sorted.

    Under "About" -> "Advanced Settings" -> "MediaPortal GUI" -> "Sorting"

    There is the "Remove Title Articles" option, which specifies:

    If enabled, articles such as "the", "a", and "an" will not be considered when sorting by title. This affects the Sort By field and for a change to take effect you must refresh your Sort By values from the Movie Manager.

    I have a feeling that the Regular Expression used to enable this only looks for the string values present in the "Articles for Removal" setting at the start of the title string. However it seems that the title gets adjusted into "Art of War, The" before it gets to that step.

    And then the entire "Remove Title Articles" option becomes useless.

    I guess it all depends on how the Sort By field value is supposed to be. Is it supposed to always show "art of war the" and then the "Remove Title Articles" will remove the " the" part everytime the list gets sorted. Or is the Sort by field supposed to show "art of war" because the title has already been 'fixed'?

    To save on processing time, I believe the best way would be to have the SortBy field reflect the ultimate goal for the users who set the "Remove Title Articles" option to "True" and that is to use the "art of war" result then.

    I hope you understand me now, because I know how hard it can be to convey thoughts.
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    So you are expecting "art of war" when you are actually getting "art of war the"? By design it retains the article and just moves it to the end of the string, although I am not sure there is a good reason for this other than the fact that it seems to be a common practice when sorting. The Advanced Setting is perhaps mislabeled as this does not actually remove the title article, it simply moves it to the end. The intention of this feature is to have movies like The Matrix show up under the Ms rather than the Ts.

    I am not sure this feature will help much with adjusting the sort position of movie sequels.
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #5
    Ahhh, it was named in such a way that I expected it to "remove" the string values.

    Now for me everything would be solved if it doesn't move the string to the end, but actually removes it.

    Since this only affects the "Sort By" title, I can not forsee any problems this would cause for the users who are used to the current behaviour. The only thing that changes if I manually remove the ending " the" part on the example movie I've used "The Art Of War", is that the sequels get sorted in the right order.

    If I remove any of the other values ("the|a|an|ein|das|die|der|les|la|le|el|une|de|het") on other movies (and once again this is only for the SortBy field), it either keeps the movie in the exact same position, or it fixes the sorting order as I would expect it to occur.

    I just can not phantom that there is any user of Moving Pictures out there who would want the original movie to be shown after all the sequels (for those that have "Remove Title Articles" set to "True"), and that is exactly what is happening now on certain titles, with the easiest example being the "The Art Of War" series that I've used to highlight this issue.

    Otherwise the "Remove Title Articles" option should be renamed to something like "Relocate Title Articles To The End" because nothing is 'removed' and all the prefixes are moved to the end of the title. I'd rather see it actually remove them, but that will at least remove confusion as to the behaviour that is implemented now.

    :sorry: for moaning about this, but I'm dealing with WAF on this :mad:
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #6
    After scanning the SVN more closely, I saw that my sorting question was a repeat of:

    - moving-pictures - Enhance "Sort Name" Logic - Project Hosting on Google Code

    But that issue seems to be closed for the v1.0.0 beta I'm running, however the problem still exist (was reminded of it again last night).

    • "The MovieTitle"
    • "The MovieTitle Sequel"

    Gets converted into:

    • "MovieTitle, The"
    • "MovieTitle Sequel, The"

    The SortBy field actually gets stripped of the (comma), so we end up with:

    • "MovieTitle The"
    • "MovieTitle Sequel The"

    Since 'S' comes before 'T', the actual movie listing (using the Title) becomes:

    • "The MovieTitle Sequel"
    • "The MovieTitle"

    This *ONLY* affects the SortBy field, and only causes a problem for movies with a prefix such as 'The', because a movietitle such as 'A Beautiful Mind' that gets converted into 'Beautiful Mind A' will still get sorted first.

    So if the code can be adjusted to 'remove' those prefixes in the SortBy field (as specified in the "Articles remove" setting), then everything will be good (and it shouldn't break anything, because if I adjust the SortBy field manually it works perfect) :D
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #7
    DBMovieInfo.cs

    Existing:

    Line 994: SortBy = _sortBy.Substring(word.Length) + " " + _sortBy.Substring(0, currWord.Length);​

    New:

    Line 994: SortBy = _sortBy.Substring(word.Length);​


    That should fix it, and will do the actual removal (not appending it to the end). It will only affect the SortBy field and not conflict with anything else. The result will be that "Matrix, The" will get sorted properly above "Matrix Sequel, The".
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    • Thread starter
    • Moderator
    • #9
    It was just the inconsistency that I found.

    "Movie Title" / "Movie Title Sequel" sort correct in that order, so not a problem there.
    "Movie Title Sequel, The" / "Movie Title, The" sort incorrectly due to the 'T' following 'S' in alphabet (only the sort order, the title is unaffected and perfectly shows "The Movie Title" sorted under the letter starting the 'M'ovieTitle).

    But I guess everybody else prefers to sort the movies with the article prefix the way it is now, since nobody jumped in on the threads I've started on this.

    So thank you a lot for raising the enhancement issue (I'll raise it myself that way in the future once I figure out the firewall filtering rule blocking me on Google code signup) as it removes my need to run SQL Queries manually to do so.
     

    fforde

    Community Plugin Dev
    June 7, 2007
    2,667
    1,702
    43
    Texas
    Home Country
    United States of America United States of America
    I think it is probably more that most people are not aware than prefer one method over the other. I think your siuggestion more often than not would provide results more in line with expectations though so it's still a good change.
     

    Users who are viewing this thread

    Top Bottom