Example #1
0
        public static void RemoveMovieFromWatchList(string title, string year, string imdbid, bool updateMovingPicturesFilters)
        {
            if (!GUICommon.CheckLogin(false))
            {
                return;
            }

            TraktMovieSync syncObject = BasicHandler.CreateMovieSyncData(title, year, imdbid);

            if (syncObject == null)
            {
                return;
            }

            Thread syncThread = new Thread(delegate(object obj)
            {
                TraktSyncResponse response = TraktAPI.TraktAPI.SyncMovieLibrary(obj as TraktMovieSync, TraktSyncModes.unwatchlist);
                if (response == null || response.Status != "success")
                {
                    return;
                }
                if (updateMovingPicturesFilters && IsMovingPicturesAvailableAndEnabled)
                {
                    // Update Categories & Filters
                    MovingPictures.ClearWatchListCache();
                    MovingPictures.UpdateCategoriesAndFilters();
                }
                GUI.GUIWatchListMovies.ClearCache(TraktSettings.Username);
            })
            {
                IsBackground = true,
                Name         = "RemoveWatchList"
            };

            syncThread.Start(syncObject);
        }