How can I sort albums by album length?
Moderator: Gurus
How can I sort albums by album length?
Hi!
I've been searching through these posts and seems that I can't find the answer - is it possible to sort albums in the library by the length of the albums? For example if I know I have time for like 40 minutes I would like to select an album shorter than that.
It seemed that Magic Nodes could help but I couldn't figure it out. Is there attribute called "album length" or should I make a script which counts the album length from the individual songs or how should this be done?
At this stage I'm also happy if someone tell's me it cannot be done because then I can move on and forget the damn thing
I've been searching through these posts and seems that I can't find the answer - is it possible to sort albums in the library by the length of the albums? For example if I know I have time for like 40 minutes I would like to select an album shorter than that.
It seemed that Magic Nodes could help but I couldn't figure it out. Is there attribute called "album length" or should I make a script which counts the album length from the individual songs or how should this be done?
At this stage I'm also happy if someone tell's me it cannot be done because then I can move on and forget the damn thing
-
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: How can I sort albums by album length?
You can load up your library (by clicking on the Title node for instance) and then put it into "Album Art" view. Then, you can click on the Length column and it will sort based on the total length of the album. Not sure this will be effective for what you want to do, but it might. Not sure if it could be accomplished with MagicNodes. You could always post a reply in that scripts thread, someone more familiar with the script may be able to give you a definitive answer and maybe provide you with everything you need to set up a node to do it.
Re: How can I sort albums by album length?
Code: Select all
Album (sort by length)|Child of:Album\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0>
Re: How can I sort albums by album length?
If I wanted to filter this by albums with more than "x" tracks (to eliminate those songs for which I don't have the whole album, just the singles from the album), what would I add to the current mask?
-
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: How can I sort albums by album length?
Code: Select all
Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) = Max(Cast(TrackNumber As integer)) AND Count(TrackNumber) > 3)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0>
Or, if you're only interested in counting albums if they have more than say, three tracks and don't care if you're missing one or two tracks from it, then this might do the trick:
Code: Select all
Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0>
Re: How can I sort albums by album length?
So in your second example listed below, shouldn't the number 25, be whatever number I want so I exclude One or Two Hit Wonders, such as 2 or 3? Just want to make sure. Thank you.
Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0>
Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0>
-
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: How can I sort albums by album length?
Yeah, that's the number you would need to change. So, setting it to three would mean that an album would need four or more tracks to be considered for the node.
Re: How can I sort albums by album length?
OK, got it. Boy it took a long time to get this done.
I thought you could click copy all and just paste the mask. Doesn't seem to work that way.
One thing that would be cool is if the actual length of the album showed up in the node with the album. Any idea how to do that, anyone?
I thought you could click copy all and just paste the mask. Doesn't seem to work that way.
One thing that would be cool is if the actual length of the album showed up in the node with the album. Any idea how to do that, anyone?
-
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: How can I sort albums by album length?
You actually can copy and paste the mask. You just bring up the Magic Nodes Settings box, and then either click New (to create a new node) or find the node you want to edit in the Caption drop. Then, you can just paste the given mask into the Mask text field and then choose Add or Update (depending on if you're adding a new node, or changing a current one).
As for the other part:
EDIT: Actually, there's another option for you:
As for the other part:
The bolded red(?) part will add the total length of the album to the album node. Thus, you'll see something in the vein of "Better Dayz (2Pac) (01:52:52)" as opposed to just "Better Dayz (2Pac)". If you want to try and just copy and paste, be sure to change the italic blue(?) part (the number of tracks as previously discussed). This take care of what you're looking to do?Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:0|Statistic:Sum(Length)>
EDIT: Actually, there's another option for you:
This one would instead show the node in the format of "01:52:52 - Better Dayz (2Pac)" which would better represent the sort. Just adjust the bold red(?) part in your current node for this display. Or if you just copy and paste, be sure to adjust the italic blue(?) part.Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:1>
Re: How can I sort albums by album length?
Oh my this worked so well. Thank you so much Misery_Made.
My problem when I try to copy/paste is that I get the error message "This mask is not valid!" in the lower left. I have to edit a mask before it will work. I know in the past, I've been able to copy/paste but not now.
Anyway, thank you so much for the help. Both of your suggestions work perfectly.
My problem when I try to copy/paste is that I get the error message "This mask is not valid!" in the lower left. I have to edit a mask before it will work. I know in the past, I've been able to copy/paste but not now.
Anyway, thank you so much for the help. Both of your suggestions work perfectly.
-
- Posts: 34
- Joined: Sat Apr 19, 2008 7:54 pm
Re: How can I sort albums by album length?
Worked fine for me to copy/paste.rrfpacker wrote:My problem when I try to copy/paste is that I get the error message "This mask is not valid!" in the lower left. I have to edit a mask before it will work. I know in the past, I've been able to copy/paste but not now.
Can anyone help with how to modify this mask to sort by Album NAME with the album length listed...
I've tried several variations of ALBUM replacing LENGTH with no luck... I'm not quite catching the formatting...
Re: How can I sort albums by album length?
Maybe I'm copy/pasting to the wrong place. I try to paste in the bottom most window which I believe says Mask. I don't do anything else and I get the error message.
-
- Posts: 374
- Joined: Sat Feb 02, 2008 1:09 pm
- Location: Texas
Re: How can I sort albums by album length?
I think this does it:PartyRambo wrote:Can anyone help with how to modify this mask to sort by Album NAME with the album length listed...
I've tried several variations of ALBUM replacing LENGTH with no luck... I'm not quite catching the formatting...
Code: Select all
Album (sort by name with Album Length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Statistic:Sum(Length)>
Code: Select all
Album (sort by length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Sort by:Sum(Length)|Show sort key:1>
-
- Posts: 2283
- Joined: Tue Aug 29, 2006 1:09 pm
- Location: Kansas City, Missouri, United States
Re: How can I sort albums by album length?
Oops. My bad.
-
- Posts: 34
- Joined: Sat Apr 19, 2008 7:54 pm
Re: How can I sort albums by album length?
Beautiful! I guess I'm still dumb, since I now wanna follow-up:onenonymous wrote:I think this does it:PartyRambo wrote:Can anyone help with how to modify this mask to sort by Album NAME with the album length listed...
I've tried several variations of ALBUM replacing LENGTH with no luck... I'm not quite catching the formatting...Code: Select all
Album (sort by name with Album Length)|Child of:Album|Filter:Songs.IDAlbum IN (SELECT IDAlbum FROM Songs GROUP BY IDAlbum HAVING Count(TrackNumber) > 25)\<Album with Album Artist|Statistic:Sum(Length)>
Is there a resource for this scripting language? I've no problem fooling around to find what I need, but I have been going nowhere with this, hence the need for help!
I would now like to see if:
- this can have Folder, AlbumArtist added, so it would display something like:
"M=Ma Roman=A Thousand and One Leavings (52:14)" - and, I could do without the seconds if possible!
Also - having the (what I now call) "Root Folder" (the M of "L:\M\" or "Movie Themes" of "L:\Movie Themes\") as an expandable branch, would allow me to find all the M's (albums as the script was answered, or album artists as well!) without expanding my library's 10,000 albums.
So, ONE thing that I'd like to see:
....
K
L
M - (click to expand)
M=Ma Roman=A Thousand and One Leavings (52)
M=Mannfred Mann=The Best (43)
...more M's...
N
O
...
Any help - if someone can do it quick, great!! But I'm good with some tutorial direction!