Commit Graph

12 Commits

Author SHA1 Message Date
Ben Harris e5b4379406 tidy up formatting
continuous-integration/drone/push Build is passing Details
2021-09-12 20:13:59 -04:00
Robert Miles 6b6bc48ae7 PHP is annoying and I want to stab whoever designed AzuraCast's API
continuous-integration/drone/pr Build encountered an error Details
From the top:

 - gmdate needs an argument of what time to use. this one is on me being tired, but I shouldn't have to do this because
 - IDs are per-DJ, not per-slot, as I mentioned in my last PR. This wasn't the reason behind the issue, but if IDs were per-slot, my original dedupe would have worked *perfectly*.
 - AzuraCast's API gives weird ISO-8601 date strings instead of just *giving us UNIX timestamps*. Again, not the reason behind the issue, but it annoyed me when testing the dedupe fix.
2020-09-28 23:27:31 +00:00
Robert Miles 8b72e32771 Well, this is embarrassing...
continuous-integration/drone/pr Build encountered an error Details
continuous-integration/drone/push Build is passing Details
Apparently I put too much faith in AzuraCast's scheduler. IDs are per-DJ, not per-slot, and some DJs (like tomasino) run multiple shows out of the same login. Ergo, this simply will not do.

The ID now used in the dedupe also includes beginning and ending, leading to a slot looking like "13Sun000000Sun010000". This *should* be unique, since AFAIK no DJ has multiple slots during the same time and the same login. (Not to mention slots really can't be at the same time.)
2020-09-28 22:04:15 +00:00
Robert Miles b5992444e8 Add back the $from and $to params, defining them to be what should be a span of 8 days
continuous-integration/drone/pr Build encountered an error Details
We can go over, since items will for sure not be duplicated with the dedupe in place.
2020-09-26 19:30:35 +00:00
Robert Miles 7e19179fcc Fix duplication of ICS events and make TTT only show up on the last Sunday of each month 2020-09-26 19:23:48 +00:00
Robert Miles 4a1b41d7de Remove 2 days from $to, in an attempt to get AzuraCast to not give me duplicate events
continuous-integration/drone/pr Build encountered an error Details
2020-07-02 23:25:59 -04:00
Robert Miles 3ca33228f5 ics.php should download as a .ics file
continuous-integration/drone/pr Build encountered an error Details
continuous-integration/drone/push Build is passing Details
2020-07-02 23:04:26 -04:00
Robert Miles 99961cfa55 HOTFIX: Fix the ICS generator (again)
continuous-integration/drone/pr Build encountered an error Details
I overestimated how much was in common between the two files. ics.php had its
own formatdate function, which it no longer does (thanks ben (/s)).

Reimplement ics.php's former formatdate function as ics_formatdate, and use
it instead of formatdate to format the dates in the ICS output.
2020-07-02 22:48:06 -04:00
Robert Miles 1c1744092b Merge branch 'master' of https://tildegit.org/tilderadio/site
continuous-integration/drone/pr Build encountered an error Details
2020-07-02 22:44:11 -04:00
Robert Miles f409367cfe Fix ICS generator
continuous-integration/drone/pr Build encountered an error Details
Specifically, adds DTSTAMP properties to all of the objects (the calendar and
the events), terminates lines in CRLF, and splits the UID over 2 lines so the
validator is happy with me.
2020-07-02 22:32:06 -04:00
Ben Harris c78aea671c move common schedule code to library
continuous-integration/drone/push Build is passing Details
2020-07-02 21:53:12 -04:00
Robert Miles 9a928f4a39 Add the ICS calendar generator
continuous-integration/drone/pr Build encountered an error Details
continuous-integration/drone/push Build is passing Details
Here be dragons. I manually reverse-engineered an ICS file generated by a
program I wrote to figure out the syntax, and then I wrote some PHP to
generate a file to that spec.
2020-07-02 18:52:40 -04:00