File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1- local trackID
21tell application " Spotify" to activate -- launches spotify
32on idle
43 repeat while application " Spotify" is running
5- check()
6- delay 0.5
4+ check()
5+ delay 0.5
76 end repeat
87 quit
98end idle
@@ -13,6 +12,10 @@ on quit -- binds spotty and spotify so that spotify quits when we quit spotty
1312 continue quit
1413end quit
1514
15+ on getTrack ()
16+ tell application " Spotify" to get id of current track
17+ end getTrack
18+
1619on relaunch () -- quit, then relaunch and play
1720 tell application " Spotify"
1821 quit
@@ -24,8 +27,5 @@ on relaunch() -- quit, then relaunch and play
2427end relaunch
2528
2629on check ()
27- try
28- tell application " Spotify" to set trackID to id of current track -- grab track ID
29- if (offset of " ad" in trackID) = 9 then relaunch() -- checks if the track is an ad and relaunches if it is
30- end try
30+ if (offset of " ad" in getTrack()) = 9 then relaunch() -- checks if the track is an ad and relaunches if it is
3131end check
You can’t perform that action at this time.
0 commit comments