corrected thumbnum quirk
This commit is contained in:
parent
04efcce3c1
commit
18e17da516
2 changed files with 6 additions and 6 deletions
BIN
Pimvidious
BIN
Pimvidious
Binary file not shown.
|
@ -98,12 +98,12 @@ proc compilePage(content: string, video_uri: string = "", search_query: string =
|
|||
page &= pagination
|
||||
page &= "<section>"
|
||||
for idx, url in urls:
|
||||
let title = url.split("/")[^1].replace("_"," ")
|
||||
if title == "THUMBNUM":
|
||||
# This was in Porninvidious, but that uses cut instead of last index,
|
||||
# so probably not necessary here. Leaving a note in case
|
||||
echo "THUMBNUM - do something else here"
|
||||
page &= fmt"""<div><a href="{url}"><img src="{thumbs[idx]}"/><br/>{title}</a></div>"""
|
||||
var
|
||||
vid_url, vid_thumb: string
|
||||
vid_url = url.replace("THUMBNUM","0")
|
||||
vid_thumb = thumbs[idx].replace("THUMBNUM","1")
|
||||
let title = vid_url.split("/")[^1].replace("_"," ")
|
||||
page &= fmt"""<div><a href="{vid_url}"><img src="{vid_thumb}"/><br/>{title}</a></div>"""
|
||||
page &= "</section>"
|
||||
if pagination != "":
|
||||
page &= pagination
|
||||
|
|
Loading…
Reference in a new issue