Bloom.WebLibraryIntegration.BookTransfer.GetUrlAndTitle C# (CSharp) Method

GetUrlAndTitle() private method

private GetUrlAndTitle ( string bucket, string s3orderKey, string &url, string &title ) : void
bucket string
s3orderKey string
url string
title string
return void
        private void GetUrlAndTitle(string bucket, string s3orderKey, ref string url, ref string title)
        {
            int index = s3orderKey.IndexOf('/');
            if (index > 0)
                index = s3orderKey.IndexOf('/', index + 1); // second slash
            if (index > 0)
                url = s3orderKey.Substring(0,index);
            if (url == "unknown" || string.IsNullOrWhiteSpace(title) || title == "unknown")
            {
                // not getting the info we want in the expected way. This old algorithm may work.
                var metadata = BookMetaData.FromString(_s3Client.DownloadFile(s3orderKey, bucket));
                url = metadata.DownloadSource;
                title = metadata.Title;
            }
        }