2009-07-07, 11:03
Pages: 1 2
2009-07-07, 19:36
You can add sort tokens by using advancedsettings.xml . You can search the wiki for exact directions, or paste this text into a file called advancedsettings.xml and put it in your userdata folder.
Edit: Just to clarify, adding these tokens will make xbmc ignore them when sorting movies (so "L'Enfants" would be sorted under "E"). I assumed this was what you were asking. You can add more tokens by separating them with a | (pipe).
Code:
<?xml version="1.0" encoding="UTF-8"?>
<advancedsettings>
<sorttokens>the|l'</sorttokens>
</advancedsettings>
Edit: Just to clarify, adding these tokens will make xbmc ignore them when sorting movies (so "L'Enfants" would be sorted under "E"). I assumed this was what you were asking. You can add more tokens by separating them with a | (pipe).
2009-07-08, 00:17
This is what I have in advancedsettings.xml
But, the L apostrophe doesn't work.
Code:
<sorttokens>
<token>the</token>
<token>a</token>
<token>le</token>
<token>la</token>
<token>les</token>
<token>l'</token>
</sorttokens>
But, the L apostrophe doesn't work.
2009-07-08, 01:13
unless those movies are named 'l' ', that is the ' is followed by a space, it won't work
2009-07-08, 12:58
That's what I figured. Is it hard to change the code to treat ' as a delimiter? Or do I have to rename all of my movies (approx 100 like this) instead?
2009-07-08, 13:09
it's not hard, see StartsWithToken in SortFileItem.cpp
2009-07-08, 15:51
Ok, I figured it out.
For anyone interested, open up Settings.cpp and locate this code at line 1376
And change it to this:
And in your advancedsettings.xml
For anyone interested, open up Settings.cpp and locate this code at line 1376
Code:
if (pToken->FirstChild() && pToken->FirstChild()->Value())
{
g_advancedSettings.m_vecTokens.push_back(CStdString(pToken->FirstChild()->Value()) + " ");
g_advancedSettings.m_vecTokens.push_back(CStdString(pToken->FirstChild()->Value()) + ".");
}
And change it to this:
Code:
if (pToken->FirstChild() && pToken->FirstChild()->Value())
{
g_advancedSettings.m_vecTokens.push_back(CStdString(pToken->FirstChild()->Value()) + " ");
g_advancedSettings.m_vecTokens.push_back(CStdString(pToken->FirstChild()->Value()) + ".");
g_advancedSettings.m_vecTokens.push_back(CStdString(pToken->FirstChild()->Value()) + "'");
}
And in your advancedsettings.xml
Code:
<sorttokens>
...
<token>l</token>
</sorttokens>
2009-07-08, 16:26
trac a diff and i'll see if we can't do this by default
cheers
cheers
2009-07-08, 18:51
spiff:-
Maybe we should specific the token delimeter in our advancedsettings if we aren't already ..
Maybe we should specific the token delimeter in our advancedsettings if we aren't already ..
2009-07-08, 20:42
2022-11-10, 04:10
I realize how old this thread is, but it's very close in relevance to what I'm trying to fix. I have a few movies that start with an apostrophe < ' >, followed by a word, such as 'Twas or 'Tis, but I can't get Kodi to ignore the apostrophe with the sort tokens, so it sorts them by the letter 'T'. I also tried adding a "blank" separator like below, but that also didn't work.
Is there a way to accomplish this?
Code:
<token separators="'"></token>
Is there a way to accomplish this?
2022-11-10, 05:29
(2022-11-10, 04:10)Skirge01 Wrote: [ -> ]<token separators="'"></token>Can you try the following and see if it works. I think the problem is that you need to add a value.
xml:<sorttokens>
<token separators="'">T</token>
</sorttokens>
2022-11-10, 10:59
I don't think you need the separator in this case, as I believe that's only needed you have a sort article including a delimiter with no space to what you want to sort by.
So you could also try
So you could also try
Code:
<token>'T</token>
xml:
2022-11-10, 11:08
Actually thinking about I'm not sure this is an appropriate use of sort tokens, so I'm not convinced anything would work.
2022-11-10, 11:18
After some more thought I wonder is this would work
So the apostrophe is both the token and separator, since I believe the way it works is
<sort token><separator><word on which sort begins>
xml:<token separators="'">'</token>
So the apostrophe is both the token and separator, since I believe the way it works is
<sort token><separator><word on which sort begins>
Pages: 1 2