INTERACT FORUM

Please login or register.

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

Author Topic: Any Way to Add a "Start Time" Column to a Playlist?  (Read 944 times)

WMarkT

  • Recent member
  • *
  • Posts: 15
Any Way to Add a "Start Time" Column to a Playlist?
« 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?

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71868
  • Where did I put my teeth?
Re: Any Way to Add a "Start Time" Column to a Playlist?
« Reply #1 on: July 06, 2022, 04:32:47 pm »

MC has a Scheduler.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2453
Logged

WMarkT

  • Recent member
  • *
  • Posts: 15
Re: Any Way to Add a "Start Time" Column to a Playlist?
« Reply #3 on: July 06, 2022, 08:15:01 pm »

Outstanding! Thanks guys! 
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Any Way to Add a "Start Time" Column to a Playlist?
« Reply #4 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.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2453
Re: Any Way to Add a "Start Time" Column to a Playlist?
« Reply #5 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.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42092
  • Shoes gone again!
Re: Any Way to Add a "Start Time" Column to a Playlist?
« Reply #6 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.
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up