INTERACT FORUM

More => Old Versions => JRiver Media Center 24 for Windows => Topic started by: baldo on December 03, 2018, 05:38:18 am

Title: Is there some way to add a cumulative time field to a play list?
Post by: baldo 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
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: RoderickGI 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.
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: baldo 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.
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: baldo 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?
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: 4 jumping cats 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?
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: RoderickGI 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.
Title: Re: Is there some way to add a cumulative time field to a play list?
Post by: 4 jumping cats 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!)