INTERACT FORUM

Please login or register.

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

Author Topic: Sort Album Duration  (Read 1156 times)

rofi

  • Recent member
  • *
  • Posts: 40
Sort Album Duration
« on: October 16, 2018, 12:41:35 pm »

Hi, just a little question. Trying sort albums by duration. All I can do is sort single tracks, but a complete album, e.g. duration incl. Disc 1 and 2, etc. Any ideas?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Sort Album Duration
« Reply #1 on: October 16, 2018, 08:41:44 pm »

Interesting. I read your other thread thanks to Google Translate.

MC does everything at the file level. It doesn't even know about Albums really. It just knows that each file can have an attribute (tag) called [Album], that more than one file can have the same value for that attribute, and if so they should be grouped in some Views. For example, the total duration of an Album displayed at the bottom of Standard View when an Album is selected is always dynamically calculated, based on what files are selected. The value isn't stored anywhere, because there is no entity called "Album" to store it against. That is why this isn't a simple question to answer.

So, I don't have a complete answer for you, but I think if you created a field for the total duration of albums that was relational, so that only one value occurs for each Album, you could enter a value for just one track in an Album, and all tracks in the Album would be assigned that value.

Beyond that, you could use the Search language Expand function (~a) in an Expression, I think, to have MC select all tracks in an Album and then calculated the total duration of the Album, and store it in the new field you have created. I'm not sure if you could do that using a Calculated field in Manage Library Fields or not though. You may need to look into using a Global Variable.

Also, this may be pretty processor intensive, so it may slow down your Views a bit. Once again, I'm not sure.

But play around with the above ideas. Maybe someone who knows a bit more and has the time will come along and give you an easy answer.  ;)


PS: The new field suggested above would work something like the standard [Total Tracks] and [Total Discs] fields. A search for discussion about them may help you find a solution.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

rofi

  • Recent member
  • *
  • Posts: 40
Re: Sort Album Duration
« Reply #2 on: October 17, 2018, 01:26:53 am »

ok, yes, thanks to Google Translate :-)

Then I play around with your ideas, we will see what happened, thanks so far.
Logged

swiv3d

  • Guest
Re: Sort Album Duration
« Reply #3 on: October 17, 2018, 05:40:15 am »

If you choose view album thumbnails and sort by Duration all of the albums will be sorted by their album duration. You can customize the thumbnail text to 2 lines and add [Duration] to the thumbnail text to show the Name of the album then its duration.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Sort Album Duration
« Reply #4 on: October 17, 2018, 06:51:29 pm »

Damn, that was easy. I never thought of that Swiv3d. Nicely done. Works in a Panes or Category View.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

rofi

  • Recent member
  • *
  • Posts: 40
Re: Sort Album Duration
« Reply #5 on: October 18, 2018, 01:10:27 am »

Oh yes, it shows me how complicated my brain works sometimes. Thanks!
Logged

swiv3d

  • Guest
Re: Sort Album Duration
« Reply #6 on: October 18, 2018, 06:02:20 am »

Forgot to mention that if you have an 'Album' which spans multiple [disk#] it will give the total for all disks, I have one album comprised of 12 disks and I'm told it is over 12hrs long. There is a way of doing this by creating a variable via a smartlist and then loading that variable but I like simple solutions - 'give a lazy man a job and you will find the easiest way to do it'
Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: Sort Album Duration
« Reply #7 on: October 18, 2018, 09:35:24 am »

variables are best as they work across views, but some good solutions here that i can use.  thanks RGI and swiv3d
Logged
Pages: [1]   Go Up