 
 
 updateSubscriptions = (shows) ->
-  if subscriptionsAlreadyUpdated
+  if @subscriptionsAlreadyUpdated
     return
+
+  @subscriptionsAlreadyUpdated = true
 
   watchingShowIDs = ("#{item.show.ids.trakt}" for item in shows)
   log.info "The user is watching the following shows:

    (err, status, request) ->
      log.error("GOT error: #{JSON.stringify err}")
      if status == null
        err = new Error("Connection not available.")
      else
        err = new Error("Communication error (#{status}).")
      callback err

Trakttv = require('trakttv')
menus = require('menus')
cards = require('cards')

setupLogging = () ->
  @originalFactory ?= log.methodFactory
