diff --git a/src/libs/subsonic/impl/responses/Album.cpp b/src/libs/subsonic/impl/responses/Album.cpp index 8694f06b..78bfb6c6 100644 --- a/src/libs/subsonic/impl/responses/Album.cpp +++ b/src/libs/subsonic/impl/responses/Album.cpp @@ -121,8 +121,7 @@ namespace API::Subsonic } // Report the first GENRE for this track - ClusterType::pointer clusterType{ ClusterType::find(dbSession, "GENRE") }; - if (clusterType) + if (ClusterType::pointer clusterType{ ClusterType::find(dbSession, "GENRE") }) { auto clusters{ release->getClusterGroups({clusterType}, 1) }; if (!clusters.empty() && !clusters.front().empty()) diff --git a/src/libs/subsonic/impl/responses/Song.cpp b/src/libs/subsonic/impl/responses/Song.cpp index ac4d3246..73eeb5d7 100644 --- a/src/libs/subsonic/impl/responses/Song.cpp +++ b/src/libs/subsonic/impl/responses/Song.cpp @@ -149,8 +149,7 @@ namespace API::Subsonic trackResponse.setAttribute("starred", StringUtils::toISO8601String(dateTime)); // Report the first GENRE for this track - ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") }; - if (genreClusterType) + if (ClusterType::pointer genreClusterType{ ClusterType::find(dbSession, "GENRE") }) { auto clusters{ track->getClusterGroups({genreClusterType}, 1) }; if (!clusters.empty() && !clusters.front().empty())