Skip to content

Commit

Permalink
Fixed Genre
Browse files Browse the repository at this point in the history
Bug: If no genre on audible, script would error and stop.
Fix: nested if statements
  • Loading branch information
seanap committed Sep 9, 2020
1 parent 1de8816 commit 280ae0a
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions Audible.com#Search by Album.src
Original file line number Diff line number Diff line change
Expand Up @@ -223,27 +223,32 @@ else
endif

# 1st Genre
outputto "tmp_Genre1"
findline "categoriesLabel"
joinuntil "</span>"
findinline "href="
findinline ">"
sayuntil "<"

# 2nd Genre
findinline "href=" 1 1
movechar -1
if "="
findline "categoriesLabel" 1 1
unspace
if "categoriesLabel"
outputto "tmp_Genre1"
findinline "categoriesLabel" 1 1
joinuntil "</span>"
findinline "href="
findinline ">"
outputto "tmp_Genre2"
sayuntil "<"
outputto "genre"
sayoutput "tmp_Genre1"
say "/"
sayoutput "tmp_Genre2"
# 2nd Genre
findinline "href=" 1 1
movechar -1
if "="
findinline ">"
outputto "tmp_Genre2"
sayuntil "<"
outputto "genre"
sayoutput "tmp_Genre1"
say "/"
sayoutput "tmp_Genre2"
else
outputto "genre"
sayoutput "tmp_Genre1"
endif
else
outputto "genre"
sayoutput "tmp_Genre1"
gotoline 1
endif

# Rating
Expand Down

0 comments on commit 280ae0a

Please sign in to comment.