golift / starr

Starr Library: Fully functional go package to interact with Lidarr, Prowlarr, Radarr, Readarr, and Sonarr APIs.
https://golift.io/discord
MIT License
66 stars 18 forks source link

Support the Parse endpoint #145

Closed madmatt closed 3 weeks ago

madmatt commented 4 months ago

Sonarr has a /api/v3/parse endpoint that takes a generic text string Title and can parse it and return series/episode data. Very useful to convert a filename into structured data.

Context: I'm creating a script that will automatically watch a folder for IO changes, run Parse on any files added, and if it detects a series/episode, automatically issue a ManualImportReprocess command with the filename and the details from the Parse (e.g. which series and episode ID it should be processed against).

I'm not sure if I'm going about this the right way or not - essentially I am trying to create a way to automatically import files from a source that isn't supported by Sonarr (think an Emby instance or some other fileshare service that Sonarr doesn't integrate with directly).

Thanks!

davidnewhall commented 4 months ago

I don't see a problem with adding a parse method to sonarr.

I'm creating a script

You mean a go app?

I'm not sure if I'm going about this the right way or not

Not real sure either, you might consider asking in the #sonarr or #3rd-party channel on Servarr discord.

madmatt commented 4 months ago

Sorry, yes a Go app. Good idea on where to ask, I'll check in over there and contribute a PR here to add the Parse endpoint if it seems like a workable idea. Thanks!

davidnewhall commented 3 weeks ago

Still need the code? I committed it. Can you test it?