/// <summary>
        /// Initialize connections to the local database and the Windows Media Center EPG database.
        /// </summary>
        public void Init()
        {
            schedulerDb = new SchedulerDBEntities();
            Client = new TraktClient();
            Client.Authentication.ClientId = TraktSettings.ClientId;
            Client.Authentication.ClientSecret = TraktSettings.ClientSecret;

            wmcData = new WMCDataSource();
            localWatchlist = schedulerDb.WatchlistMovies;
            localWatchlist.Load();

            jobScheduler = StdSchedulerFactory.GetDefaultScheduler();
            jobScheduler.Start();

            GetAuthInfo();

            RegisterEventSource();

            StartAutoUpdateTask();
        }
 internal TraktCalendarUserMoviesRequest(TraktClient client) : base(client)
 {
 }
 public AuthWindow(TraktClient client) : this()
 {
     this.Client = client;
     Load();
 }
 internal ATraktPaginationPostByIdRequest(TraktClient client) : base(client)
 {
     RequestBody = new TraktRequestBody <TRequestBody>();
     RequestId   = new TraktRequestId();
 }
 internal ATraktNoContentBodylessPostRequest(TraktClient client) : base(client)
 {
 }
Exemplo n.º 6
0
 internal TraktScrobbleModule(TraktClient client) : base(client)
 {
 }
Exemplo n.º 7
0
 internal TraktCertificationsModule(TraktClient client) : base(client)
 {
 }
Exemplo n.º 8
0
 internal TraktPeopleModule(TraktClient client) : base(client)
 {
 }
 internal TraktEpisodeListsRequest(TraktClient client) : base(client)
 {
 }
Exemplo n.º 10
0
 internal TraktSyncModule(TraktClient client) : base(client)
 {
 }
Exemplo n.º 11
0
        public async Task Test_TraktPeopleModule_GetPersonMovieCredits()
        {
            TraktClient client = TestUtility.GetMockClient(GET_PERSON_MOVIE_CREDITS_URI, PERSON_MOVIE_CREDITS_JSON);
            TraktResponse <ITraktPersonMovieCredits> response = await client.People.GetPersonMovieCreditsAsync(PERSON_ID);

            response.Should().NotBeNull();
            response.IsSuccess.Should().BeTrue();
            response.HasValue.Should().BeTrue();
            response.Value.Should().NotBeNull();

            ITraktPersonMovieCredits responseValue = response.Value;

            responseValue.Cast.Should().NotBeNull().And.HaveCount(2);

            ITraktPersonMovieCreditsCastItem[] cast = responseValue.Cast.ToArray();

            cast[0].Characters.Should().NotBeNull().And.HaveCount(1).And.Contain("Li (voice)");
            cast[0].Movie.Should().NotBeNull();
            cast[0].Movie.Title.Should().Be("Kung Fu Panda 3");
            cast[0].Movie.Year.Should().Be(2016);
            cast[0].Movie.Ids.Should().NotBeNull();
            cast[0].Movie.Ids.Trakt.Should().Be(93870U);
            cast[0].Movie.Ids.Slug.Should().Be("kung-fu-panda-3-2016");
            cast[0].Movie.Ids.Imdb.Should().Be("tt2267968");
            cast[0].Movie.Ids.Tmdb.Should().Be(140300U);

            cast[1].Characters.Should().NotBeNull().And.HaveCount(1).And.Contain("Joe Brody");
            cast[1].Movie.Should().NotBeNull();
            cast[1].Movie.Title.Should().Be("Godzilla");
            cast[1].Movie.Year.Should().Be(2014);
            cast[1].Movie.Ids.Should().NotBeNull();
            cast[1].Movie.Ids.Trakt.Should().Be(24U);
            cast[1].Movie.Ids.Slug.Should().Be("godzilla-2014");
            cast[1].Movie.Ids.Imdb.Should().Be("tt0831387");
            cast[1].Movie.Ids.Tmdb.Should().Be(124905U);

            responseValue.Crew.Should().NotBeNull();
            responseValue.Crew.Art.Should().BeNull();
            responseValue.Crew.Camera.Should().BeNull();
            responseValue.Crew.CostumeAndMakeup.Should().BeNull();
            responseValue.Crew.Crew.Should().BeNull();
            responseValue.Crew.Directing.Should().NotBeNull().And.HaveCount(1);

            ITraktPersonMovieCreditsCrewItem[] directing = responseValue.Crew.Directing.ToArray();

            directing[0].Jobs.Should().NotBeNull().And.HaveCount(1).And.Contain("Director");
            directing[0].Movie.Should().NotBeNull();
            directing[0].Movie.Title.Should().Be("Godzilla");
            directing[0].Movie.Year.Should().Be(2014);
            directing[0].Movie.Ids.Should().NotBeNull();
            directing[0].Movie.Ids.Trakt.Should().Be(24U);
            directing[0].Movie.Ids.Slug.Should().Be("godzilla-2014");
            directing[0].Movie.Ids.Imdb.Should().Be("tt0831387");
            directing[0].Movie.Ids.Tmdb.Should().Be(124905U);

            responseValue.Crew.Editing.Should().BeNull();
            responseValue.Crew.Lighting.Should().BeNull();
            responseValue.Crew.Production.Should().NotBeNull().And.HaveCount(1);

            ITraktPersonMovieCreditsCrewItem[] production = responseValue.Crew.Production.ToArray();

            production[0].Jobs.Should().NotBeNull().And.HaveCount(1).And.Contain("Producer");
            production[0].Movie.Should().NotBeNull();
            production[0].Movie.Title.Should().Be("Godzilla");
            production[0].Movie.Year.Should().Be(2014);
            production[0].Movie.Ids.Should().NotBeNull();
            production[0].Movie.Ids.Trakt.Should().Be(24U);
            production[0].Movie.Ids.Slug.Should().Be("godzilla-2014");
            production[0].Movie.Ids.Imdb.Should().Be("tt0831387");
            production[0].Movie.Ids.Tmdb.Should().Be(124905U);

            responseValue.Crew.Sound.Should().BeNull();
            responseValue.Crew.VisualEffects.Should().BeNull();
            responseValue.Crew.Writing.Should().NotBeNull().And.HaveCount(1);

            ITraktPersonMovieCreditsCrewItem[] writing = responseValue.Crew.Writing.ToArray();

            writing[0].Jobs.Should().NotBeNull().And.HaveCount(1).And.Contain("Screenplay");
            writing[0].Movie.Should().NotBeNull();
            writing[0].Movie.Title.Should().Be("Godzilla");
            writing[0].Movie.Year.Should().Be(2014);
            writing[0].Movie.Ids.Should().NotBeNull();
            writing[0].Movie.Ids.Trakt.Should().Be(24U);
            writing[0].Movie.Ids.Slug.Should().Be("godzilla-2014");
            writing[0].Movie.Ids.Imdb.Should().Be("tt0831387");
            writing[0].Movie.Ids.Tmdb.Should().Be(124905U);
        }
 internal TraktEpisodeWatchingUsersRequest(TraktClient client) : base(client)
 {
 }