Skip to content

Commit 6219df0

Browse files
committed
Initial commit of the project
1 parent 5068895 commit 6219df0

72 files changed

Lines changed: 2720 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
**/.dockerignore
2+
**/.env
3+
**/.git
4+
**/.gitignore
5+
**/.project
6+
**/.settings
7+
**/.toolstarget
8+
**/.vs
9+
**/.vscode
10+
**/.idea
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/bin
16+
**/charts
17+
**/docker-compose*
18+
**/Dockerfile*
19+
**/node_modules
20+
**/npm-debug.log
21+
**/obj
22+
**/secrets.dev.yaml
23+
**/values.dev.yaml
24+
LICENSE
25+
README.md
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace MiniMediaMetadataAPI.Application.Configurations;
2+
3+
public class DatabaseConfiguration
4+
{
5+
public string ConnectionString { get; set; }
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace MiniMediaMetadataAPI.Application.Enums;
2+
3+
public enum ProviderType
4+
{
5+
Any,
6+
MusicBrainz,
7+
Spotify,
8+
Tidal
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace MiniMediaMetadataAPI.Application.Enums;
2+
3+
public enum SearchResultType
4+
{
5+
Ok,
6+
NotFound,
7+
InQueueSync
8+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using System.Text;
2+
3+
namespace MiniMediaMetadataAPI.Application.Helpers;
4+
5+
public static class StringHelper
6+
{
7+
public static string RemoveControlChars(string value)
8+
{
9+
if (string.IsNullOrWhiteSpace(value))
10+
{
11+
return string.Empty;
12+
}
13+
14+
StringBuilder sb = new StringBuilder();
15+
16+
for (int i = 0; i < value.Length; i++)
17+
{
18+
if (!char.IsControl(value[i]))
19+
{
20+
sb.Append(value[i]);
21+
}
22+
}
23+
24+
return sb.ToString();
25+
}
26+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
<PropertyGroup>
10+
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
11+
</PropertyGroup>
12+
13+
<ItemGroup>
14+
<Folder Include="Jobs\" />
15+
</ItemGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Dapper" Version="2.1.66" />
19+
<PackageReference Include="FuzzySharp" Version="2.0.2" />
20+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
21+
<PackageReference Include="Npgsql" Version="9.0.3" />
22+
<PackageReference Include="Polly" Version="8.5.2" />
23+
<PackageReference Include="Quartz" Version="3.14.0" />
24+
<PackageReference Include="Quartz.AspNetCore" Version="3.14.0" />
25+
<PackageReference Include="Quartz.Jobs" Version="3.14.0" />
26+
<PackageReference Include="SpotifyAPI.Web.Auth" Version="7.2.1" />
27+
</ItemGroup>
28+
29+
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace MiniMediaMetadataAPI.Application.Models.Database.MusicBrainz;
2+
3+
public class MusicBrainzArtistModel
4+
{
5+
public Guid ArtistId { get; set; }
6+
public int ReleaseCount { get; set; }
7+
public string Name { get; set; }
8+
public string Type { get; set; }
9+
public string Country { get; set; }
10+
public DateTime LastSyncTime { get; set; }
11+
public List<MusicBrainzReleaseModel> Releases { get; set; } = new List<MusicBrainzReleaseModel>();
12+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace MiniMediaMetadataAPI.Application.Models.Database.MusicBrainz;
2+
3+
public class MusicBrainzLabelModel
4+
{
5+
public Guid LabelId { get; set; }
6+
public Guid AreaId { get; set; }
7+
public string Name { get; set; }
8+
public string Disambiguation { get; set; }
9+
public int LabelCode { get; set; }
10+
public string Type { get; set; }
11+
public string LifeSpanBegin { get; set; }
12+
public string LifeSpanEnd { get; set; }
13+
public bool LifeSpanEnded { get; set; }
14+
public string SortName { get; set; }
15+
public string TypeId { get; set; }
16+
public string Country { get; set; }
17+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace MiniMediaMetadataAPI.Application.Models.Database.MusicBrainz;
2+
3+
public class MusicBrainzReleaseLabelModel
4+
{
5+
public Guid ReleaseId { get; set; }
6+
public Guid LabelId { get; set; }
7+
public string CatalogNumber { get; set; }
8+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace MiniMediaMetadataAPI.Application.Models.Database.MusicBrainz;
2+
3+
public class MusicBrainzReleaseModel
4+
{
5+
public Guid ArtistId { get; set; }
6+
public Guid ReleaseId { get; set; }
7+
public string Title { get; set; }
8+
public string Status { get; set; }
9+
public string StatusId { get; set; }
10+
public string Date { get; set; }
11+
public string Barcode { get; set; }
12+
public string Country { get; set; }
13+
public string Disambiguation { get; set; }
14+
public string Quality { get; set; }
15+
16+
//extra
17+
public int TotalTracks { get; set; }
18+
19+
public List<MusicBrainzReleaseTrackModel> Tracks { get; set; } = new List<MusicBrainzReleaseTrackModel>();
20+
public List<MusicBrainzLabelModel> Labels { get; set; } = new List<MusicBrainzLabelModel>();
21+
}

0 commit comments

Comments
 (0)