Académique Documents
Professionnel Documents
Culture Documents
-- 1. Edit the settings (see below). This step is NECESSARY the first time you
use it!
-- 2. Run this script (this should open Audio Hijack Pro and Spotify)
-- 3. Play the album / playlist in Spotify
--
-- NOTE: the script assumes that each track is played entirely. You CANNOT skip
tracks in Spotify.
-- If you do so the script will get out of sync and the resulting files contain
partial or multiple songs.
--
-- You need to have "atomicparsley" installed on your system. You can install the
application with
-- homebrew using "brew install atomicparsley" (see http://brew.sh/)
--
-- The recording settings for Audio Hijack Pro NEED to be defined here, they CANNOT
be changed
-- withing the application itself.
-- Every time the script is executed, the settings defined here are applied to
Audio Hijack Pro,
-- customizations in the application are overwritten.
-- In order to change the output format, you need to find the line in this script
which looks like
-- "set recording format of spotify_session to {...}"
-- If you change the output format, make sure to update the file_extension property
to match the codec!
property file_extension : ".m4a"
set track_counter to 0
set previous_metadata to {}
my stop_recording(spotify_session)
my save_metadata(previous_metadata, track_counter - 1, spotify_session)
on start_next_track(spotify_session, track_counter)
tell application "Audio Hijack Pro"
stop recording spotify_session
set title tag of spotify_session to track_counter
start recording spotify_session
end tell
end start_next_track
on stop_recording(spotify_session)
tell application "Audio Hijack Pro"
stop recording spotify_session
end tell
end stop_recording
on temp_filename(track_counter)
return ("\"" & output_folder & "/" & track_counter & file_extension & "\"")
end temp_filename