<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iTunes &#8211; jaguchi log</title>
	<atom:link href="https://jaguchi.com/blog/tag/itunes/feed/" rel="self" type="application/rss+xml" />
	<link>https://jaguchi.com</link>
	<description>Speeding on training wheels</description>
	<lastBuildDate>Sat, 07 Sep 2024 17:46:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://jaguchi.com/wp-content/uploads/2017/02/cropped-low_res-32x32.png</url>
	<title>iTunes &#8211; jaguchi log</title>
	<link>https://jaguchi.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">149953163</site>	<item>
		<title>Add Spotify links on iTunes album/artist pages</title>
		<link>https://jaguchi.com/blog/2016/05/add-spotify-links-on-itunes-albumartist-pages/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sun, 01 May 2016 12:06:56 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Tampermonkey]]></category>
		<category><![CDATA[iTunes]]></category>
		<guid isPermaLink="false">https://jaguchi.com/en/?p=186</guid>

					<description><![CDATA[A userscript for Greasemonkey/Tampermonkey that adds Spotify links to iTunes album and artist pages.]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Is everyone sending you links from Apple Music? Here’s a userscript for Greasemonkey/Tampermonkey that adds Spotify links to iTunes album and artist pages.</p>



<span id="more-186"></span>



<h2 class="wp-block-heading">Download/Install</h2>



<ul class="wp-block-list">
<li><a href="https://jaguchi.com/uploads/SpotifyLinksOniTunes.user.js">SpotifyLinksOniTunes.user.js</a> (<a href="https://gist.github.com/mirka/775dee5c8a4a9fe203469a3d49d75876">Gist</a>)</li>
</ul>



<p class="wp-block-paragraph"><em>Tested in Chrome Tampermonkey and Firefox Greasemonkey. Currently broken in Safari Tampermonkey due to a combination of Apple adding CSP rules to their iTunes pages and <a href="https://github.com/Tampermonkey/tampermonkey/issues/296">Safari ignoring the CSP spec</a> <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></em></p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">Important changes in v4.0</h2>



<ul class="wp-block-list">
<li>Due to <a href="https://developer.spotify.com/news-stories/2017/01/27/removing-unauthenticated-calls-to-the-web-api/">recent changes</a> in the Spotify API authentication rules, search calls now require client credentials. Unfortunately, this means your searches must be sent through my server to make API calls on your behalf. If you have privacy concerns, you can use your own credentials and bypass my server (see &#8220;Options&#8221; section below).</li>



<li>The embedded Spotify player had to be removed due to <a href="https://en.wikipedia.org/wiki/Content_Security_Policy">Content Security Policy</a> restrictions that were added in the Apple Music redesign.</li>
</ul>



<h2 class="wp-block-heading">Options</h2>



<ul class="wp-block-list">
<li>If you want the Spotify link to open in the Web Player instead of the desktop app, look for the <code>open_in_app</code> variable at the top of the script and set it to <code>false</code>.</li>



<li>If you want to use your own credentials to communicate with the Spotify API directly, first <a href="https://developer.spotify.com/my-applications">register an application with Spotify</a>. Set up your Client ID and Secret in the &#8220;User preferences (advanced)&#8221; section at the top of the script.</li>
</ul>



<h2 class="wp-block-heading">Match accuracy</h2>



<ul class="wp-block-list">
<li>When multiple matches are found in the Spotify catalog, the first one will be used.</li>



<li>The script will try to work across different locales, but may fail to find a match when the album/artist name on the iTunes page is in an alternative language, like the Chinese <code>史密斯飞船合唱团</code> for <code>Aerosmith</code>. This is a limitation of the Spotify search API. Japanese queries seem to work most of the time, but not always.</li>



<li>The search API may have trouble finding a match due to minor naming discrepancies. If you suspect this is the case, you can always look for it manually on Spotify.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-dots"/>



<h2 class="wp-block-heading">Updates</h2>



<h3 class="wp-block-heading jg-small-heading">v4.0.3 — 2018/08/03</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0.2 — 2017/12/25</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0.1 — 2017/10/29</h3>



<ul class="wp-block-list">
<li>Minor fixes for design changes</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v4.0 — 2017/06/08</h3>



<ul class="wp-block-list">
<li>Fix for changes in Spotify API authentication rules</li>



<li>Fix for new Apple Music page design</li>



<li>Remove player embedding (now impossible due to Content Security Policy restrictions by Apple)</li>



<li>Make Spotify button a search link when no match found</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v3.0 — 2017/01/29</h3>



<ul class="wp-block-list">
<li>Vastly improve album matching (Will now handle the majority of naming inconsistencies, including live albums and deluxe editions. Also tries fuzzier search queries for better matching of classical music and soundtracks. Sorry for the occasional false positives.)</li>
</ul>



<h3 class="wp-block-heading jg-small-heading">v2.0 — 2016/11/04</h3>



<ul class="wp-block-list">
<li>Add option to embed Spotify player on album pages</li>
</ul>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">186</post-id>	</item>
		<item>
		<title>iTunes: 30-second skip podcasts/audiobooks only</title>
		<link>https://jaguchi.com/blog/2012/03/itunes-30-second-skip-podcasts-audiobooks-only/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Fri, 23 Mar 2012 15:34:35 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[iTunes]]></category>
		<guid isPermaLink="false">https://jaguchi.com/en/?p=149</guid>

					<description><![CDATA[Here’s a nice AppleScript I use to rewind or skip 30 seconds in iTunes, but only when the current track is a podcast or audiobook. This allows you to have a single keyboard shortcut that works as a normal “previous track” key when listening to music, but automatically switches to a 30-second rewind when listening [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Here’s a nice AppleScript I use to rewind or skip 30 seconds in iTunes, but only when the current track is a podcast or audiobook.</p>



<p class="wp-block-paragraph">This allows you to have a single keyboard shortcut that works as a normal “previous track” key when listening to music, but automatically switches to a 30-second rewind when listening to podcasts, audiobooks, or whatever else you specify.</p>



<span id="more-149"></span>



<pre class="wp-block-code"><code lang="applescript" class="language-applescript">property skip_secs : 30 -- use negative value to rewind, positive value to skip ahead
property genre_list : {"Podcast", "Books &amp; Spoken"}

tell application "iTunes"
	if (exists of current track) is false then
		return
	end if
	
	if genre of current track is in genre_list then
		set target_time to (player position + skip_secs)
		
		if (target_time > finish of current track) then
			next track
		else if (target_time &lt; 2) then
			back track
		else
			set player position to target_time
		end if
		
	else -- rewind/skip the whole track
		if (skip_secs &lt; 0) then
			back track
		else
			next track
		end if
	end if
end tell</code></pre>



<h2 class="wp-block-heading">Options</h2>



<p class="wp-block-paragraph">Change the <code>skip_secs</code> property to your preferred interval in seconds. For example, setting <code>skip_secs</code> to <code>30</code> will result in a 30-sec fast forward, while setting it to <code>-15</code> will make it a 15-sec rewind.</p>



<p class="wp-block-paragraph">If you would like more kinds of tracks to respond to this skip behavior, add the genre names of those tracks to <code>genre_list</code>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">149</post-id>	</item>
		<item>
		<title>iTunesを自動フェードイン／アウト</title>
		<link>https://jaguchi.com/blog/2011/04/itunes-fade-in-fade-out/</link>
		
		<dc:creator><![CDATA[mirka]]></dc:creator>
		<pubDate>Sat, 02 Apr 2011 01:22:00 +0000</pubDate>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[music]]></category>
		<guid isPermaLink="false">https://jaguchi.com/2011/04/itunes%e3%82%92%e8%87%aa%e5%8b%95%e3%83%95%e3%82%a7%e3%83%bc%e3%83%89%e3%82%a4%e3%83%b3%ef%bc%8f%e3%82%a2%e3%82%a6%e3%83%88</guid>

					<description><![CDATA[iTunes を play/pause すると同時に音量をフェードイン／フェードアウトする AppleScript。 AirPlay 時代のエチケット。ステレオコンポのときから、ボリュームつまみをゆっくり絞ったあとに停止ボタンを押してたタイプの人用。 使い方 Spark や Quicksilver のようなツールにスクリプトを登録しておいて、ホットキーで呼び出す。たとえば F8 に設定しておくと、 F8 がフェード付きの iTunes 再生／停止キーになる。]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">iTunes を play/pause すると同時に音量をフェードイン／フェードアウトする AppleScript。</p>



<span id="more-13"></span>



<pre class="wp-block-code"><code lang="applescript" class="language-applescript">property resolution : 10 (* Increase for smoother fades. Default: 10 *)
property delayIncr : 0.2 (* Decrease for faster fades. Default: 0.2 *)

tell application "iTunes"
	set originalVol to sound volume
	set volIncr to originalVol div resolution
	
	if player state is not playing then
		set sound volume to 0
		play
		
		-- Fade in
		repeat while (sound volume ≤ (originalVol - volIncr))
			set sound volume to (sound volume + volIncr)
			delay delayIncr
		end repeat
		
	else
		-- Fade out
		repeat while (sound volume > 0)
			set sound volume to (sound volume - volIncr)
			delay delayIncr
		end repeat
		
		pause
		
	end if
	
	set sound volume to originalVol
	
end tell</code></pre>



<p class="wp-block-paragraph">AirPlay 時代のエチケット。ステレオコンポのときから、ボリュームつまみをゆっくり絞ったあとに停止ボタンを押してたタイプの人用。</p>



<h2 class="wp-block-heading">使い方</h2>



<p class="wp-block-paragraph"><a href="http://www.shadowlab.org/Software/spark.php">Spark</a> や <a href="http://qsapp.com/">Quicksilver</a> のようなツールにスクリプトを登録しておいて、ホットキーで呼び出す。たとえば F8 に設定しておくと、 F8 がフェード付きの iTunes 再生／停止キーになる。</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: jaguchi.com @ 2026-12-02 02:29:43 by W3 Total Cache
-->