mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-08-12 20:28:22 +00:00
fix #172
This commit is contained in:
parent
337796b9be
commit
fd4c68af18
@ -24,7 +24,8 @@ func nextInTag(client *api.Client, tagname, sort, page, I string) string {
|
||||
if i >= len(tag.Posts)-1 {
|
||||
pageNumber, _ := strconv.Atoi(page)
|
||||
tagn, err := client.FetchTag(tagname, sort, strconv.Itoa(pageNumber+1))
|
||||
if err != nil {
|
||||
// Check length - Imgur will not return an error if there are no more posts and you request the next page
|
||||
if err != nil || len(tagn.Posts) < 1 {
|
||||
return ""
|
||||
}
|
||||
return tagn.Posts[0].Link
|
||||
|
Loading…
Reference in New Issue
Block a user