Skip to content

Yevrag35/PoshSonarr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoshSonarr PoshSonarr-NEXT

version downloads Codacy Badge

Introducing a completely, redesigned, overhauled version of PoshSonarr. In order to become the flexible module that I envisioned, I had to take a completely new approach. Gone are the static types and the needlessly complex, rigid architecture of the previous cmdlets. The NEXT cmdlets are lighter, more error-resistant, and more flexible in accounting for the changes the Sonarr PVR API brings in every update.

COMPATIBILITY

In addition to this, I am making the executive decision to only write the NEXT versions of the module for PowerShell 7 and up (previously known as PowerShell Core). Doing so will allow me to focus on making the library easier to develop and to take advantage of some key functionality that PowerShell 7's SDK brings to the table.

Using

To get started, connect to Sonarr with "Connect-SonarrInstance" (Connect-Sonarr) cmdlet:

# By Server and Port -- (8989 is the default port)
Connect-Sonarr -Server "MEDIASERVER" -ApiKey "xxxxxxxxxxxxxxxx"

   Version Authentication Url                        StartupPath
   ------- -------------- ---                        -----------
2.0.0.5322      forms      http://MEDIASERVER:8989/   C:\ProgramData\NzbDrone\bin

# By explicit URL
Connect-Sonarr -Url "https://sonarr-api.cloud.com" -ApiKey "xxxxxxxxxxxx"

# If you have a reverse proxy that strips away the "/api" path, use the "-NoApiPrefix" switch.

Connect-Sonarr -Url "http://sonarr:8989/sonarr" ...

See the wiki for more information about reverse proxy situations.

An example of some commands in action:

# Set Season 3 of a series to 'Not Monitored'
$series = Get-SonarrSeries -Name 24
$series.Seasons[2].Monitored = $false
$series | Update-SonarrSeries

# Search for a particular series and add it to Sonarr
Search-SonarrSeries "The X-Files" | Add-SonarrSeries -RootFolderPath "\\NAS\Shows" -IgnoreEpisodesWithFiles -SearchForMissingEpisodes -UseSeasonFolders

Cmdlets

The following is the list of the working cmdlets:

  1. Add-SonarrRelease
  2. Add-SonarrSeries
  3. Add-SonarrTag
  4. Clear-SonarrLog
  5. Connect-SonarrInstance - (Connect-Sonarr)
  6. Get-SonarrBackup
  7. Get-SonarrCalendar
  8. Get-SonarrCommand - (Get-SonarrJob)
  9. Get-SonarrDelayProfile
  10. Get-SonarrDiskspace
  11. Get-SonarrDownloadClient
  12. Get-SonarrEpisode
  13. Get-SonarrEpisodeFile
  14. Get-SonarrHistory
  15. Get-SonarrHostConfig
  16. Get-SonarrLog
  17. Get-SonarrLogFile
  18. Get-SonarrMapping
  19. Get-SonarrMediaManagement
  20. Get-SonarrMetadata
  21. Get-SonarrNotification - (Get-SonarrConnection)
  22. Get-SonarrQualityProfile - (Get-SonarrProfile)
  23. Get-SonarrQueue
  24. Get-SonarrRelease - * renamed to Search-SonarrRelease (left behind as alias...)
  25. Get-SonarrRestriction
  26. Get-SonarrRootFolder
  27. Get-SonarrSeries
  28. Get-SonarrStatus
  29. Get-SonarrTag
  30. Get-SonarrUpdate
  31. Get-SonarrWantedMissing
  32. Invoke-SonarrBackup - (Backup-Sonarr)
  33. Invoke-SonarrEpisodeSearch
  34. Invoke-SonarrRssSync
  35. Invoke-SonarrSeasonSearch
  36. Invoke-SonarrSeriesRefresh
  37. Invoke-SonarrSeriesRescan
  38. Invoke-SonarrSeriesSearch
  39. New-SonarrDelayProfile
  40. New-SonarrMapping
  41. New-SonarrPlexNotification - (New-PlexNotification)
  42. New-SonarrQualityProfile - (New-SonarrProfile)
  43. New-SonarrReleasePush
  44. New-SonarrRestriction
  45. New-SonarrTag
  46. Register-SonarrRootFolder (New-SonarrRootFolder)
  47. Remove-SonarrEpisodeFile
  48. Remove-SonarrMapping
  49. Remove-SonarrQualityProfile - (Remove-SonarrProfile)
  50. Remove-SonarrQueueItem
  51. Remove-SonarrRestriction
  52. Remove-SonarrRootFolder
  53. Remove-SonarrSeries
  54. Remove-SonarrTag
  55. Rename-SonarrTag - * (was Set-SonarrTag)
  56. Restart-SonarrInstance - (Restart-Sonarr)
  57. Save-SonarrLogFile
  58. Search-SonarrDirectory
  59. Search-SonarrRelease
  60. Search-SonarrSeries
  61. Set-SonarrDelayProfile
  62. Set-SonarrEpisode
  63. Set-SonarrHostConfig
  64. Set-SonarrMapping
  65. Set-SonarrRestriction
  66. Set-SonarrSeries - * (was Update-SonarrSeries)
  67. Set-SonarrTag - * (renamed to Rename-SonarrTag; left behind as alias)
  68. Update-SonarrDownloadClient
  69. Update-SonarrMediaManagement
  70. Update-SonarrMetadata
  71. Update-SonarrQualityProfile (Set-SonarrQualityProfile/Update-SonarrProfile/Set-SonarrProfile)
  72. Update-SonarrRestriction
  73. Update-SonarrSeries - * (renamed to Set-SonarrSeries; left behind as alias)