Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kookxiang committed Mar 13, 2022
1 parent e922a4c commit 91221e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.Bangumi/BangumiApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public async Task<List<PersonInfo>> GetSubjectPeople(string seriesId, Cancellati
return JsonSerializer.Deserialize<User>(jsonString, _options);
}

public async Task UpdateEpisodeStatus(string accessToken, string episodeId, EpisodeStatus status, CancellationToken token)
public async Task UpdateEpisodeStatus(string accessToken, string episodeId, string status, CancellationToken token)
{
await SendRequest($"https://api.bgm.tv/ep/{episodeId}/status/{status}", accessToken, token);
}
Expand Down
23 changes: 6 additions & 17 deletions Jellyfin.Plugin.Bangumi/Model/EpisodeStatus.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
using System.Runtime.Serialization;
using System.Text.Json.Serialization;

namespace Jellyfin.Plugin.Bangumi.Model
namespace Jellyfin.Plugin.Bangumi.Model
{
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum EpisodeStatus
public class EpisodeStatus
{
[EnumMember(Value = "watched")]
Watched,

[EnumMember(Value = "queue")]
InQueue,

[EnumMember(Value = "drop")]
Dropped,

[EnumMember(Value = "remove")]
Removed
public const string Watched = "watched";
public const string InQueue = "queue";
public const string Dropped = "drop";
public const string Removed = "remove";
}
}

0 comments on commit 91221e4

Please sign in to comment.