def get_entry_ids(entry):
 ids = {}
 for lazy in [False, True]:
  if entry.get(u'trakt_movie_id', eval_lazy=lazy):
   ids[u'trakt'] = entry[u'trakt_movie_id']
  elif entry.get(u'trakt_show_id', eval_lazy=lazy):
   ids[u'trakt'] = entry[u'trakt_show_id']
  elif entry.get(u'trakt_episode_id', eval_lazy=lazy):
   ids[u'trakt'] = entry[u'trakt_episode_id']
  if entry.get(u'tmdb_id', eval_lazy=lazy):
   ids[u'tmdb'] = entry[u'tmdb_id']
  if entry.get(u'tvdb_id', eval_lazy=lazy):
   ids[u'tvdb'] = entry[u'tvdb_id']
  if entry.get(u'imdb_id', eval_lazy=lazy):
   ids[u'imdb'] = entry[u'imdb_id']
  if entry.get(u'tvrage_id', eval_lazy=lazy):
   ids[u'tvrage'] = entry[u'tvrage_id']
  if ids:
   break
 return ids

def get_entry_ids ( entry ) : ids = { } for lazy in [ False , True ] : if entry . get ( u'trakt_movie_id' , eval_lazy = lazy ) : ids [ u'trakt' ] = entry [ u'trakt_movie_id' ] elif entry . get ( u'trakt_show_id' , eval_lazy = lazy ) : ids [ u'trakt' ] = entry [ u'trakt_show_id' ] elif entry . get ( u'trakt_episode_id' , eval_lazy = lazy ) : ids [ u'trakt' ] = entry [ u'trakt_episode_id' ] if entry . get ( u'tmdb_id' , eval_lazy = lazy ) : ids [ u'tmdb' ] = entry [ u'tmdb_id' ] if entry . get ( u'tvdb_id' , eval_lazy = lazy ) : ids [ u'tvdb' ] = entry [ u'tvdb_id' ] if entry . get ( u'imdb_id' , eval_lazy = lazy ) : ids [ u'imdb' ] = entry [ u'imdb_id' ] if entry . get ( u'tvrage_id' , eval_lazy = lazy ) : ids [ u'tvrage' ] = entry [ u'tvrage_id' ] if ids : break return ids
creates a trakt ids dict from id fields on an entry .