       isNextEpisodeListed: opt.isNextEpisodeListed
   }
 
-getEpisodeData = (showID, seasonNumber, episodeNumber, callback) ->
+getOrFetchEpisodeData = (showID, seasonNumber, episodeNumber, callback) ->
   # toWatchMenu.on 'select', (e) ->
   # element = e.item
-  item = i for i in shows if i.show.ids.trakt == showID
+  console.log "getOrFetchEpisodeData for #{showID}, #{seasonNumber}, #{episodeNumber}"
+  item = i for i in shows when i.show.ids.trakt == showID
+  # console.log "item: #{JSON.stringify item}"
   season = s for s in item.seasons when s.number == seasonNumber
+  unless season?
+    season =
+      number: seasonNumber
+      aired: 0
+      completed: 0
+      episodes: []
+  # console.log "season: #{JSON.stringify season}"
   episode = e for e in season.episodes when e.number == episodeNumber
+  # console.log "episode: #{JSON.stringify episode}"
+  unless episode?
+    episode =
+      number: episodeNumber
+      completed: false
+    season.episodes.push episode
+  console.log "Considering episode: #{JSON.stringify episode}"
 
   episode.seasonNumber = seasonNumber
   episode.episodeNumber = episodeNumber
   episode.showID = showID
-
-  unless episode.id? and episode.title? and episode.overview?
+  episode.showTitle = item.show.title
+
+  getOrFetchOverview = (success) ->
+    if episode.overview?
+      console.log "Overview already available"
+      success(episode)
+      return
+    console.log "fetching overview..."
+    traktvRequest "/search?id_type=trakt-episode&id=#{episode.episodeID}",
+      (response, status, req) ->
+        console.log "Fetched overview: #{response}"
+        if response
+          episode.overview = response[0].episode.overview
+        success(episode) if success?
+
+  fetchEpisodeIDAndTitle = (showID, seasonNumber, episodeNumber, successFetchEpisodeIDAndTitle) ->
     traktvRequest "/shows/#{showID}/seasons/#{seasonNumber}/episodes/#{episodeNumber}",
-    (response, status, req) ->
-      episode.id = response.ids.trakt
-      episode.title = response.title
-
-      if episode.overview?
-        callback(episode) if callback?
-      else
-        traktvRequest "/search?id_type=trakt-episode&id=#{episode.id}",
-          (response, status, req) ->
-            if response
-              episode.overview = response[0].episode.overview
-            callback(episode) if callback?
-
-
-  traktvRequest "/shows/#{element.data.showID}/seasons/#{element.data.seasonNumber}/episodes/#{element.data.episodeNumber}",
-    (response, status, req) ->
-      showTitle = item.show.title for item in shows when item.show.ids.trakt == element.data.showID
-      detailedItemCard = new UI.Card(
-        title: showTitle
-        subtitle: "Season #{element.data.seasonNumber} Ep. #{element.data.episodeNumber}"
-        body: "Title: #{response.title}"
-        style: 'small'
-      )
-      detailedItemCard.show()
+      (response, status, req) ->
+        console.log "fetchEpisodeIDAndTitle response: #{response}"
+        episode.episodeID = response.ids.trakt
+        episode.episodeTitle = response.title
+
+        successFetchEpisodeIDAndTitle(episode) if successFetchEpisodeIDAndTitle?
+
+  if episode.episodeID? and episode.episodeTitle?
+    console.log "going to fetch overview"
+    getOrFetchOverview callback
+  else
+    console.log "going to fetch ep id and title"
+    fetchEpisodeIDAndTitle showID, seasonNumber, episodeNumber,
+      (episode) ->
+        console.log "fetched id and title: #{JSON.stringify episode}"
+        getOrFetchOverview callback
 
 
 

        (response, status, req) ->
          # console.log "getToWatchList: asked "
          # console.log "returned: #{JSON.stringify response.seasons}"
          if status != 200
            doneItem(response: response, status: status, req: req)
          item.next_episode = response.next_episode
          item.seasons = response.seasons
          # for season in item.seasons
          #   for episode in season.episodes
          #     episode.completed ?= false
          doneItem()
    (err) ->
      if err?
        console.log "Failed response (#{err.status}): #{err.response}"
        console.log "Request was: #{err.req}"
      # console.log "getToWatchList returning"
      callback(showListUpdated) if callback?
  )



      upcomingMenu.on 'select', (e) ->
        element = e.item
        data = element.data
        getOrFetchEpisodeData data.showID, data.seasonNumber, data.episodeNumber, (episode) ->
          console.log "response for #{data.showID}, #{data.seasonNumber}, #{data.episodeNumber}"
          console.log "--> #{JSON.stringify episode}"
          detailedItemCard = new UI.Card(
            title: episode.showTitle
            subtitle: "Season #{episode.seasonNumber} Ep. #{episode.episodeNumber}"
            body: "Title: #{episode.episodeTitle}\n\
                   Overview: #{episode.overview}"
            style: 'small'
            scrollable: true
          )
          detailedItemCard.show()
        # traktvRequest "/shows/#{element.data.showID}/seasons/#{element.data.seasonNumber}/episodes/#{element.data.episodeNumber}",
        #   (response, status, req) ->
        #     showTitle = item.show.title for item in shows when item.show.ids.trakt == element.data.showID
        #     detailedItemCard = new UI.Card(
        #       title: showTitle
        #       subtitle: "Season #{element.data.seasonNumber} Ep. #{element.data.episodeNumber}"
        #       body: "Title: #{response.title}"
        #       style: 'small'
        #     )
        #     detailedItemCard.show()
      callback() if callback?

displayShowsMenu = (callback) ->
