diff --git a/comp/src/gb.form/.src/File/CTaskPreview.class b/comp/src/gb.form/.src/File/CTaskPreview.class
index 3d970194a..3d011a742 100644
--- a/comp/src/gb.form/.src/File/CTaskPreview.class
+++ b/comp/src/gb.form/.src/File/CTaskPreview.class
@@ -102,7 +102,7 @@ Private Sub PrintIcon(hImage As Image, sThumb As String, Optional bVideo As Bool
Dim iSizeBinding As Integer
If nPage < 0 Then
- iSizeBinding = 4
+ iSizeBinding = $iSize \ 16
Else If nPage > 1 Then
iSizeBinding = Min(Min($iSize / 8, Max(1, nPage / 512 * $iSize)), (nPage - 1))
Endif
@@ -319,24 +319,40 @@ Private Sub PrintEPub(sPath As String, sThumb As String) As Rect
Dim sData As String
Dim hImage As Image
Dim sCover As String
- Dim sDir As String
Dim iPos As Integer
Dim iPos2 As Integer
+ Dim sContent As String
If Not $sUnzip Then Return
- For Each sDir In ["", "OEBPS", "Ops"]
- Exec [$sUnzip, "-p", "-C", sPath, sDir &/ "content.opf"] To sData
- Try sCover = Scan(sData, "*", iPos)
+ If iPos2 = 0 Then Return
+ Try sCover = Scan(Mid$(sData, iPos, iPos2 - iPos), "*id=\"*\"*")[1]
+ If Not sCover Then Return
+
+ Endif
If sCover Then
iPos = InStr(sData, "id=\"" & sCover & "\"")
If iPos Then
iPos2 = InStr(sData, "/>", iPos)
iPos = RInStr(sData, "- GetIconSize() Then
- $bRefreshIcon = True
- RefreshView
+ RefreshViewLater(True)
Endif
Endif