TraktPlugin.GUI.GUICommon.AddShowToCollection C# (CSharp) Метод

AddShowToCollection() публичный статический Метод

public static AddShowToCollection ( TraktShow show ) : void
show TraktPlugin.TraktAPI.DataStructures.TraktShow
Результат void
        public static void AddShowToCollection(TraktShow show)
        {
            if (!GUICommon.CheckLogin(false)) return;

            var collectionThread = new Thread(obj =>
            {
                var objShow = obj as TraktShow;

                var syncData = new TraktShow
                {
                    Ids = new TraktShowId
                    {
                        Trakt = objShow.Ids.Trakt,
                        Imdb = objShow.Ids.Imdb.ToNullIfEmpty(),
                        Tmdb = objShow.Ids.Tmdb,
                        Tvdb = objShow.Ids.Tvdb,
                        TvRage = objShow.Ids.TvRage
                    },
                    Title = show.Title,
                    Year = show.Year
                };

                TraktLogger.Info("Adding all episodes from show to trakt.tv collection. Title = '{0}', Year = '{1}', IMDb ID = '{2}', TVDb ID = '{3}', TMDb ID = '{4}'",
                                    show.Title, show.Year.ToLogString(), show.Ids.Imdb.ToLogString(), show.Ids.Tvdb.ToLogString(), show.Ids.Tmdb.ToLogString());

                var response = TraktAPI.TraktAPI.AddShowToCollection(syncData);
                TraktLogger.LogTraktResponse(response);
            })
            {
                IsBackground = true,
                Name = "AddCollection"
            };

            collectionThread.Start(show);
        }