1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

New: Support Plex API Path Scan (Similar to autoscan)

Closes #4640
Closes #5527
This commit is contained in:
Qstick
2022-04-21 22:49:09 -05:00
parent 2fc7cbff89
commit 24206ad0a3
3 changed files with 109 additions and 12 deletions
@@ -16,6 +16,7 @@ namespace NzbDrone.Core.Notifications.Plex.Server
List<PlexSection> GetMovieSections(PlexServerSettings settings);
void Update(int sectionId, PlexServerSettings settings);
void UpdateMovie(string metadataId, PlexServerSettings settings);
void UpdatePath(string path, int sectionId, PlexServerSettings settings);
string Version(PlexServerSettings settings);
List<PlexPreference> Preferences(PlexServerSettings settings);
string GetMetadataId(int sectionId, string imdbId, string language, PlexServerSettings settings);
@@ -81,6 +82,16 @@ namespace NzbDrone.Core.Notifications.Plex.Server
CheckForError(response);
}
public void UpdatePath(string path, int sectionId, PlexServerSettings settings)
{
var resource = $"library/sections/{sectionId}/refresh";
var request = BuildRequest(resource, HttpMethod.Get, settings);
request.AddQueryParam("path", path);
var response = ProcessRequest(request);
CheckForError(response);
}
public string Version(PlexServerSettings settings)
{
var request = BuildRequest("identity", HttpMethod.Get, settings);