INTERACT FORUM

More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: pcstockton on February 17, 2013, 01:29:14 pm

Title: Thumbnail Text Editing
Post 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
Title: Re: Thumbnail Text Editing
Post by: MrC on February 17, 2013, 01:32:49 pm
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?
Title: Re: Thumbnail Text Editing
Post by: pcstockton on February 17, 2013, 07:02:51 pm
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
Title: Re: Thumbnail Text Editing
Post by: MrC on February 17, 2013, 08:09:35 pm
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]
Title: Re: Thumbnail Text Editing
Post by: pcstockton on February 18, 2013, 06:46:38 pm
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
Title: Re: Thumbnail Text Editing
Post by: MrC on February 18, 2013, 07:31:14 pm
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.
Title: Re: Thumbnail Text Editing
Post by: pcstockton on February 18, 2013, 08:48:41 pm
Ooops.  I was missing the very first "Rules for File Display"

Everything is great.

Many thanks!
Title: Re: Thumbnail Text Editing
Post by: pcstockton on February 18, 2013, 08:50:17 pm
LAST question.... I promise.

What if under Album Thumb i just want to to say e.g. "14 Tracks", no time.

Thanks!
Title: Re: Thumbnail Text Editing
Post by: MrC on February 18, 2013, 10:38:02 pm
[track #] Tracks is all you need then.
Title: Re: Thumbnail Text Editing
Post by: pcstockton on February 19, 2013, 12:45:03 am
You are the best!!!
Title: Re: Thumbnail Text Editing
Post by: MrC on June 30, 2013, 08:33:04 pm
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

Title: Re: Thumbnail Text Editing
Post by: Marra on June 30, 2013, 09:30:41 pm
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
Title: Re: Thumbnail Text Editing
Post by: MrC on June 30, 2013, 09:39:10 pm
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?
Title: Re: Thumbnail Text Editing
Post by: Marra on June 30, 2013, 10:16:53 pm
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

Title: Re: Thumbnail Text Editing
Post by: MrC on July 01, 2013, 01:08:21 am
In Set rules for file display, this will calculate the number of Albums / Album Artist (auto):

Code: [Select]
[=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 #.
Title: Re: Thumbnail Text Editing
Post by: Marra on July 01, 2013, 03:03:58 pm
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!!
Title: Re: Thumbnail Text Editing
Post by: MrC on July 01, 2013, 03:07:41 pm
Wow - thank you very much.

Its a very nice and helpful "community" of users and developers.  I learn something from them every day.
Title: Re: Thumbnail Text Editing
Post by: SkGe on July 01, 2013, 05:09:45 pm
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
Title: Re: Thumbnail Text Editing
Post by: pcstockton on July 02, 2013, 12:34:21 am
agreed.

MrC=Godlike
Title: Re: Thumbnail Text Editing
Post by: MrC on July 02, 2013, 12:04:30 pm
Dave Grohl has already laid claim (http://www.nme.com/news/foo-fighters/55132) to said title.
Title: Re: Thumbnail Text Editing
Post by: pcstockton on July 03, 2013, 09:40:37 pm
Godish?