INTERACT FORUM

More => Old Versions => JRiver Media Center 29 for Mac => Topic started by: WMarkT on July 06, 2022, 04:11:00 pm

Title: Any Way to Add a "Start Time" Column to a Playlist?
Post by: WMarkT on July 06, 2022, 04:11:00 pm
So I would love to create a radio station feature. I would like to see a "Start Time" in Player so I have a good estimate of when a track will start. Is there any way to add a custom column and create a script to compare current time to the time remaining of the current track, next track, etc to get a Start Time for each track in the playlist?

I was reminded of this fantastic feature in Radio Automation software on Independence Day while doing quick-math to see how close to 9:15 my patriotic playlist would start.

ORRRRRRRR, is there a way to automatically start a playlist at a pre-determined time?

Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: JimH on July 06, 2022, 04:32:47 pm
MC has a Scheduler.
Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: zybex on July 06, 2022, 05:17:30 pm
There's also PlayListTime():
https://wiki.jriver.com/index.php/Date_and_Time_Functions#PlaylistTime
Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: WMarkT on July 06, 2022, 08:15:01 pm
Outstanding! Thanks guys! 
Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: blgentry on July 07, 2022, 08:04:03 am
I've been messing around with this and have a bit of an issue.  PlaylistTime() returns a human readable hh:mm:ss string (not zero padded).  This makes doing calculations with it nearly impossible. 

ConvertDate does not seem to be able to work with it.  Which means you really can't do math with it because you can't get it into MC's internal format.  Sure I can do the math myself by converting hours, minutes, and seconds into the MC format.  But the problem is I then need to manipulate the string in a very complex way to optionally extract hours, optionally extract minutes, etc, and THEN combine them with the correct math into MC's format.

Perhaps I'm missing something about ConvertDate which would allow it to read a string like "11:23" and convert that into 11 minutes and 23 seconds or 0.007905 in MC's format.  With that value I could then calculate:  Now() + [my offset] and then finally run that through FormatDate in order to show the start time of the next song, as the OP was asking for.

Any ideas?
Brian.
Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: zybex on July 07, 2022, 08:10:56 am
Good point Brian. Perhaps the function could take a second optional arg:

PlaylistTime(mode, format)
format = 0: return unformatted numeric times  (1=86400 seconds)
format = 1: return formatted timestamps (default)

Alternatively, add 4 more modes for the unformatted variants.
Title: Re: Any Way to Add a "Start Time" Column to a Playlist?
Post by: Matt on July 07, 2022, 10:17:50 am
Good point Brian. Perhaps the function could take a second optional arg:

PlaylistTime(mode, format)
format = 0: return unformatted numeric times  (1=86400 seconds)
format = 1: return formatted timestamps (default)

Alternatively, add 4 more modes for the unformatted variants.

I'll do that today.  Thanks for the suggestion.