Kodi Community Forum
Articles and sorting - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Articles and sorting (/showthread.php?tid=124807)



Articles and sorting - duckredbeard - 2012-03-06

I just updated to Eden and love it. I don't know if it was available in previous versions, but the "ignore articles when sorting" is going to help this. If I choose to use it. My issue in 10.1 is that it seems that articles are sometimes sorted and sometimes not. I have many movies with "The" in the title and some are sorted alphabetically with the "T"s. Is there a fix? Can titles that include punctuation also be sorted for the first letter? The film "The 'Burbs" shows up as the first title in my library when alphabetically sorted, because of the "'". I"d rather it be with the "B"s.


- DDDamian - 2012-03-06

You can edit the title after it's been scraped and drop the apostrophe.

To disable "The" go to System>Settings>Appearance>File Lists.


RE: - s7evinx - 2021-03-26

(2012-03-06, 06:50)DDDamian Wrote: You can edit the title after it's been scraped and drop the apostrophe.

To disable "The" go to System>Settings>Appearance>File Lists.
Sorry to revive an old thread, but this is the ONLY one I have found regarding my issue. I am also attempting to sort the movie, "The 'Burbs" correctly into the "B's", but can't find the right <sorttoken> to get it to work. And I do not want to rename my movies; there has to be a way to do this while keeping the original title intact. I was able to sort "*batteries not included" using <token separators="">& # 3 9 ;</token> but I think the fact that "The 'Burbs" also has "The " in front is what is throwing it off.


RE: - pkscout - 2021-03-26

(2021-03-26, 20:13)s7evinx Wrote:
(2012-03-06, 06:50)DDDamian Wrote: You can edit the title after it's been scraped and drop the apostrophe.

To disable "The" go to System>Settings>Appearance>File Lists.
Sorry to revive an old thread, but this is the ONLY one I have found regarding my issue. I am also attempting to sort the movie, "The 'Burbs" correctly into the "B's", but can't find the right <sorttoken> to get it to work. And I do not want to rename my movies; there has to be a way to do this while keeping the original title intact. I was able to sort "*batteries not included" using <token separators="">& # 3 9 ;</token> but I think the fact that "The 'Burbs" also has "The " in front is what is throwing it off.
Try this format in the advancedsettings.xml file:

xml:

    <sorttokens>
        <token>the</token>
        <token>a</token>
        <token>an</token>
    </sorttokens>



RE: - s7evinx - 2021-03-26

(2021-03-26, 20:37)pkscout Wrote: You can edit the title after it's been scraped and drop the apostrophe.
Try this format in the advancedsettings.xml file:

xml:

    <sorttokens>
        <token>the</token>
        <token>a</token>
        <token>an</token>
    </sorttokens>
This is my current code in the advancedsettings.xml file:

xml:

    <sorttokens>
        <token>A</token>
        <token>An</token>
        <token>The</token>
        <token separators="">& # 3 9 ;</token> <!-- Apostrophe Symbol ' -->
        <token separators="">& # 4 2 ;</token> <!-- Asterisk Symbol * -->
        <token separators="">& q u o t ;</token> <!-- Quotation Symbol " -->
    </sorttokens>

(Without the spaces, of course) These take care of every movie I have except for "The 'Burbs". I need something that will make the sorting ignore "The", the space, & the apostrophe so that it will appear in the B's without having to remove the apostrophe from the title.


RE: - pkscout - 2021-03-27

(2021-03-26, 21:05)s7evinx Wrote:
(2021-03-26, 20:37)pkscout Wrote: You can edit the title after it's been scraped and drop the apostrophe.
Try this format in the advancedsettings.xml file:

xml:

    <sorttokens>
        <token>the</token>
        <token>a</token>
        <token>an</token>
    </sorttokens>
This is my current code in the advancedsettings.xml file:

xml:

    <sorttokens>
        <token>A</token>
        <token>An</token>
        <token>The</token>
        <token separators="">& # 3 9 ;</token> <!-- Apostrophe Symbol ' -->
        <token separators="">& # 4 2 ;</token> <!-- Asterisk Symbol * -->
        <token separators="">& q u o t ;</token> <!-- Quotation Symbol " -->
    </sorttokens>

(Without the spaces, of course) These take care of every movie I have except for "The 'Burbs". I need something that will make the sorting ignore "The", the space, & the apostrophe so that it will appear in the B's without having to remove the apostrophe from the title.
I'm going a bit out on a theoretical limb here, but reading the wiki entry on sort tokens at:

https://kodi.wiki/view/Advancedsettings.xml#sorttokens

I think you would need one more token that is:

xml:

<token>The & # 3 9 ;</token>

