<?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>Guy Rutenberg &#187; Sansa Clip</title>
	<atom:link href="http://www.guyrutenberg.com/tag/sansa-clip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.guyrutenberg.com</link>
	<description>Keeping track of what I do</description>
	<lastBuildDate>Wed, 16 Jun 2010 19:53:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Amarok Generated Playlists (m3u) on Sansa Clip</title>
		<link>http://www.guyrutenberg.com/2009/07/11/using-amarok-generated-playlists-m3u-on-sansa-clip/</link>
		<comments>http://www.guyrutenberg.com/2009/07/11/using-amarok-generated-playlists-m3u-on-sansa-clip/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 18:23:39 +0000</pubDate>
		<dc:creator>Guy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Amarok]]></category>
		<category><![CDATA[Sansa Clip]]></category>

		<guid isPermaLink="false">http://www.guyrutenberg.com/?p=405</guid>
		<description><![CDATA[Few days ago, for the first time, I&#8217;ve created a playlist using Amarok for files on my Sansa Clip player. To my surprise (and disappointment) when I&#8217;ve unplugged my Sansa Clip and powered it, the playlist showed up empty, unlike playlists which originated in Windows. As I keep my music collection organized in Amarok, the [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago, for the first time, I&#8217;ve created a playlist using Amarok for files on my Sansa Clip player. To my surprise (and disappointment) when I&#8217;ve unplugged my Sansa Clip and powered it, the playlist showed up empty, unlike playlists which originated in Windows. As I keep my music collection organized in Amarok, the situation seemed to be very uncomfortable.</p>
<p>I&#8217;ve decided to compare one of the working playlist files and the &#8220;empty&#8221; Amarok generated playlist. Two things were noticeable:</p>
<ol>
<li>Amarok uses forward slashes, like in a Linux environment, and the working playlist used backward slashes.</li>
<li>The working playlist used relative paths without any prefix &#8211; directly beginning with the path. Amarok prefixed the relative paths with a dot-slash (./).</li>
</ol>
<p>After noticing those things I&#8217;ve modified my Amarok generated playlist to look like the Windows generated one, and voila, it worked. I tried going through Amarok&#8217;s configuration dialogs to find some option controlling the format of generated m3u playlists, but couldn&#8217;t find any (I&#8217;m using Amarok 1.4.10). So with my newly found wits I&#8217;ve looked for a way to make using the playlists easier. I&#8217;ve came up with the following one-liner:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">find</span> <span style="color: #660033;">-name</span> <span style="color: #ff0000;">&quot;*.m3u&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> -I<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">&quot;s/^\.\///;s/\//\\\\/g&quot;</span> <span style="color: #660033;">-i</span><span style="color: #ff0000;">''</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>The command should be run in the <code>MUSIC</code> directory of the Sansa Clip&#8217;s filesystem. It recursivey looks for m3u playlists and for each one strips any leading dot-slash and replaces forward slashes with backward ones. It can be used to easily convert all your playlists to the format understandable by Sansa Clip.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.guyrutenberg.com/2009/07/11/using-amarok-generated-playlists-m3u-on-sansa-clip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.359 seconds -->
