Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
since i'm making changes to the database anyway, i wanted to see how people felt about those pesky "the" items. should they be added to the database with ", the" to sort correctly?
if so, what should be altered to this format? artist names? album titles? song titles?
lastly, should the ", the" addition use the same capitalization as the original tag, or should it default to ", the" ?
(note, this change will likely mean you need to delete your database and rescan. if not, you'll probably wind up with duplicates for all your "the" items.)
Posts: 26,215
Joined: Oct 2003
Reputation:
187
i think it should be everything (artists, albums + titles)
not sure if there's any other prefixes that need the same behaviour? can't think of any off the top of my head.
also, it should be doable without having to delete the database - i've added upgrade code to the video database, and this seems an appropriate time to add it to the music database as well. i can take care of this if you're busy with other stuff.
on a semi-related note, i've been thinking how to better do custom label formatting in the case where fields are missing. perhaps something like this:
[%n. ][%a - ]%t
would make sense? i don't think we'd need to offer the ability for brackets within brackets, so it shouldn't be too bad.
edit: actually, now that i see the system "in-print" it seems like all we need is to ignore all characters between a void field and the next non-void field - no need for brackets at all i don't think.
cheers,
jonathan
Posts: 10,520
Joined: Sep 2003
Reputation:
10
Gamester17
Team-XBMC Forum Moderator
Posts: 10,520
2005-03-02, 17:34
i have to say the hated words 'please make it optional' here, (as i and probly many more too prefer "the matrix" etc. instead of "matrix, the" etc. ...yes even in a a=>z database)
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
@gamester
right now i'm just targeting music, but i'm thinking about doing something similar to the video database next. and i knew you were gonna say to make it an option. but. it should be easy to make an option under library.
i was just thinking that we dont need to have the database store them in ", the" format, but just have the function that sets the label convert it to ", the" format. [is this what you were thinking, jmarshall?]
and now that i look at the sorting code, we can correct the sorting without even changing the label since the sorting uses a string copy. so its just a matter of removing the "the " from the beginning.
the question then becomes, do you want "the matrix" sorted by "m" even though the label says "the matrix"?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
kraqh3d: yeah, i think it's best done in the sort routine as you say. no point having extra options unless they are absolutely necessary.
i think sorting the matrix in matrix seems most obvious to me. this is how every video store i've been to has sorted it, not to mention the phone book etc. etc.
cheers,
jonathan
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
so then do we have two options:
1) label "the *" as "*, the"
where this will actually change the label of the list item.
2) sort without "the " prefix
where this just sorts ignoring a "the" prefix
of course option 2 would not be selectable if option 1 is already selected.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
my preference is no options and just implement number 2. i see little real reason for rearranging the label - they are supposed to read with the the in front, after all. the only reason to rearrange it is so that it sorts without the the. this should just be done at the sort level - no need for options then. no doubt someone will request that the "the" appears in the t's, thus forcing an option.
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
i implemented option 2 without a setting to disable it. it's only in the nav window for now. i'll commit it later tonight and we can guage the response.
Posts: 10,520
Joined: Sep 2003
Reputation:
10
Gamester17
Team-XBMC Forum Moderator
Posts: 10,520
2005-03-04, 11:02
where's my option god dammit?!, hihi :lol:
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
its correct. the sorting ignored a leading "the ". thats "the" plus a space. your last item does not have the necessary space. the space is necessary or movies like "they live" would sort wrong.
Posts: 56
Joined: Dec 2003
Reputation:
0
pervious version of xbmc no such problem
is there a way to fix it?
thankz
Posts: 26,215
Joined: Oct 2003
Reputation:
187
there isn't a problem.
as kraqh3d has already pointed out, all that is occuring is that titles with "the " at the beginning are being sorted by the second word, just like in practically every name based sorting method.
this has only just recently been done like this, which is why you didn't see it occuring previously.
example: if you wanted to look for "the matrix" in a long list of movie titles, would you think of "the" or would it be easier to think of "matrix".
Posts: 56
Joined: Dec 2003
Reputation:
0
the matrix a lot more easier for me (a-z )
that why i ask a custom fix for the filename sorting