INTERACT FORUM
More => Old Versions => JRiver Media Center 21 for Windows => Topic started by: 8139david on January 18, 2016, 11:30:33 am
-
In the section Video, I've created a view Author, Date.
I would like to sort by Author's family name, not by first name.
How can I do that?
-
You would need to create a custom field. as an example you could call it [Director Sort]
to autopopulate it you can use the expression swap(...)
once you have created the field, through the tag window set it to show the new field then type and select a couple of files to test first
=swap([Director])
if this works like you want select all files and repeat so all are tagged.
Use this new field in your Views and/or sort orders
OR
you can also create the field based on the swap expression, so that this becomes fully automatic. You would be creating a calculation field in this case. I'd think this would be normally what you would want to do
to understand the "how to", please read the wiki here => http://wiki.jriver.com/index.php/Fields (http://wiki.jriver.com/index.php/Fields)
-
to autopopulate it you can use the expression swap(...)
once you have created the field, through the tag window set it to show the new field then type and select a couple of files to test first
=swap([Director])
I had started playing with this using a regex, and it was not working on special cases. Swap() works on all cases, which is awesome! But swap() is not documented at all. What's up with that? It's not in the expression language document at all.
Brian.
-
I had started playing with this using a regex, and it was not working on special cases. Swap() works on all cases, which is awesome! But swap() is not documented at all. What's up with that? It's not in the expression language document at all.
Brian.
hey brian
You are right its not in the wiki yet ... its relatively new and Matt just fixed it a couple of weeks ago to work with semi-colon separated items, which is totally cool.
Also please note you have the corresponding unswap(...) function. The idea is that you can swap, then unswap for display expressions ... very cool indeed. However the latter can't split using the ";" correctly http://yabb.jriver.com/interact/index.php?topic=102563.msg712224#msg712224 (http://yabb.jriver.com/interact/index.php?topic=102563.msg712224#msg712224). There is a work around, but only in Standard mode using thumbnail text. In theater view (and panes as shown in the linked thread) it doesn't split for multiple entries, but the swap and unswap are a lot easier than heavy Regex stuff.
Steve
-
Thanks.
I wonder how it swaps Asian (Chinese, Korean, probably Japanese) names?
Put in the Western order, those are often of the form: A B C, where A B is the first name, and C is the family name.
A and B are then 2 successive parts (typically syllables) of the first name.
(Names can also be of the form A C, where A is the firstname, and B is the family name, often a syllable each.)
-
Thanks.
I wonder how it swaps Asian (Chinese, Korean, probably Japanese) names?
Put in the Western order, those are often of the form: A B C, where A B is the first name, and C is the family name.
A and B are then 2 successive parts (typically syllables) of the first name.
(Names can also be of the form A C, where A is the firstname, and B is the family name, often a syllable each.)
haven't a clue ... try it and tell us .. I believe it takes the last word and then flips it with some extra stuf like for Jr. and things
-
Thanks for the extra info on swap and unswap.
Brian.
-
MrC's original regex expression was the precursor to the swap() function
http://yabb.jriver.com/interact/index.php?topic=78210.msg532803#msg532803 (http://yabb.jriver.com/interact/index.php?topic=78210.msg532803#msg532803)
-
What is the process to get the info in the wiki? I, for one, am an occasional user of the expression language and rely on the wiki for any info on it.
Now, I wonder if there are other functions and/or language features I am missing.
-
Now, I wonder if there are other functions and/or language features I am missing.
there are (one example is groupcount()...i'm pretty sure i've came across others whilst browsing really old forum posts)
the wiki is pretty good IMO, and what i can't find or figure out from there i've always been able to get excellent forum help
the problem with parsing things different ways (japanese names vs. western names for example) is that even the best machine languages need a pattern, and any change to the pattern messes it all up. as to the original question, i'm willing to bet that the swap() combined with some other expressions (say to count how many words are in the name) one could build an expression that did the swap() as desired
i'm sure blgentry could whip up a real mess of a regex to do it as well
-
What is the process to get the info in the wiki? I, for one, am an occasional user of the expression language and rely on the wiki for any info on it.
Now, I wonder if there are other functions and/or language features I am missing.
I posted this in the Wiki update thread https://yabb.jriver.com/interact/index.php?topic=86834.new#new (https://yabb.jriver.com/interact/index.php?topic=86834.new#new)
-
Thank you. I didn't know (or forgot) about the wiki update thread.
-
Maybe the wiki update thread should be pinned also so it shows up at the top.
-
I haven't pinned it because I bump it whenever I do major updates on the Wiki, and I figure that is easily enough noticed. There are already too many pinned threads, IMHO.
-
What is the process to get the info in the wiki?
For the record, I'm not sure what you meant by this question. If you just meant "how do I find stuff in the Wiki?", there are a few good ways:
* Browse around the Category Index (http://wiki.jriver.com/index.php/Category:Contents). Most of the good articles with up-to-date information are tagged with categories now, and this is a good way to browse around the content (if you aren't sure exactly what you're looking for).
* Search. The Wiki has a built in search, which works like the search on any other mediawiki install. You can also use a custom search on Google with this URL:
https://www.google.com/#q=site:wiki.jriver.com (just add your search terms in the box to the site text there).
If you meant, how do I add stuff to the Wiki? Then, that's easy:
https://wiki.jriver.com/index.php/Help_the_JRiver_Wiki