Ejemplo n.º 1
0
    private static void GrabArtwork(string title, string ttitle, int year, string director, string imdbid, string StrTitle1, GUIDialogProgress dlgPrgrs)
    {
      try
      {
        if (dlgPrgrs != null)
          dlgPrgrs.SetLine(1, "Now loading Fanart ...");

        if (dlgPrgrs != null && !dlgPrgrs.ShouldRenderLayer())
          return;

        if (dlgPrgrs != null)
          dlgPrgrs.Percentage = 10;

        var grab = new Grabber_URLClass();
        List<DbMovieInfo> listemovies = grab.GetFanart(title, ttitle, year, director, imdbid, MyFilms.conf.StrPathFanart, true, false, StrTitle1, string.Empty);
      }
      catch (Exception ex)
      {
        LogMyFilms.Debug("GrabArtwork() - Error getting fanart: " + ex.Message);
      }
      finally
      {
        if (dlgPrgrs != null)
        {
          dlgPrgrs.Percentage = 100;
          dlgPrgrs.SetLine(1, "Finished loading Fanart !");
          dlgPrgrs.ShowWaitCursor = false;
          Thread.Sleep(500);
          dlgPrgrs.Close();
        }
      }
    }