Skip to content

Commit

Permalink
Merge pull request #29 from singhpaul/fix-art-filename-caching
Browse files Browse the repository at this point in the history
Change enumeration for cover art filenames from max 999 to max 9
  • Loading branch information
Pe8er authored Aug 5, 2019
2 parents 6c7e035 + ec2fd59 commit bc2fdc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Playbox.widget/lib/Get Current Track.applescript
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ on getLocaliTunesArt()
set ext to ".jpg"
end if
end tell
set fileName to (mypath as POSIX file) & "cover" & (random number from 0 to 999) & ext as string -- get the filename to ~/my path/cover.ext
set fileName to (mypath as POSIX file) & "cover" & (random number from 0 to 9) & ext as string -- get the filename to ~/my path/cover.ext
set outFile to open for access file fileName with write permission -- write to file
set eof outFile to 0 -- truncate the file
write srcBytes to outFile -- write the image bytes to the file
Expand Down Expand Up @@ -362,4 +362,4 @@ on logEvent(e)
else
return
end if
end logEvent
end logEvent

0 comments on commit bc2fdc7

Please sign in to comment.