INTERACT FORUM

Please login or register.

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

Author Topic: Is there some way to add a cumulative time field to a play list?  (Read 867 times)

baldo

  • Galactic Citizen
  • ****
  • Posts: 251
Is there some way to add a cumulative time field to a play list?
« on: December 03, 2018, 05:38:18 am »

I have playlist with say 100 tracks and the total time is 7 hours say.  To find out how which tracks will be playing at say hour 1, 2 3 etc I highlight  a number of tracks (say 1 -10) and see the cumulative total time shown at the bottom (10 files (235 MB - 1:22:44) ).  The 1:22:44 being the time that those 10 tracks will run for.

Is there some way that I can create a field that shows the cumuliative time for the playlist at each track. So track one would show 3 mins, track 2 would show 7 mins (assuming track 2 is 4 mins long) track 3 would show 9 mins (Assuming track 3 is 2 mins long).

Let me know if I need to provide more info.

I could export the playlist into excell and do everything there, I am just wondering if there is some way to do it in MC.

Many thanks
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there some way to add a cumulative time field to a play list?
« Reply #1 on: December 03, 2018, 04:42:00 pm »

I think the answer is yes, you could write an expression that would add up values of [Duration] from the first track to the current track.

But it may not be pretty, because the expression couldn't assume that the first track was Track 1, or that all Tracks appeared in the Album.

I don't have time to look at it now, sorry. Have a look at the Expression Language, and in particular the Math functions. My concern would be that the expression might be a bit processor intensive, and so slow down Views. But yoy would know until you built it.

Someone may come along and offer an expression.
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

baldo

  • Galactic Citizen
  • ****
  • Posts: 251
Re: Is there some way to add a cumulative time field to a play list?
« Reply #2 on: December 04, 2018, 05:22:35 am »

OK noted.

How do I access the math functions and write an expression?

Its not an album that I want  the cumulative time for, it is for a play list. So Cum Duration t1 would just be the duration for Seq1, cum duration  t2 would be Cum Duration t1 + duration seq t2, cum duration t3 would be cum duration t2 + duration t3 etc.

I'm sure its easier to explain using code or math expressions.
Logged

baldo

  • Galactic Citizen
  • ****
  • Posts: 251
Re: Is there some way to add a cumulative time field to a play list?
« Reply #3 on: December 04, 2018, 06:00:17 am »

Ok, I just found the Expressions Wiki.  Looks rather complex to write a new function.

An easier way for me to do it is to just export the play list into a csv file, open the file in excel, calculate the cumulative time for each track.

I then need some way to export this calculated data or even new csv playlist back into MC.

Or could I just copy and paste the Cum time into an empty tag or create a custom tag for this purpose.  How can I cut and paste bulk items like this into a playlist?
Logged

4 jumping cats

  • Guest
Re: Is there some way to add a cumulative time field to a play list?
« Reply #4 on: December 04, 2018, 04:03:40 pm »

Pasting stuff like this into a file's field would not be a good idea - what happens for example if the same file appears at different positions in more than one playlist?
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Is there some way to add a cumulative time field to a play list?
« Reply #5 on: December 04, 2018, 04:34:57 pm »

Correct. That is why it needs to be a calculated expression column in a Playlist.

Sorry I simplified by thinking about an Album. An expression would be even harder with a playlist of tracks.

Search for "Swag of tools" on the forum. There may be something in there that could assist. I don't know.

Otherwise it will require some Expression Language learning and experimentation.
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

4 jumping cats

  • Guest
Re: Is there some way to add a cumulative time field to a play list?
« Reply #6 on: December 04, 2018, 04:59:04 pm »

The simple solution is to make up a series of 1 hour playlists and then combine them - but why anyone would want to know what will be playing in 2 hours time is quite beyond me! (Mweooowww!)
Logged
Pages: [1]   Go Up