- it compares boot time of liquidsoap and the time user clicks on "Save"
on stream setting page. The status only gets updated if the
"boot_time" > "user update time"
- as soon as a user click on save, status is set to "wating"
- since there is no timing issue, quering interval is reduced to 1 sec
For a previous ticket, I changed the code so that both "Today's Program" widget
and "Now Playing" widget both use the liveInfoAction, but forgot that for "Now Playing" widget, it retrieves
the shows within next 48 hours instead of within end of day today...
Fixed by passing GET parameters to liveInfoAction, specify whether we want to retrieve shows within an
interval or end of day. Also added a GET parameter for specifying the number of shows to display.
- mktemp is used to generate temp name within /tmp dir
- it generate temp file when the file gets uploade to /tmp and then copy to
organize folder as original file name
It's not showing anything because I thought it's not suppose to display the currently playing show.
Fixed by retrieving the currently playing show along with next shows, and display them.
todayInfoAction is no longer needed since liveInfoAction does the same thing.
- Converting times to UTC timezone in ApiController before sending them to model functions
- Added utility functions in DateHelper.php
- GetShowsByDayOfWeek has been removed due to bugs caused by using local timezone
based variable like $day, which represents day of the week in local time, in db query,
which has times saved in UTC timezone. Converting stuff like day of the week from local
to UTC is messy. GetNextShows(...) can do the job so WeekInfoAction now uses it instead
Initial implementation.
- added some code in phone_home_stat to retrieve latest version from stat server
and store result in db
- created new view helper VersionNotify.php, which queries and calculates version
difference, then returns the necessary information in html to the view files
- created new javascript file versiontooltip.js, which sets up the qtip stuff so that
when the version notification icon is clicked, a tooltip is displayed
Not only were frontend widgets showing UTC time,
the SQL query was also comparing UTC timestamp with local timestamps,
causing widgets to display shows in the wrong day, etc.
Another problem was that "On air today" widget was simply calling
GetNextShows which returns shows within next 48 hours.
Fixed by:
1. Under models/Show.php:
In the GetCurrentShow/GetNextShows/GetShowsByDayOfWeek functions,
added code to convert UTC timestamp to local timestamp or vice versa,
depending on which one is more suitable, in SQL queries, thus
removing inconsistency in timezones. Also, before returning query result,
added code to convert result to local timezone.
In GetNextShows, added an optional parameter endTime to limit the interval
of shows to get. This is useful for the "On air today" widget.
2. Under models/DateHelper.php:
Added a few timezone functions to help converting timezones easier in Show.php.
3. Under controller/ApiController.php:
Added todayInfoAction which is to be used by "On Air Today" widget.