From 7f6cf312deadad9075cdf550660c3fc7dd7ad40d Mon Sep 17 00:00:00 2001 From: Angry Cuban <39564898+angrycuban13@users.noreply.github.com> Date: Thu, 23 May 2024 17:25:35 -0500 Subject: [PATCH] Update README.md --- Send-ReadarrBooksToKindle/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Send-ReadarrBooksToKindle/README.md b/Send-ReadarrBooksToKindle/README.md index 66f02ca..911a92d 100644 --- a/Send-ReadarrBooksToKindle/README.md +++ b/Send-ReadarrBooksToKindle/README.md @@ -43,13 +43,21 @@ I have only tested this script with sending to a Kindle, but if you have a diffe ```powershell + + # Convert JSON to PSObject $readarrWebhookData = ConvertFrom-Json -InputObject $body + if ($readarrWebhookData.EventType -eq "Test") { + Write-Host "Readarr sent a test" + } + + else { $bookAuthor = $readarrWebhookData.author.name $bookTitle = $readarrWebhookData.book.title $bookFilePath = $readarrWebhookData.bookfiles.path Invoke-PSUScript -Name 'YOUR-SCRIPT-NAME-HERE' -Author $bookAuthor -BookTitle $bookTitle -BookFilePath $bookFilePath -Wait + } ``` > [!IMPORTANT]