Example #1
0
        public DownloadService(InfoplayConfig infoplayConfig, DownloadServiceConfig downloadServiceConfig)
        {
            _infoplayConfig = infoplayConfig;

            DownloadServiceItem.infoplayConfig        = infoplayConfig;
            DownloadServiceItem.downloadServiceConfig = downloadServiceConfig;
        }
Example #2
0
        public static string GetDestUri(this DownloadServiceConfig downloadServiceConfig, string srcUri)
        {
            string rc = srcUri;

            foreach (var hostMap in downloadServiceConfig.HostMaps)
            {
                if (hostMap.Length != 2)
                {
                    continue;
                }
                if (srcUri.Contains(hostMap[0]))
                {
                    return(rc.Replace(hostMap[0], hostMap[1]));
                }
            }
            return(rc);
        }