fix(netd): change data props to lowercase
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-01 00:09:42 -04:00
parent 2a18280d36
commit a138f3a5ea
5 changed files with 12 additions and 12 deletions

View file

@ -188,7 +188,7 @@ dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
dotnet_naming_rule.properties_should_be_pascalcase.severity = none
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase

View file

@ -11,7 +11,7 @@ using NetDaemon.HassModel.Integration;
namespace NetDaemonConfig.Apps.Spotify.PlayAlbum
{
public record PlayAlbumData(string? Artist, string? Album);
public record PlayAlbumData(string? artist, string? album);
[NetDaemonApp]
public class PlayAlbum
@ -32,7 +32,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlayAlbum
{
SpotifyplusSearchAlbumsResponse? result = (
await services.Spotifyplus.SearchAlbumsAsync(
criteria: $"{e?.Artist} {e?.Album}",
criteria: $"{e?.artist} {e?.album}",
limitTotal: 1,
entityId: SpotifyTypes.DefaultEntityId,
// My Defaults
@ -43,7 +43,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlayAlbum
string uri = result?.Result?.Items?[0]?.Uri ??
throw new TargetException(
$"The album {e?.Album}{(e?.Artist is null ? "" : $" by {e?.Artist}")} could not be found."
$"The album {e?.album}{(e?.artist is null ? "" : $" by {e?.artist}")} could not be found."
);
services.Spotifyplus.PlayerMediaPlayContext(

View file

@ -11,7 +11,7 @@ using NetDaemon.HassModel.Integration;
namespace NetDaemonConfig.Apps.Spotify.PlayArtist
{
public record PlayArtistData(string? Artist);
public record PlayArtistData(string? artist);
[NetDaemonApp]
public class PlayArtist
@ -32,7 +32,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlayArtist
{
SpotifyplusSearchArtistsResponse? result = (
await services.Spotifyplus.SearchArtistsAsync(
criteria: e?.Artist ?? throw new TargetException($"The artist {e?.Artist} could not be found."),
criteria: e?.artist ?? throw new TargetException($"The artist {e?.artist} could not be found."),
limitTotal: 1,
entityId: SpotifyTypes.DefaultEntityId,
// My Defaults
@ -42,7 +42,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlayArtist
).Value.Deserialize<SpotifyplusSearchArtistsResponse>(_jsonOptions);
string uri = result?.Result?.Items?[0]?.Uri ??
throw new TargetException($"The artist {e?.Artist} could not be found.");
throw new TargetException($"The artist {e?.artist} could not be found.");
services.Spotifyplus.PlayerMediaPlayContext(
contextUri: uri,

View file

@ -16,7 +16,7 @@ using NetDaemon.HassModel.Integration;
namespace NetDaemonConfig.Apps.Spotify.PlayPlaylist
{
public record PlayPlaylistData(string? Playlist);
public record PlayPlaylistData(string? playlist);
[NetDaemonApp]
public class PlayPlaylist
@ -37,7 +37,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlayPlaylist
{
try
{
string query = e?.Playlist ?? throw new TargetException("Query not found.");
string query = e?.playlist ?? throw new TargetException("Query not found.");
SpotifyplusPlaylistResponse? result = (
await services.Spotifyplus.GetPlaylistFavoritesAsync(

View file

@ -11,7 +11,7 @@ using NetDaemon.HassModel.Integration;
namespace NetDaemonConfig.Apps.Spotify.PlaySong
{
public record PlaySongData(string? Artist, string? Song);
public record PlaySongData(string? artist, string? song);
[NetDaemonApp]
public class PlaySong
@ -32,7 +32,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlaySong
{
SpotifyplusSearchTracksResponse? result = (
await services.Spotifyplus.SearchTracksAsync(
criteria: $"{e?.Artist} {e?.Song}",
criteria: $"{e?.artist} {e?.song}",
limitTotal: 1,
entityId: SpotifyTypes.DefaultEntityId,
// My Defaults
@ -42,7 +42,7 @@ namespace NetDaemonConfig.Apps.Spotify.PlaySong
).Value.Deserialize<SpotifyplusSearchTracksResponse>(_jsonOptions);
string uri = result?.Result?.Items?[0]?.Uri ?? throw new TargetException(
$"The song {e?.Song}{(e?.Artist is null ? "" : $" by {e?.Artist}")} could not be found."
$"The song {e?.song}{(e?.artist is null ? "" : $" by {e?.artist}")} could not be found."
);
services.Spotifyplus.PlayerMediaPlayTracks(