feat(readarr): fetch Readarr root folders and expose them on the CLI

Adds the GetRootFolders event backed by GET /rootfolder, storing the result
on the Readarr root folders table, and surfaces it as
"managarr readarr list root-folders".

Root folders reuse the shared RootFolder model. Readarr omits the
unmappedFolders key that the other servarrs return, and the field is
optional, so it deserializes to None without changing the shared type.

Only the read path is included here. Adding and deleting root folders
mutate the library layout, so they are left for separate work.
This commit is contained in:
Dark-Alex-17 committed 2026-08-20 22:32:16 -06:00
1 parent ce8c51b02f
commit 29186ea03c
6 files changed
+236

No files matched your search

+9
View File
@@ -35,6 +35,8 @@ pub enum ReadarrListCommand {
QualityProfiles,
#[command(about = "List all queued events")]
QueuedEvents,
#[command(about = "List all root folders in Readarr")]
RootFolders,
#[command(about = "List all Readarr tags")]
Tags,
#[command(about = "List all Readarr tasks")]
@@ -115,6 +117,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::RootFolders => {
let resp = self
.network
.handle_network_event(ReadarrEvent::GetRootFolders.into())
.await?;
serde_json::to_string_pretty(&resp)?
}
ReadarrListCommand::Tags => {
let resp = self
.network