Merge pull request #224 from YACReader/feature/comic_vine_html_support

feature: Embrace HTML coming from Comic Vine
This commit is contained in:
Luis Ángel San Martín 2021-03-06 09:53:02 +01:00 committed by GitHub
commit b5251f9416
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -13,6 +13,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch)
### YACReaderLibrary
* New search engine.
* New `manga` field added to comics and folders to tag content as manga, any content added to a manga folder will become manga automatically.
* Support for HTML in comic synopsis, this fixes the synopsis when it comes from Comic Vine with HTML tags.
## 9.7.1
### YACReader

View File

@ -535,7 +535,7 @@ ComicDB ComicVineDialog::parseComicInfo(ComicDB &comic, const QString &json, int
}
if (result.contains("description") && !result.value("description").isNull()) {
comic.info.synopsis = result.value("description").toString().remove(QRegExp("<[^>]*>")); //description
comic.info.synopsis = result.value("description");
}
if (result.contains("character_credits") && !result.value("character_credits").isNull()) {

View File

@ -258,8 +258,14 @@ Rectangle {
font.pixelSize: 15
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignJustify
text: comicInfo.synopsis
text: '<html><head><style>
a {
color: #FFCB00;
text-decoration:none;
}
</style></head><body>' + comicInfo.synopsis + '</body></html>'
visible: comicInfo.synopsis
textFormat: Text.RichText
}
Text {

View File

@ -56,6 +56,7 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent)
"<span style=\"font-weight:600\">YACReaderLibrary</span><br/>"
" &#8226; New fuzzy search engine. Type to search into any field of the database, or target specific content <i>\"read:false manga:true filename:3x3\"</i>, read more about how it works in the <a href=\"https://www.yacreader.com\" style=\"color:#E8B800;\">web site</a>. <br/>"
" &#8226; New `manga` field added to comics and folders to tag content as manga, any content added to a manga folder will become manga automatically.<br/>"
" &#8226; Support for HTML in comic synopsis, this fixes the synopsis when it comes from Comic Vine with HTML tags.<br/>"
"<br/>"
"<span style=\"font-weight:600\">Server</span><br/>"
" &#8226; New `manga` field is sent to YACReader for iOS, so comics tagged as manga will be recognized as such when reading remotely or importing comics.<br/>"