string GetSyncModelFullPath(StreamKey streamKey, string hash)
        {
            var downloadFolder = GetSourceProjectFolder(streamKey.source);
            var filename       = hash + PlayerFile.PersistentKeyToExtension(streamKey.key);

            return(Path.Combine(downloadFolder, filename));
        }
Exemple #2
0
        async Task <ISyncModel> AcquireEntryAsync(EntryData entry, CancellationToken token)
        {
            var fullPath = Path.Combine(ProjectFolder, m_FileOrganization == FileOrganization.OneFolderPerSource ? entry.SourceId : "",
                                        entry.Hash + PlayerFile.PersistentKeyToExtension(entry.IdInSource));

            return(await PlayerFile.LoadSyncModelAsync(fullPath, entry.IdInSource, token));
        }
        public async Task <ISyncModel> GetSyncModelAsync(StreamKey streamKey, string hash, CancellationToken token)
        {
            var fullPath = Path.Combine(m_DataFolder, hash + PlayerFile.PersistentKeyToExtension(streamKey.key));

            return(await PlayerFile.LoadSyncModelAsync(fullPath, streamKey.key, new CancellationToken()));
        }