Beispiel #1
0
        private BackgroundDownloader ToDownloader(MusicItem track)
        {
            var    downloader = new BackgroundDownloader();
            var    cloud      = track.CloudServer;
            var    user       = track.Username;
            var    pass       = track.Password;
            string authHeader = cloud == null?HttpUtil.BasicAuthHeader(user, pass) : HttpUtil.Basic + " " + HttpUtil.Base64ColonSeparated(cloud, user, pass);

            downloader.SetRequestHeader(HttpUtil.Authorization, authHeader);
            return(downloader);
        }