Thanks for making this cool plugin.
I had an issue where the currently playing song was displaying a time of "Jan 1, 1970, 00:00", the dawn of the so-called UNIX era, because Last.FM was not sending along a date element for currently spinning tunes. This seemed to fix things up:
Code: Select all
218,219c218,223
< $local_timestamp = $timestamp + $offset;
< $date_time = date_i18n( 'd M Y, H:i', $local_timestamp ); // Format the same as last.fm original
---
> if ($timestamp > 0) {
> $local_timestamp = $timestamp + $offset;
> $date_time = date_i18n( 'd M Y, H:i', $local_timestamp ); // Format the same as last.fm original
> } else {
> $date_time = "Playing now...";
> }
-Henry