INTERACT FORUM

Please login or register.

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

Author Topic: Expression assistance - Same Album Name with 2 tracks #1  (Read 2505 times)

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Expression assistance - Same Album Name with 2 tracks #1
« on: November 14, 2013, 02:00:51 pm »

I need to find all Albums that have the same name and Artist which contain 2 or more #1 tracks.

I tried .. I really did.

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #1 on: November 14, 2013, 02:05:35 pm »

You can use Search to do this:

   [track #]=[1] ~dup[artist],[album],[track #]

Maybe you'll also want to include [disc #] as part of the ~dup modifier.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #2 on: November 14, 2013, 02:40:42 pm »

Thanks MrC...
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #3 on: November 14, 2013, 02:41:36 pm »

You're welcome.  Also, you may need/want Album Artist (auto) instead of Artist.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #4 on: November 14, 2013, 09:10:23 pm »

One more maybe???

Since some of my albums have the same name (I have the view sorting worked out) I would like to have an expression to count the number of albums per artist. The albums with the same name are differentiated by

Series (if part of a box series)
Desrciption (5.1, HDtracks)

I would like to display the album count for the artist in theaterview under the artist's name. I did this before when I had unique album names, but I cannot figure how to do this now.

I have tried a variable on "Track #1" and add to it, and tried many ways with my sort expression but I have failed.

 ?  :'(
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #5 on: November 14, 2013, 09:24:26 pm »

This is a different problem entirely.

So you want to count the number of albums per artist, and those albums are uniquely defined as [Album] + [Series] + [Description] ?
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assitance - Same Album Name with 2 tracks #1
« Reply #6 on: November 14, 2013, 11:05:06 pm »

Yes totally different I know.. Your first solution worked wonderfully after a bit of panes tweaking.
I was looking for mismatched coverart....But thread was still short.

All Albums do not have all tags entered. Some [Series] have a description of Album Name if the series is composed of studio albums, like the Sector series by Rush.

I have under a single [Artist] for example Eagles & Rush


Artist                       Album Name                 Series                        Description              Disc #
Eagles
                              Hotel California         [Studio Albums]                                               4
                              Hotel California                                                   5.1
                              Hotel California
                              The Long Run
                              Desperado              [Studio Albums]                                                3
                              Desperado
                              {others}

Rush
                              Fly By Night                                                       5.1
                              Fly By Night                [Sector 1]                     Fly By Night               2
                              Fly By Night            
                              {others}
                               Chronicles                                                                                     1
                               Chronicles                                                                                     2

How would I count these per [Artist]. It is difficult since MC wants to treat each Album name as an entity.

Formatting is really bad unless in browser...

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #7 on: November 20, 2013, 12:09:49 am »

Kensn,

Sorry about the lack of response here.  Can you clarify.  Ignoring the {others} albums, how many albums do you consider the Eagles and Rush have each in your examples above?  I'm concluding 6 Eagles and 5 Rush albums.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #8 on: November 20, 2013, 11:47:15 pm »

That is correct sir... I did figure a way by adding all tracks #1, but I would like to count only 1 album for Multi Disc albums in the count.

I have also removed the Disc # from all albums that are not a Muti Disc Album and moved them to a User Field [My BoxSet #] or [My Album Series #] (so in the above example no albums are populated with a Disc #)

Using user field [Album#] = load(v_numalbums_[artist])

Rule = [Media Type]=[Audio] [=1save(0,v_numalbums_[artist])]=1 [=1ifelse(!isempty(compare([Track #], =, 1)),save(math(compare([Track #], =, 1) + load(v_numalbums_[artist])), v_numalbums_[artist]))]=1

This gives me total albums for an artist, using a filter of single artist complete albums, but counts each album in a multi disc album also. Have not worked this out yet.

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #9 on: November 21, 2013, 01:57:36 pm »

Here's a simple expression that will return 1 for only track 1 of the first disc in a single disc or multi-disc album:

  compare([disc #].[track #], <=, 1.1)

See below.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #10 on: November 21, 2013, 03:15:32 pm »

This is comparring two values [Disc #] is <= "1" and [Track #] is <= "1" correct? Not the number 1.1. It must be the first or else no disc number and all tracks would count as a positive. 0.2 < 1.1. Also a null return in [Disc #] is ok....

Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #11 on: November 21, 2013, 03:34:22 pm »

Concatenating [disc #] and [track #] this way creates a numeric floating point string.  MC's expression language is string-based, so this string just acts/appears as a number to the Compare() function.  It doesn't matter if [disc #] is empty or not, as the end result of the concatenation will contain a string that looks like a valid floating point number.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #12 on: November 21, 2013, 03:55:39 pm »

ok...  so Disc # 1 . Track # 3 will be a floating point number 1.3 and this is compared to floating point 1.1?

Then Disc # null . Track #3 is .3 and will produce a positive count being compared to 1.1

What am I missing...
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #13 on: November 21, 2013, 04:21:07 pm »

I'm sorry, I gave the items in the wrong order, not thinking.  Use:

   compare([track #].[disc #], <=, 1.1)

track 1 disc <empty>   = 1.        <= 1.1  so TRUE
track 1 disc  1              = 1.1      <= 1.1  so TRUE
track 1 disc  2              = 1.2      >   1.1  so FALSE
track 2 disc  1              = 2.1      >   1.1  so FALSE
track 2 disc <empty>   = 2.        >   1.1  so FALSE
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression assistance - Same Album Name with 2 tracks #1
« Reply #14 on: November 21, 2013, 05:04:27 pm »

okely dokely

Thank you for your time once again....
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)
Pages: [1]   Go Up