-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from jesseward/loved-tracks
Swap Runtime.Serialization to Text.json.Serialization in model responses
- Loading branch information
Showing
14 changed files
with
89 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
namespace Jellyfin.Plugin.Lastfm.Models | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[DataContract] | ||
public class MobileSession | ||
{ | ||
[DataMember(Name = "name")] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[DataMember(Name = "key")] | ||
[JsonPropertyName("key")] | ||
public string Key { get; set; } | ||
|
||
[DataMember(Name = "subscriber")] | ||
[JsonPropertyName("subscriber")] | ||
public int Subscriber { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
Jellyfin.Plugin.Lastfm/Models/Responses/MobileSessionResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Jellyfin.Plugin.Lastfm.Models.Responses | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[DataContract] | ||
public class MobileSessionResponse : BaseResponse | ||
{ | ||
[DataMember(Name="session")] | ||
[JsonPropertyName("session")] | ||
public MobileSession Session { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
namespace Jellyfin.Plugin.Lastfm.Models.Responses | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[DataContract] | ||
public class ScrobbleResponse : BaseResponse | ||
{ | ||
[DataMember(Name = "scrobbles")] | ||
[JsonPropertyName("scrobbles")] | ||
public Scrobbles Scrobbles { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
namespace Jellyfin.Plugin.Lastfm.Models | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
//Wow what a bad response object! | ||
[DataContract] | ||
public class Scrobbles | ||
{ | ||
[DataMember(Name = "@attr")] | ||
[JsonPropertyName("@attr")] | ||
public ScrobbleAttributes Attributes { get; set; } | ||
} | ||
|
||
[DataContract] | ||
public class ScrobbleAttributes | ||
{ | ||
[DataMember(Name = "accepted")] | ||
[JsonPropertyName("accepted")] | ||
public bool Accepted { get; set; } | ||
|
||
[DataMember(Name = "ignored")] | ||
[JsonPropertyName("ignored")] | ||
public bool Ignored { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
namespace Jellyfin.Plugin.Lastfm.Models | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[DataContract] | ||
public class BaseLastfmTrack | ||
{ | ||
[DataMember(Name="artist")] | ||
[JsonPropertyName("artist")] | ||
public LastfmArtist Artist { get; set; } | ||
|
||
[DataMember(Name = "name")] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[DataMember(Name = "mbid")] | ||
[JsonPropertyName("mbid")] | ||
public string MusicBrainzId { get; set; } | ||
} | ||
|
||
[DataContract] | ||
public class LastfmArtist | ||
{ | ||
[DataMember(Name="name")] | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[DataMember(Name = "mbid")] | ||
[JsonPropertyName("mbid")] | ||
public string MusicBrainzId { get; set; } | ||
} | ||
|
||
public class LastfmLovedTrack : BaseLastfmTrack | ||
{ | ||
} | ||
|
||
[DataContract] | ||
|
||
public class LastfmTrack : BaseLastfmTrack | ||
{ | ||
[DataMember(Name="playcount")] | ||
[JsonPropertyName("playcount")] | ||
public int PlayCount { get; set; } | ||
} | ||
} |
Oops, something went wrong.