INTERACT FORUM

Please login or register.

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

Author Topic: Recent Albums with n entries  (Read 2150 times)

eharry

  • Recent member
  • *
  • Posts: 24
Recent Albums with n entries
« on: May 18, 2012, 03:14:36 pm »

Hi,

is it possible to create a view like the "Recent Albums"  view but with the last n imported albums (for example n = 100)?
So, whenever I add a new album the oldest should be removed.

Thanks for help!

Cheers!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Recent Albums with n entries
« Reply #1 on: May 18, 2012, 03:18:00 pm »

Try this (which you can paste into Search):

   ~sort=[Date Imported]-d ~limit=100,1,[Album] ~a
Logged
The opinions I express represent my own folly.

eharry

  • Recent member
  • *
  • Posts: 24
Re: Recent Albums with n entries
« Reply #2 on: May 18, 2012, 03:22:25 pm »

Hi MrC,

thanks for the fast reply.
I've pasted the expression in the search field right on top, but it does nothing...

Logged

Scolex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1116
  • Cheers
Re: Recent Albums with n entries
« Reply #3 on: May 18, 2012, 03:23:48 pm »

You can create a smartlist sorted by import date and limit the number of files.
[Media Type]=[Audio] ~sort=[Date Imported]-d ~n=100

I see MrC beat me to the punch but this works too he is the expression master so his may work better.
Logged
Sean

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Recent Albums with n entries
« Reply #4 on: May 18, 2012, 03:25:01 pm »

[Media Type]=[Audio] [Track #]=1 ~sort=[Date Imported]-d ~n=100 ~a
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Scolex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1116
  • Cheers
Re: Recent Albums with n entries
« Reply #5 on: May 18, 2012, 03:29:21 pm »

I pasted it also and it removed some albums but the removal was in the album pane not the file list.
If you paste it into a smartlist it will give you all of the songs for your last 100 albums imported.
Small revision to limit it to audio.
[Media Type]=[Audio] ~sort=[Date Imported]-d ~limit=100,1,[Album] ~a
Logged
Sean

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Recent Albums with n entries
« Reply #6 on: May 18, 2012, 03:29:27 pm »

Are you in a view that contains the files you want filtered, such as Albums, Artist, etc.?

It works - you can see in the attached image that I'm showing the last 10 albums imported using the rule (you see 11 images here, because Lungs is a 2-disc album, which I have broken out by disc, but it is one album).
Logged
The opinions I express represent my own folly.

Scolex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1116
  • Cheers
Re: Recent Albums with n entries
« Reply #7 on: May 18, 2012, 03:35:33 pm »

I take that back MrC's exp worked fine I just need to reduce the 100 to 10 to make it more apparent.
Logged
Sean

eharry

  • Recent member
  • *
  • Posts: 24
Re: Recent Albums with n entries
« Reply #8 on: May 18, 2012, 03:38:19 pm »

Thanks for the help!!!

@ MrC
Tried it again and it worked. But how can I get this expression in the view?

Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Recent Albums with n entries
« Reply #9 on: May 18, 2012, 03:40:58 pm »

Each of the search filters here does a slightly different thing (and the diversity is nice!), and you may want to adjust to use the one that meets your needs.  AlexB's trick to use Track #1 as the basis of defining an album is good.  Note that sometimes you might have a partial album that has no track 1, so rules based on this will miss.  I use a random-select approach, so that exactly one track from each album is chosen, and then the album is expanded fully.

The [Media Type]=Audio is of course necessary in a smartlist not located under Audio.  You might need to adjust or limit the results additionally if you want to ignore certain types of files, locations, etc.  For example, I didn't show that I also filtered out some test audio files...  sneaky.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Recent Albums with n entries
« Reply #10 on: May 18, 2012, 03:41:58 pm »

Tried it again and it worked. But how can I get this expression in the view?

Edit a smartlist, and paste it into the Import/Export area.

Also add the [Media Type]=Audio portion to the beginning.
Logged
The opinions I express represent my own folly.

eharry

  • Recent member
  • *
  • Posts: 24
Re: Recent Albums with n entries
« Reply #11 on: May 18, 2012, 03:51:29 pm »

Ok - so far so good. Now I have a smartlist with the correct albums.
But how do I get a view?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Recent Albums with n entries
« Reply #12 on: May 18, 2012, 03:54:21 pm »

See the attached screenshot. (The view is for five recent albums.)


Log in to the forum if you can't see the attachment.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

eharry

  • Recent member
  • *
  • Posts: 24
Re: Recent Albums with n entries
« Reply #13 on: May 18, 2012, 04:00:43 pm »

That's it!!!!

Thank you so much!
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Recent Albums with n entries
« Reply #14 on: May 18, 2012, 04:13:19 pm »

You're welcome.

You may also need to adjust the sorting options to see the file list in the correct order. See the screenshots in my reply here: http://yabb.jriver.com/interact/index.php?topic=72058.msg487961#msg487961
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

eharry

  • Recent member
  • *
  • Posts: 24
Re: Recent Albums with n entries
« Reply #15 on: May 19, 2012, 01:37:47 pm »

Sorting is just right. Thank you!
Logged
Pages: [1]   Go Up