Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion onsen/nuxt/nuxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Program struct {
DirectoryName string `json:"directory_name"`
Title string `json:"title"`
New bool `json:"new"`
Updated *string `json:"updated"`
Updated interface{} `json:"updated"`
Performers []Performer `json:"performers"`
Contents []Content `json:"contents"`
}
Expand Down
4 changes: 2 additions & 2 deletions onsen/nuxt/nuxt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TestCreateWithAnonymousUser(t *testing.T) {
{chosen.DirectoryName, "radionyan"},
{chosen.Title, "月とライカと吸血姫 ~アーニャ・シモニャン・ラジオニャン!~"},
{chosen.New, false},
{*chosen.Updated, "10/22"},
{chosen.Updated, "10/22"},
{len(chosen.Contents), 6},
{
chosen.Performers,
Expand Down Expand Up @@ -98,7 +98,7 @@ func TestCreateWithLogined(t *testing.T) {
{chosen.DirectoryName, "radionyan"},
{chosen.Title, "月とライカと吸血姫 ~アーニャ・シモニャン・ラジオニャン!~"},
{chosen.New, false},
{*chosen.Updated, "10/22"},
{chosen.Updated, "10/22"},
{len(chosen.Contents), 6},
// Preimum user can access this content
{*chosen.Contents[1].StreamingUrl, "HAS_BEEN_SCREENED"},
Expand Down
4 changes: 3 additions & 1 deletion onsen/onsen.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ func (r Radio) JstUpdatedAt() (res time.Time, ok bool) {

// Fallback for radios with no episodes, using the old logic.
if r.Raw.Updated != nil {
return GuessJstTimeWithNow(*r.Raw.Updated)
if s, ok := r.Raw.Updated.(string); ok {
return GuessJstTimeWithNow(s)
}
}

return time.Time{}, false
Expand Down