ref Sonarr 5938c38bc3a76d1f1e105fb54d5d7f59aa207278 (cherry picked from commit 6f0a2de5053ccb859b4ffbe1e84b4f3e0f7ef9c9)