Use notable clip count if there are no likes.
MODIFY
XRayBuilder.Core/src/Extras/StartActions/StartActionsArtifactService.cs
XRayBuilder.Core/src/Extras/StartActions/StartActionsArtifactService.cs
@@ -70,15 +70,19 @@ public Artifacts.StartActions GenerateStartActions(BookInfo curBook, AuthorProfi
}
};
startActions.Data.AuthorSubscriptions = startActions.Data.FollowSubscriptions;
+
if (curBook.NotableClips == null || curBook.NotableClips?.Count == 0)
- {
startActions.Data.PopularHighlightsText = null;
- }
else
{
+ var likes = curBook.NotableClips?.Sum(c => c.Likes);
+ if (likes == 0)
+ likes = curBook.NotableClips?.Count;
+
startActions.Data.PopularHighlightsText.LocalizedText.Replace("%NUMPASSAGES%", $"{curBook.NotableClips?.Count}");
- startActions.Data.PopularHighlightsText.LocalizedText.Replace("%NUMHIGHLIGHTS%", $"{curBook.NotableClips?.Sum(c => c.Likes)}");
+ startActions.Data.PopularHighlightsText.LocalizedText.Replace("%NUMHIGHLIGHTS%", $"{likes}");
}
+
startActions.Data.GrokShelfInfo.Asin = curBook.Asin;
startActions.Data.GrokShelfInfo.IsAutoshelvingEnabled = true;

Use notable clip count if there are no likes.