File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import "pkg:/source/api/Image.bs"
2
2
import "pkg:/source/api/baserequest.bs"
3
3
import "pkg:/source/utils/config.bs"
4
+ import "pkg:/source/utils/fakeBlurhash.bs"
4
5
5
6
sub setFields ()
6
7
json = m .top .json
@@ -20,5 +21,13 @@ sub setPoster()
20
21
21
22
imgParams = { "maxHeight" : 440 , "maxWidth" : 295 , "Tag" : m .top .json .ImageTags .Primary }
22
23
m .top .posterURL = ImageURL (m .top .json .id , "Primary" , imgParams )
24
+ if isValidAndNotEmpty (m .top .json .ImageBlurHashes .Primary )
25
+ blurhash = m .top .json .ImageBlurHashes .Primary [m .top .json .ImageTags .Primary ]
26
+ if get_user_setting ("ui.design.renderblurhashes" ) = "true" and isValidAndNotEmpty (blurhash )
27
+ timer = CreateObject ("roTimeSpan " )
28
+ m .top .posterBlurHashUrl = renderFakeBlurhash (blurhash , imgParams .maxWidth , imgParams .maxHeight )
29
+ print "Took " + Str (timer .totalMilliseconds ()) + " milliseconds to render a blurhash in ChannelData."
30
+ end if
31
+ end if
23
32
end if
24
33
end sub
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ sub setPoster()
24
24
if get_user_setting ("ui.design.renderblurhashes" ) = "true" and isValidAndNotEmpty (blurhash )
25
25
timer = CreateObject ("roTimeSpan " )
26
26
m .top .posterBlurHashUrl = renderFakeBlurhash (blurhash , imgParams .maxWidth , imgParams .maxHeight )
27
- print "Took " + Str (timer .totalMilliseconds ()) + " milliseconds to render a blurhash in MoviesData ."
27
+ print "Took " + Str (timer .totalMilliseconds ()) + " milliseconds to render a blurhash in PersonData ."
28
28
end if
29
29
end if
30
30
else if m .top .json .BackdropImageTags [0 ] <> invalid
You can’t perform that action at this time.
0 commit comments