diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e3e1d63..10535120 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Fixed +- Fix error message about synchronizing Plex collections from a Plex server that has zero collections ## [25.1.0] - 2025-01-10 ### Added diff --git a/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs b/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs index d032b865..cdaf80e6 100644 --- a/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs +++ b/ErsatzTV.Infrastructure/Plex/PlexServerApiClient.cs @@ -348,6 +348,10 @@ public class PlexServerApiClient : IPlexServerApiClient IPlexServerApi xmlService = XmlServiceFor(connection.Uri); int size = await countItems(xmlService).Map(r => r.TotalSize); + if (size == 0) + { + yield break; + } const int PAGE_SIZE = 10;