INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Thumbnail Text Editing  (Read 4250 times)

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Thumbnail Text Editing
« 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
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #1 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?
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #2 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
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #3 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]
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #4 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
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #5 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.
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #6 on: February 18, 2013, 08:48:41 pm »

Ooops.  I was missing the very first "Rules for File Display"

Everything is great.

Many thanks!
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #7 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!
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #8 on: February 18, 2013, 10:38:02 pm »

[track #] Tracks is all you need then.
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #9 on: February 19, 2013, 12:45:03 am »

You are the best!!!
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #10 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

Logged
The opinions I express represent my own folly.

Marra

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
Re: Thumbnail Text Editing
« Reply #11 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
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #12 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?
Logged
The opinions I express represent my own folly.

Marra

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
Re: Thumbnail Text Editing
« Reply #13 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

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #14 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 #.
Logged
The opinions I express represent my own folly.

Marra

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
Re: Thumbnail Text Editing
« Reply #15 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!!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #16 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.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: Thumbnail Text Editing
« Reply #17 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
Logged

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #18 on: July 02, 2013, 12:34:21 am »

agreed.

MrC=Godlike
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Thumbnail Text Editing
« Reply #19 on: July 02, 2013, 12:04:30 pm »

Dave Grohl has already laid claim to said title.
Logged
The opinions I express represent my own folly.

pcstockton

  • Citizen of the Universe
  • *****
  • Posts: 1261
Re: Thumbnail Text Editing
« Reply #20 on: July 03, 2013, 09:40:37 pm »

Godish?
Logged
HTPC (ASRock Mini PC 252B: i5 2520M Sandy Bridge/HD3000 - 2.5 GHz - 8GB RAM - 256GB Intel SSD - Win7 Home) > MF V-Link 192 > Wireworld Ultraviolet > Naim DAC > Naim NAC 102/NAPSC/HiCap (PSU) > Naim NAP 180 Amp > Naim NACA-5 Speaker Cables > Naim Ariva
Pages: [1]   Go Up