private string GetRemotePath()
        {
            var parts = new List <string>
            {
                _serverId,
                "data.json"
            };

            return(_provider.GetFullPath(parts, _target));
        }
Beispiel #2
0
        public LocalItem CreateLocalItem(IServerSyncProvider provider, string syncJobId, string syncJobItemId, SyncTarget target, BaseItemDto libraryItem, string serverId, string originalFileName)
        {
            var path = GetDirectoryPath(provider, syncJobId, libraryItem, serverId);

            path.Add(GetLocalFileName(provider, libraryItem, originalFileName));

            var localPath = provider.GetFullPath(path, target);

            foreach (var mediaSource in libraryItem.MediaSources)
            {
                mediaSource.Path     = localPath;
                mediaSource.Protocol = MediaProtocol.File;
            }

            return(new LocalItem
            {
                Item = libraryItem,
                ItemId = libraryItem.Id,
                ServerId = serverId,
                LocalPath = localPath,
                Id = GetLocalId(syncJobItemId, libraryItem.Id)
            });
        }