🚨 Fix complier warnings
This commit is contained in:
@@ -45,7 +45,7 @@ public class CloudFile : ModelBase, ICloudFile, IIdentifiedResource
|
||||
|
||||
/// The object name which stored remotely,
|
||||
/// multiple cloud file may have same storage id to indicate they are the same file
|
||||
///
|
||||
///
|
||||
/// If the storage id was null and the uploaded at is not null, means it is an embedding file,
|
||||
/// The embedding file means the file is store on another site,
|
||||
/// or it is a webpage (based on mimetype)
|
||||
@@ -72,8 +72,8 @@ public class CloudFile : ModelBase, ICloudFile, IIdentifiedResource
|
||||
DeletedAt = DeletedAt,
|
||||
Id = Id,
|
||||
Name = Name,
|
||||
FileMeta = FileMeta,
|
||||
UserMeta = UserMeta,
|
||||
FileMeta = FileMeta ?? [],
|
||||
UserMeta = UserMeta ?? [],
|
||||
SensitiveMarks = SensitiveMarks,
|
||||
MimeType = MimeType,
|
||||
Hash = Hash,
|
||||
@@ -141,4 +141,4 @@ public class CloudFileReference : ModelBase
|
||||
ExpiredAt = ExpiredAt?.ToTimestamp()
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,6 @@ namespace DysonNetwork.Drive.Storage;
|
||||
public class FileService(
|
||||
AppDatabase db,
|
||||
IConfiguration configuration,
|
||||
TusDiskStore store,
|
||||
ILogger<FileService> logger,
|
||||
IServiceScopeFactory scopeFactory,
|
||||
ICacheService cache
|
||||
@@ -268,14 +267,26 @@ public class FileService(
|
||||
// Add detailed stream information
|
||||
["video_streams"] = mediaInfo.VideoStreams.Select(s => new
|
||||
{
|
||||
s.AvgFrameRate, s.BitRate, s.CodecName, s.Duration, s.Height, s.Width, s.Language,
|
||||
s.PixelFormat, s.Rotation
|
||||
s.AvgFrameRate,
|
||||
s.BitRate,
|
||||
s.CodecName,
|
||||
s.Duration,
|
||||
s.Height,
|
||||
s.Width,
|
||||
s.Language,
|
||||
s.PixelFormat,
|
||||
s.Rotation
|
||||
}).Where(s => double.IsNormal(s.AvgFrameRate)).ToList(),
|
||||
["audio_streams"] = mediaInfo.AudioStreams.Select(s => new
|
||||
{
|
||||
s.BitRate, s.Channels, s.ChannelLayout, s.CodecName, s.Duration, s.Language,
|
||||
s.SampleRateHz
|
||||
})
|
||||
{
|
||||
s.BitRate,
|
||||
s.Channels,
|
||||
s.ChannelLayout,
|
||||
s.CodecName,
|
||||
s.Duration,
|
||||
s.Language,
|
||||
s.SampleRateHz
|
||||
})
|
||||
.ToList(),
|
||||
};
|
||||
if (mediaInfo.PrimaryVideoStream is not null)
|
||||
@@ -319,7 +330,7 @@ public class FileService(
|
||||
try
|
||||
{
|
||||
logger.LogInformation("Processing file {FileId} in background...", fileId);
|
||||
|
||||
|
||||
var fileExtension = Path.GetExtension(originalFilePath);
|
||||
|
||||
if (!pool.PolicyConfig.NoOptimization)
|
||||
@@ -869,4 +880,4 @@ file class UpdatableCloudFile(CloudFile file)
|
||||
.SetProperty(f => f.UserMeta, userMeta!)
|
||||
.SetProperty(f => f.IsMarkedRecycle, IsMarkedRecycle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user