Exemple #1
0
func newClearance() (err error) {
	log.Warningf("CloudFlared! User-Agent: %s - Cookies: %s", clearance.UserAgent, clearance.Cookies)

	if config.Get().CloudHoleKey == "" {
		retries = 3
		return errors.New("CloudFlared! Set your CloudHole API key.")
	}

	clearance, err = cloudhole.GetClearance()
	if err == nil {
		log.Noticef("New clearance: %s - %s", clearance.UserAgent, clearance.Cookies)
	} else {
		retries = 3
	}

	return err
}
Exemple #2
0
	"github.com/scakemyer/quasar/cloudhole"
	"github.com/scakemyer/quasar/config"
	"github.com/scakemyer/quasar/xbmc"
)

const (
	ApiUrl       = "https://api-v2launch.trakt.tv"
	ClientId     = "4407ab20a3a971e7c92d4996b36b76d0312ea085cb139d7c38a1a4c9f8428f60"
	ClientSecret = "83f5993015942fe1320772c9c9886dce08252fa95445afab81a1603f8671e490"
	ApiVersion   = "2"
)

var log = logging.MustGetLogger("trakt")

var (
	clearance, _ = cloudhole.GetClearance()
	retries      = 0
	scrobbleTime = float64(0)
	scrobbleEnd  = float64(0)
)

type Object struct {
	Title string `json:"title"`
	Year  int    `json:"year"`
	IDs   *IDs   `json:"ids"`
}

type Movie struct {
	Object

	Released      string   `json:"released"`