
package com.battlelancer.seriesguide.loaders;

import android.content.Context;

import com.battlelancer.seriesguide.util.ServiceUtils;
import com.battlelancer.seriesguide.util.Utils;
import com.jakewharton.apibuilder.ApiException;
import com.jakewharton.trakt.ServiceManager;
import com.jakewharton.trakt.TraktException;
import com.jakewharton.trakt.entities.Movie;
import com.uwetrottmann.androidutils.GenericSimpleLoader;

import java.util.List;

public class TraktMoviesWatchlistLoader extends GenericSimpleLoader<List<Movie>> {

    private static final String TAG = "TraktMoviesWatchlistLoader";

    public TraktMoviesWatchlistLoader(Context context) {
        super(context);
    }

    @Override
    public List<Movie> loadInBackground() {
        ServiceManager manager = ServiceUtils.getTraktServiceManagerWithAuth(getContext(), false);
        if (manager == null) {
            return null;
        }

        try {
            return manager.userService()
                    .watchlistMovies(ServiceUtils.getTraktUsername(getContext()))
                    .fire();
        } catch (TraktException e) {
            Utils.trackExceptionAndLog(TAG, e);
        } catch (ApiException e) {
            Utils.trackExceptionAndLog(TAG, e);
        }

        return null;
    }
}

@@ -45,41 +45,8 @@
 s;%0A%0A
-import android.content.Context;%0A%0A
 impo
@@ -148,101 +148,8 @@
 ls;%0A
-import com.jakewharton.apibuilder.ApiException;%0Aimport com.jakewharton.trakt.ServiceManager;%0A
 impo
@@ -178,25 +178,16 @@
 kt.Trakt
-Exception
 ;%0Aimport
@@ -295,22 +295,87 @@
 ort 
-java.util.List
+android.content.Context;%0A%0Aimport java.util.List;%0A%0Aimport retrofit.RetrofitError
 ;%0A%0Ap
@@ -680,30 +680,21 @@
         
-ServiceManager
+Trakt
  manager
@@ -969,152 +969,40 @@
 ()))
-%0A                    .fire();%0A        %7D catch (TraktException e) %7B%0A            Utils.trackExceptionAndLog(TAG, e);%0A        %7D catch (ApiException
+;%0A        %7D catch (RetrofitError
  e) 

Update TraktMoviesWatchlistLoader.