I'm pretty sure the sort token stuff is one and done, not additive. So once it finds a match it stops. So I would put this token at the top. But I might be wrong there.


RE: - s7evinx - 2021-03-27

(2021-03-27, 04:12)pkscout Wrote: You can edit the title after it's been scraped and drop the apostrophe.
I'm going a bit out on a theoretical limb here, but reading the wiki entry on sort tokens at:

https://kodi.wiki/view/Advancedsettings.xml#sorttokens

I think you would need one more token that is:

xml:

<token>The & # 3 9 ;</token>

I'm pretty sure the sort token stuff is one and done, not additive. So once it finds a match it stops. So I would put this token at the top. But I might be wrong there.
That was better than any idea I've tried so far. But unfortunately, that still didn't work.


RE: Articles and sorting - jjd-uk - 2021-03-27

The easiest way for one offs like this is to go to Context Menu -> Manage -> Edit sort title and change to The Burbs

Note - Sort title changes what is used for sorting only, the movie will still display as The `Burbs in the listings.


RE: Articles and sorting - s7evinx - 2021-03-27

(2021-03-27, 15:14)jjd-uk Wrote: The easiest way for one offs like this is to go to Context Menu -> Manage -> Edit sort title and change to The Burbs

Note - Sort title changes what is used for sorting only, the movie will still display as The `Burbs in the listings.

Brilliant!! Wow... I'm really kicking myself for not thinking of that, considering I've used nfo <sorttitle> for so many others, such as MCU & DCEU films. Thank you so much! You are a life safer!!


RE: Articles and sorting - huttdes - 2021-03-28

I recently rescanned my library after an upgrade.
In the settings I have 'ignore articles' checked it is only working for 'the'
All my movies starting with 'A' are in the A's.

I was going to add the sort tokens listed above to my advanced settings but when I did and reopened Kodi all of the media in my library disappeared. Would I have to rescan everything if I did this? I removed it from the settings file and everything was back to normal.

One more thing... even though it is ignoring the 'the' article I still don't like how it lists the title.
For example 'The Avengers'
While it is listed in the A's like it should be it is listed 'The Avengers' in the middle of the A titles... I would prefer to see it as 'Avengers, The'
Is this possible?


RE: Articles and sorting - s7evinx - 2021-03-29

(2021-03-28, 18:23)huttdes Wrote: I recently rescanned my library after an upgrade.
In the settings I have 'ignore articles' checked it is only working for 'the'
All my movies starting with 'A' are in the A's.

I was going to add the sort tokens listed above to my advanced settings but when I did and reopened Kodi all of the media in my library disappeared. Would I have to rescan everything if I did this? I removed it from the settings file and everything was back to normal.

One more thing... even though it is ignoring the 'the' article I still don't like how it lists the title.
For example 'The Avengers'
While it is listed in the A's like it should be it is listed 'The Avengers' in the middle of the A titles... I would prefer to see it as 'Avengers, The'
Is this possible?
As for your first issue, when I added <sorttokens> to my advancedsettings.xml it worked perfectly fine after a restart. Didn't have to rescan anything. Can you post your code from your advanced settings file?

Your second worry is a bit intriguing. I haven't come across how to do that yet, but if you find out, I may be interested in doing that myself.


RE: Articles and sorting - huttdes - 2021-04-13

(2021-03-29, 21:14)s7evinx Wrote:
(2021-03-28, 18:23)huttdes Wrote: I recently rescanned my library after an upgrade.
In the settings I have 'ignore articles' checked it is only working for 'the'
All my movies starting with 'A' are in the A's.

I was going to add the sort tokens listed above to my advanced settings but when I did and reopened Kodi all of the media in my library disappeared. Would I have to rescan everything if I did this? I removed it from the settings file and everything was back to normal.

One more thing... even though it is ignoring the 'the' article I still don't like how it lists the title.
For example 'The Avengers'
While it is listed in the A's like it should be it is listed 'The Avengers' in the middle of the A titles... I would prefer to see it as 'Avengers, The'
Is this possible?
As for your first issue, when I added <sorttokens> to my advancedsettings.xml it worked perfectly fine after a restart. Didn't have to rescan anything. Can you post your code from your advanced settings file?

Your second worry is a bit intriguing. I haven't come across how to do that yet, but if you find out, I may be interested in doing that myself.
Hey, just saw this reply.

Disregard the not working thing... I just tried it again and I have it all working. I did manage to reproduce that situation though... I just had some of the code screwed up. I had added a line and must of mixed something up.

I've added this line for the movie [Rec]

<token separators="">[</token> <!-- Opening Bracket [ -->

As for the second issue about A,An,The... this is probably beyond me if it requires any coding so if you figure it out please let me know!