INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: pcstockton on February 17, 2013, 01:29:14 pm
-
Good day to you Forum!
I saw someone's screen shot yesterday and wondered how they wrote the code to show how many albums are in an artist thumb, then how many tracks and total time on the album thumb.
I see where to do it and have played around, but this part of MC always eludes me. Its been to long since I learned HTML and C++ ;)
Thanks!
Patrick
-
In categories view, certain fields are interpreted as totals when used as thumbnail text: [Track #], [Duration], etc. Just add them to thumbnail text. Others might have been global variable-based. Where is the post?
-
Mr C,
I cant recall where I saw the post.
But the had Artist Thumbnails with Artist name as it always is. Then in a smaller font underneath it said "4 Albums"
In the album drill down the Album Thumbs showed the name of the Album. Then in a smaller font underneath it said "12 Track" and "43:43" Total Time beneath that.
Thanks!
Patrick
-
Set up Rules for file display to include the following (add it via Import/Export to what you already have):
[=save(0,v_nalbums[album artist (auto)])1]=1 [=ifelse(Compare([track #].[disc #], <=, 1.1),save(math(1+load(v_nalbums[album artist (auto)])),v_nalbums[album artist (auto)]))1]=1
Set thumbnail text at the Artist level:
[Name]
<font color="888888">load(v_nalbums[album artist (auto)]) Album/##/ifelse(compare(load(v_nalbums[album artist (auto)]), >, 1),s)<//i><//font>
Set thumbnail text at Album level:
[Name] /[[Date (year)]/]
[Track #] @ [Duration]
[# plays]
-
Thanks for the help MrC!
That text worked on the albums but doesn't on artists. For artists it simply says "Album"
Any thoughts?
Thanks again!
Patrick
-
I'm not sure I follow what the issue is. Here is my Artists view, and below that the Albums are shown in the attached screenshots.
-
Ooops. I was missing the very first "Rules for File Display"
Everything is great.
Many thanks!
-
LAST question.... I promise.
What if under Album Thumb i just want to to say e.g. "14 Tracks", no time.
Thanks!
-
[track #] Tracks is all you need then.
-
You are the best!!!
-
Marra writes elsewhere:
MrC
Thanks for your reply.
Sorry, it looks like I got the code from another thread you replied to.
This is the what I'm using
[=save(0,v_nalbums[album artist (auto)])1]=1 [=ifelse(Compare([track #].[disc #], <=, 1.1),save(math(1+load(v_nalbums[album artist (auto)])),v_nalbums[album artist (auto)]))1]=1
How do I go about ignoring the ifelse component to reflect change in [album artist(auto)] and [album] only - irrespective of track numbers.
Is this clearer?
For instance at the moment if I only have 1 track from an album, say track #5, the calc leaves it empty. However, I would like it included in totals as I have set albums as complete or incomplete elsewhere.
See if this works. Remove the red parts:
[=save(0,v_nalbums[album artist (auto)])1]=1 [=ifelse(Compare([track #].[disc #], <=, 1.1),save(math(1+load(v_nalbums[album artist (auto)])),v_nalbums[album artist (auto)]))1]=1
leaving just:
[=save(0,v_nalbums[album artist (auto)])1]=1 [=save(math(1+load(v_nalbums[album artist (auto)])),v_nalbums[album artist (auto)])1]=1
-
MrC
Thanks but this is producing tracks in total per artist correctly.
Not # albums per artist.
Using
load(v_nalbums[album artist (auto)]) and
[=save(0,v_nalbums[album artist (auto)])1]=1 [=save(math(1+load(v_nalbums[album artist (auto)])),v_nalbums[album artist (auto)])1]=1
Sorry
-
I think I'm still misunderstanding what you want. Ignore the code. Instead, what are we trying to count?
- Number of Albums for each track Artist ?
- Number of Albums for each Album Artist ?
Remember, Album Artist (auto) will be one of:
- Artist (when there is only a single value for all tracks on entire album)
- Album Artist when it is not empty
- (Multiple Artists) when Album Artist is empty and Artist varies across an Album's tracks
Maybe some examples will be useful.
Also, where / how will these values be used?
-
Sorry for confusion,
Trying to count number of albums for each album artist. In my case album artist is not empty and includes "Various Artists" for (multiple artists).
This is purely for statistical purposes in Theater view. You drill down to track detail for any one track and displays album details (incl. #tracks per album,duration per album etc)
and artist details (#tracks per album artist - working correct - and #albums per album artist = current task)
So for Bob Dylan track Hurricane from Desire
Under track
Track 1 Hurricane
Under album
Desire, 9 tracks, duration 56.05
Under artist
Bob Dylan, 159 tracks , XXXX albums
Hope this is clear and my apologies again
-
In Set rules for file display, this will calculate the number of Albums / Album Artist (auto):
[=save(0,v_ntracks_AlbumKey())1]=1 [=save(0,v_nalbums_[Album Artist (auto)])1]=1 [=save(math(1+load(v_ntracks_AlbumKey())),v_ntracks_AlbumKey())ifelse(compare(load(v_ntracks_AlbumKey()), =, 1), save(math(1+load(v_nalbums_[Album Artist (auto)])), v_nalbums_[Album Artist (auto)]))1]=1
Use the following expressions where you want the corresponding values:
Number of Tracks per unique album:
load(v_ntracks_AlbumKey())
Number of Albums per Album Artist (auto):
load(v_nalbums_[Album Artist (auto)])
These are independent of track # and disc #.
-
Thank You MrC.
Your dedication to helping others here is amazing. I have been around since version 7 or 8??, passively watching for ideas etc for improvements. This assistance given by yourself (and others) has played a major contribution to enhancing the users experience. Cheers!!
-
Wow - thank you very much.
Its a very nice and helpful "community" of users and developers. I learn something from them every day.
-
Well when come about expression Mr C is like in Godlike mode so cheers mate for help me as well and others, and maybe when i will need some things i will ask you :)
Btw that expression work more or less, but i find a way to work so now im happy thx again :D
-
agreed.
MrC=Godlike
-
Dave Grohl has already laid claim (http://www.nme.com/news/foo-fighters/55132) to said title.
-
Godish?