diff --git a/SWAD.API/Services/MusicAPI/Api/TidalService.cs b/SWAD.API/Services/MusicAPI/Api/TidalService.cs index e64432f..36032d1 100644 --- a/SWAD.API/Services/MusicAPI/Api/TidalService.cs +++ b/SWAD.API/Services/MusicAPI/Api/TidalService.cs @@ -68,7 +68,7 @@ public class TidalService : ApiService url.Query = urlQuery.ToString(); var httpRequest = new HttpRequestMessage(HttpMethod.Get, url.Uri); httpRequest.Content = - new StringContent(string.Empty, new MediaTypeHeaderValue("application/vnd.tidal.v1+json")); + new StringContent(string.Empty, new MediaTypeHeaderValue("application/vnd.api+json")); var response = await client.SendAsync(httpRequest); if (!response.IsSuccessStatusCode) @@ -124,7 +124,7 @@ public class TidalService : ApiService await JsonSerializer.DeserializeAsync(await nameResponse.Content.ReadAsStreamAsync()); StringBuilder artists = new(); - foreach (var data in trackJson?.Data.RelationShips.Artist.Data) + foreach (var data in trackJson?.Data.RelationShips.Artist.Data ?? new()) { var artistsResponse = await client.SendAsync(GetRequestMessage(client, data.Id, countryCode, true)); if (!artistsResponse.IsSuccessStatusCode) @@ -158,7 +158,7 @@ public class TidalService : ApiService { var clientHeaders = client.DefaultRequestHeaders; clientHeaders.Authorization = new AuthenticationHeaderValue("Bearer", Token.Token); - clientHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.tidal.v1+json")); + clientHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/vnd.api+json")); UriBuilder builder; if (isArtist) @@ -183,7 +183,7 @@ public class TidalService : ApiService builder.Query = urlQuery.ToString(); var httpRequest = new HttpRequestMessage(HttpMethod.Get, builder.Uri); - httpRequest.Content = new StringContent(string.Empty, Encoding.UTF8, "application/vnd.tidal.v1+json"); + httpRequest.Content = new StringContent(string.Empty, Encoding.UTF8, "application/vnd.api+json"); return httpRequest; } } \ No newline at end of file diff --git a/SWAD.API/appsettings.json b/SWAD.API/appsettings.json index 8290087..a0c36bb 100644 --- a/SWAD.API/appsettings.json +++ b/SWAD.API/appsettings.json @@ -10,8 +10,6 @@ "ServicesData": [ { "Name": "Spotify", - "ClientId": "INSERT CLIENTID HERE", - "Secret": "INSERT SECRET HERE", "Endpoints": { "Base": "https://open.spotify.com/", "Api": "https://api.spotify.com/v1/", @@ -28,8 +26,6 @@ }, { "Name": "Tidal", - "ClientId": "INSERT CLIENTID HERE", - "Secret": "INSERT SECRET HERE", "Endpoints": { "Base": "https://tidal.com", "Api": "https://openapi.tidal.com/v2/", diff --git a/SWAD.API/doc.xml b/SWAD.API/doc.xml index 45e03dc..14d82ba 100644 --- a/SWAD.API/doc.xml +++ b/SWAD.API/doc.xml @@ -182,6 +182,11 @@ Json Structure for tidal track response + + + Json Structure for tidal track response + + Json Structure for tidal track response diff --git a/TelegramBot/TelegramBot.csproj b/TelegramBot/TelegramBot.csproj index f9641f5..4858e32 100644 --- a/TelegramBot/TelegramBot.csproj +++ b/TelegramBot/TelegramBot.csproj @@ -37,10 +37,6 @@ Always - - - Always - diff --git a/docker-compose.dev.yaml b/docker-compose.dev.yaml new file mode 100644 index 0000000..a141046 --- /dev/null +++ b/docker-compose.dev.yaml @@ -0,0 +1,23 @@ +services: + portainer: + image: portainer/portainer-ce:latest + volumes: + - data:/data + - /var/run/docker.sock:/var/run/docker.sock + api: + build: + context: ./ + dockerfile: ./SWAD.API/Dockerfile + environment: + - ASPNETCORE_ENVIRONMENT=Development + bot: + build: + context: ./ + dockerfile: ./TelegramBot/Dockerfile + environment: + - ASPNETCORE_ENVIRONMENT=Development + redis: + image: redis + +volumes: + data: