1 Commits

Author SHA1 Message Date
b34f7436c2 fix cirucular deps
Some checks failed
Build and Push Image / build-and-push (push) Has been cancelled
added additonal file types
2025-07-09 21:08:10 -04:00
2 changed files with 5 additions and 2 deletions

View File

@@ -22,17 +22,20 @@ public class Media
public static readonly Dictionary<string, MediaType> KnownTypes = new() public static readonly Dictionary<string, MediaType> KnownTypes = new()
{ {
{ ".jpg", MediaType.Image }, { ".jpg", MediaType.Image },
{ ".avif", MediaType.Image },
{ ".jpeg", MediaType.Image }, { ".jpeg", MediaType.Image },
{ ".jxr", MediaType.Image },
{ ".avif", MediaType.Image },
{ ".png", MediaType.Image }, { ".png", MediaType.Image },
{ ".apng", MediaType.Image }, { ".apng", MediaType.Image },
{ ".webp", MediaType.Image }, { ".webp", MediaType.Image },
{ ".qoi", MediaType.Image },
{ ".ico", MediaType.Image }, { ".ico", MediaType.Image },
{ ".gif", MediaType.Image }, { ".gif", MediaType.Image },
{ ".mp3", MediaType.Audio }, { ".mp3", MediaType.Audio },
{ ".flac", MediaType.Audio }, { ".flac", MediaType.Audio },
{ ".alac", MediaType.Audio }, { ".alac", MediaType.Audio },
{ ".mp4", MediaType.Video }, { ".mp4", MediaType.Video },
{ ".m4v", MediaType.Video },
{ ".webm", MediaType.Video }, { ".webm", MediaType.Video },
{ ".mov", MediaType.Video }, { ".mov", MediaType.Video },
{ ".avi", MediaType.Video }, { ".avi", MediaType.Video },

View File

@@ -10,7 +10,7 @@ using MongoDB.Driver.GridFS;
namespace AobaCore.Services; namespace AobaCore.Services;
public class AobaService(IMongoDatabase db, ThumbnailService thumbnailService, ILogger<AobaService> logger) public class AobaService(IMongoDatabase db)
{ {
private readonly IMongoCollection<Media> _media = db.GetCollection<Media>("media"); private readonly IMongoCollection<Media> _media = db.GetCollection<Media>("media");
private readonly GridFSBucket _gridFs = new(db); private readonly GridFSBucket _gridFs = new(db);