-
-
Save lantrix/99db17c50d644508a05bab0d5ba9542d to your computer and use it in GitHub Desktop.
Revisions
-
Kautenja revised this gist
Jan 28, 2020 . No changes.There are no files selected for viewing
-
Kautenja revised this gist
Jan 28, 2020 . No changes.There are no files selected for viewing
-
Kautenja created this gist
Jan 28, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ tell application "Music" -- get the selection set theSongs to selection end tell -- setup the progress bar set theSongCount to length of theSongs set progress total steps to theSongCount set progress completed steps to 0 set progress description to "Refreshing Songs..." set progress additional description to "Preparing to process." -- iterate over the songs repeat with i from 1 to theSongCount set theSong to item i of theSongs -- Update the progress detail -- get the metadata about the song tell application "Music" set theArtist to artist of theSong set theName to name of theSong end tell -- update the progress bar with additional information set progress additional description to i & "/" & theSongCount & " - " & theArtist & " - " & theName -- reload the song metadata from disk tell application "Music" refresh theSong end tell -- update the progress bar status set progress completed steps to i end repeat -- Reset the progress information set progress total steps to 0 set progress completed steps to 0 set progress description to "" set progress additional description to ""