owe
This commit is contained in:
1 parent
9b9f07dea5
commit
2e1974c35d
15 files changed
+406
-169
No files matched your search
@@ -89,12 +89,13 @@ namespace CloudBuilder.Master.Service
|
||||
//bool isAttached = Debugger.IsAttached;
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey, item.TranscodeIndc);
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey);
|
||||
}
|
||||
|
||||
data.Datas = list.Select(x => new DmsFileUploadViewDisplayData(x)
|
||||
{
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey)
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey),
|
||||
FormattedM3u8 = FileTypePolicy.PackM3u8Url(service, x.CreatedBy, x.OrderKey)
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
@@ -157,12 +158,13 @@ namespace CloudBuilder.Master.Service
|
||||
//bool isAttached = Debugger.IsAttached;
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey, item.TranscodeIndc);
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey);
|
||||
}
|
||||
|
||||
data.Datas = list.Select(x => new DmsFileUploadViewDisplayData(x)
|
||||
{
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey)
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey),
|
||||
FormattedM3u8 = FileTypePolicy.PackM3u8Url(service, x.CreatedBy, x.OrderKey)
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
@@ -221,12 +223,13 @@ namespace CloudBuilder.Master.Service
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey, item.TranscodeIndc);
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey);
|
||||
}
|
||||
|
||||
data.Logs = list.Select(x => new DmsFileUploadDeleteLogViewDisplayData(x)
|
||||
{
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey)
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey),
|
||||
FormattedM3u8 = FileTypePolicy.PackM3u8Url(service, x.CreatedBy, x.OrderKey)
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
@@ -321,13 +324,14 @@ namespace CloudBuilder.Master.Service
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey, item.TranscodeIndc);
|
||||
item.Url = FileTypePolicy.PackUrl(service, item.CreatedBy, item.OrderKey);
|
||||
}
|
||||
|
||||
data.Families = list.Select(x => new FamilyDmsFileViewDisplayData(x)
|
||||
{
|
||||
FileType = FileTypePolicy.GetType(x.OrderKey),
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey)
|
||||
FormattedPic = FileTypePolicy.PackPicUrl(service, x.CreatedBy, x.OrderKey),
|
||||
FormattedM3u8 = FileTypePolicy.PackM3u8Url(service, x.CreatedBy, x.OrderKey)
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,11 +84,11 @@ namespace CloudBuilder.Master.Service
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.Url) && FileTypePolicy.GetType(item.Url!) == FileTypePolicy.AUDIO)
|
||||
{
|
||||
item.FormattedUrl = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Url, YesNoPolicy.NO);
|
||||
item.FormattedUrl = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Url);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(item.Lrc) && FileTypePolicy.GetType(item.Lrc!) == FileTypePolicy.LYRIC)
|
||||
{
|
||||
item.FormattedLrc = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Lrc, YesNoPolicy.NO);
|
||||
item.FormattedLrc = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Lrc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ namespace CloudBuilder.Master.Service
|
||||
//暂时不支持转码
|
||||
DmsFileEntity dmsFileEntity = repositoryDmsFile.DetachedEntities.Where(x => x.OrderKey == item.Url).FirstOrDefault();
|
||||
item.FormattedPic = FileTypePolicy.PackPicUrl(service, item.CreatedBy, item.Url);
|
||||
item.FormattedUrl = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Url, dmsFileEntity.TranscodeIndc);
|
||||
item.FormattedUrl = FileTypePolicy.PackUrl(service, item.CreatedBy, item.Url);
|
||||
item.FormattedM3u8 = FileTypePolicy.PackM3u8Url(service, item.CreatedBy, item.Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,5 +33,6 @@ namespace CloudBuilder.Master.Data
|
||||
public string? IsPause { get; set; }
|
||||
|
||||
public string? FormattedPic { get; set; }
|
||||
public string? FormattedM3u8 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -32,5 +32,7 @@ namespace CloudBuilder.Master.Data
|
||||
public string? IsPause { get; set; }
|
||||
|
||||
public string? FormattedPic { get; set; }
|
||||
|
||||
public string? FormattedM3u8 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -34,5 +34,6 @@ namespace CloudBuilder.Master.Data
|
||||
public string? IsPause { get; set; }
|
||||
|
||||
public string? FormattedPic { get; set; }
|
||||
public string? FormattedM3u8 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -25,5 +25,7 @@ namespace CloudBuilder.Master.Data
|
||||
public string? FormattedUrl { get; set; }
|
||||
|
||||
public string? FormattedPic { get; set; }
|
||||
|
||||
public string? FormattedM3u8 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -78,14 +78,18 @@ namespace CloudBuilder.Security.Policy
|
||||
{
|
||||
return GetType(value) == LYRIC;
|
||||
}
|
||||
|
||||
public static string PackM3u8Url(IApplicationService service, string createdBy, string orderKey)
|
||||
{
|
||||
if (!IsVideo(orderKey)) return null;
|
||||
return PackUrl(service, createdBy, orderKey, YesNoPolicy.YES, false);
|
||||
}
|
||||
public static string PackPicUrl(IApplicationService service, string createdBy, string orderKey)
|
||||
{
|
||||
return PackUrl(service, createdBy, orderKey, YesNoPolicy.YES, true);
|
||||
}
|
||||
public static string PackUrl(IApplicationService service, string createdBy, string orderKey, string transcodeIndc)
|
||||
public static string PackUrl(IApplicationService service, string createdBy, string orderKey)
|
||||
{
|
||||
return PackUrl(service, createdBy, orderKey, transcodeIndc, false);
|
||||
return PackUrl(service, createdBy, orderKey, YesNoPolicy.NO, false);
|
||||
}
|
||||
|
||||
public static string PackUrl(IApplicationService service, string createdBy, string orderKey, string transcodeIndc, bool isPic)
|
||||
|
||||
Reference in new issue
Block a user