Skip to content

Commit

Permalink
misc: add get method for scrobble endpoint in APIv3
Browse files Browse the repository at this point in the history
because it doesn't require a body and I need it to be get for the vlc scrobbler.
  • Loading branch information
revam committed Oct 30, 2024
1 parent 5be796c commit c3cce2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Shoko.Server/API/v3/Controllers/FileController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,10 @@ public async Task<ActionResult> SetWatchedStatusOnFile([FromRoute, Range(1, int.
/// <param name="watched">True if file should be marked as watched, false if file should be unmarked, or null if it shall not be updated.</param>
/// <param name="resumePosition">Number of ticks into the video to resume from, or null if it shall not be updated.</param>
/// <returns></returns>
[HttpGet("{fileID}/Scrobble")]
[HttpPatch("{fileID}/Scrobble")]
public async Task<ActionResult> ScrobbleFileAndEpisode([FromRoute, Range(1, int.MaxValue)] int fileID, [FromQuery(Name = "event")] string eventName = null, [FromQuery] int? episodeID = null, [FromQuery] bool? watched = null, [FromQuery] long? resumePosition = null)
{

var file = RepoFactory.VideoLocal.GetByID(fileID);
if (file == null)
return NotFound(FileNotFoundWithFileID);
Expand Down

0 comments on commit c3cce2f

Please sign in to comment.