from workspace root...
svn propdel svn:mergeinfo -R
svn revert .
# if you have merges that happened at a lower level then issue a revert on them as well
svn ci -m "Removed mergeinfo"
Recently I found that I could not use the playlists I had created on playlist.com in my media player. The quick and short of this is that they are not providing a standardized XSPF format in their RSS feed.
All I really had to do was determine how to decrypt their hash which was pretty easy thanks to OneWeirdKid90, rename a few fields, and export a correctly formatted XSPF file. Below is the resultant code. I am using the script to access all the playlists on this site via playlist.com.
function hexToChars($hex) {
$a = array();
$b = (substr($hex, 0, 2) == "0x") ? 2 : 0;
while ($b < strlen($hex)) {
array_push($a, intval(substr($hex, $b, 2), 16));
$b += 2;
}
return $a;
}
function charsToStr($chars) {
$a = "";
$b = 0;
while ($b < count($chars)) {
$a .= chr($chars[$b]);
++$b;
}
return $a;
}
function strToChars($str) {
$a = array();
$b = 0;
while ($b < strlen($str)) {
array_push($a, ord($str[$b]));
++$b;
}
return $a;
}
function calculate($plaintxt, $psw) {
$sbox = array();
$mykey = array();
$a = 0;
$b;
$c = count($psw);
$d = 0;
while ($d <= 255) {
$mykey[$d] = $psw[$d % $c];
$sbox[$d] = $d;
++$d;
}
$d = 0;
while ($d <= 255) {
$a = ($a + $sbox[$d] + $mykey[$d]) % 256;
$b = $sbox[$d];
$sbox[$d] = $sbox[$a];
$sbox[$a] = $b;
++$d;
}
$a = 0;
$b = 0;
$c = array();
$d;
$e;
$f;
$g = 0;
while ($g < count($plaintxt)) {
$a = ($a + 1) % 256;
$b = ($b + $sbox[$a]) % 256;
$e = $sbox[$a];
$sbox[$a] = $sbox[$b];
$sbox[$b] = $e;
$h = ($sbox[$a] + $sbox[$b]) % 256;
$d = $sbox[$h];
$f = $plaintxt[$g] ^ $d;
array_push($c, $f);
++$g;
}
return $c;
}
function decrypt($src, $key) {
return charsToStr(calculate(hexToChars($src), strToChars($key)));
}
$hashKey = "sdf883jsdf22";
$playlist = $_GET["playlist"];
if (!$playlist) {
exit;
}
$url = "http://pl.playlist.com/pl.php?playlist=".$playlist;
$dom = new DOMDocument("1.0", "UTF-8");
$dom->formatOutput = true;
$playlist = $dom->createElement("playlist");
$playlist->setAttribute("version", "0");
$playlist->setAttribute("xmlns", "http://xspf.org/ns/0/");
$dom->appendChild($playlist);
$metaCacheControl = $dom->createElement("meta");
$metaCacheControl->setAttribute("http-equiv", "Cache-Control");
$metaCacheControl->setAttribute("content", "no-cache");
$playlist->appendChild($metaCacheControl);
$metaPragma = $dom->createElement("meta");
$metaPragma->setAttribute("http-equiv", "Pragma");
$metaPragma->setAttribute("content", "no-cache");
$playlist->appendChild($metaPragma);
$info = $dom->createElement("info", $url);
$playlist->appendChild($info);
$contents = file_get_contents($url, "r");
if (!empty($contents)) {
$xml = new SimpleXMLElement($contents);
if (!empty($xml)) {
$title = $dom->createElement("title", $xml->title);
$playlist->appendChild($title);
$trackList = $dom->createElement("trackList");
$playlist->appendChild($trackList);
if ($xml->trackList && (count($xml->trackList) > 0)) {
foreach ($xml->trackList->track as $item) {
$track = $dom->createElement("track");
$trackList->appendChild($track);
$location = $dom->createElement("location");
$usableLocation = empty($item->location) ? $item->originallocation : decrypt($item->location, $hashKey);
$location->appendChild($dom->createTextNode($usableLocation));
$track->appendChild($location);
$title = $dom->createElement("title");
$title->appendChild($dom->createTextNode($item->tracktitle));
$track->appendChild($title);
$creator = $dom->createElement("creator");
$creator->appendChild($dom->createTextNode($item->artist));
$track->appendChild($creator);
/*
$duration = $dom->createElement("duration");
$creator->appendChild($dom->createTextNode($item->duration));
$track->appendChild($duration);
*/
/*
$album = $dom->createElement("album");
$creator->appendChild($dom->createTextNode($item->album));
$track->appendChild($album);
*/
/*
$image = $dom->createElement("image");
$creator->appendChild($dom->createTextNode($item->image));
$track->appendChild($image);
*/
}
}
}
}
header("Content-Type: application/xspf+xml");
echo $dom->saveXML();
An example of the finished product is being used on this site
This is my 5th installment to the Yahoo Media Player.
You can find other extensions here.
TrackResume.
TrackSeek.
TrackShuffle.
TrackLoop.
This forces the currently playing track to be highlighted and scrolled to in the playlist
Step 1) grab these files and drop them on your host
Both of these files need to be included after the Yahoo Media Player. The file ‘ef.ymp.utilities.js’ is needed for manipulating cookies, setting styles, and using MD5 hashes to store UIDs for the tracks.
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.utilities.js" type="text/javascript"></script>
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.trackFocus.js" type="text/javascript"></script>
2009-01-07
Scrolling is now animated.
An example of the finished product is being used on this site
This is my 4th installment to the Yahoo Media Player.
You can find other extensions here.
TrackResume.
TrackSeek.
TrackShuffle.
TrackFocus.
This allows the playlist to repeat after the last song.
Step 1) grab these files and drop them on your host
Both of these files need to be included after the Yahoo Media Player. The file ‘ef.ymp.utilities.js’ is needed for manipulating cookies, setting styles, and using MD5 hashes to store UIDs for the tracks.
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.utilities.js" type="text/javascript"></script>
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.trackLoop.js" type="text/javascript"></script>
You will also need the following image if you are hosting the files. Otherwise the image is included from the cloud.

An example of the finished product is being used on this site
This is my 3rd installment to the Yahoo Media Player.
You can find other extensions here.
TrackResume.
TrackSeek.
TrackLoop.
TrackFocus.
This provides random shuffling of songs in your playlist. It could allow a song to play again after 20 other different songs have played.
Step 1) grab these files and drop them on your host
Both of these files need to be included after the Yahoo Media Player. The file ‘ef.ymp.utilities.js’ is needed for manipulating cookies, setting styles, and using MD5 hashes to store UIDs for the tracks.
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.utilities.js" type="text/javascript"></script>
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.trackShuffle.js" type="text/javascript"></script>
You will also need the following image if you are hosting locally. Otherwise the image is included from the cloud.

An example of the finished product is being used on this site
This is my 2nd installment to the Yahoo Media Player.
You can find other extensions here.
TrackResume.
TrackShuffle.
TrackLoop.
TrackFocus.
After posting to a few forums I realized people were also looking for a way to control the seek position in the player. So here it is.
Step 1) grab these files and drop them on your host
Both of these files need to be included after the Yahoo Media Player. The file ‘ef.ymp.utilities.js’ is needed for manipulating cookies, setting styles, and using MD5 hashes to store UIDs for the tracks.
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.utilities.js" type="text/javascript"</script>
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.trackSeek.js" type="text/javascript"></script>
2009-01-06
Moved the slider into the main meta panel. Thanks to Stephen Garcia for a little insight into the future state.
Also changed the default color of the slider to a muted grey which matches the playlist and added a highlight color which matches the other greens.
An example of the finished product is being used on this site
This is my 1st installment to the Yahoo Media Player.
You can find other extensions here.
TrackSeek.
TrackShuffle.
TrackLoop.
TrackFocus.
I use a media player on my site for listening to my music wherever I am. For the longest time I was using the flash based version from Lacy Morrow. At some point I wanted to have more than one playlist and so the search began for an alternative that had basically the same features. It needed the following criteria to be met in order for me to use it.
- small UI footprint
- xspf playlist support
- autostart
- autoresume
My search turned up only disappointment. Then someone at work suggested I give Yahoo's MediaPlayer a try. They suggested EasyListener, but as I searched for this I found a gem; (Y)ahoo (M)edia (P)layer. YMP had everything I wanted excpet that it did not support resuming tracks from page to page. This was a crucial feature I had become dependent on over the years from using Lacy's jukebox.
I read the threads and found that the team was working on this feature, but had no ETA on a good solution. And then... came... trackResume.
This is a little script I wrote that provides track seek recording and resuming. There is obviously a gap in the music when a page reloads, but this is as close as you're going to get without having something running in the browser itself or a frame.
OK, so let's get to it.
Step 1) grab these files and drop them on your host
Both of these files need to be included after the Yahoo Media Player. The file ‘ef.ymp.utilities.js’ is needed for manipulating cookies, setting styles, and using MD5 hashes to store UIDs for the tracks.
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.utilities.js" type="text/javascript"></script>
<script src="http://github.com/oxchronxo/YMP/raw/master/ef.ymp.trackResume.js" type="text/javascript"></script>
2008-12-21
Corrected problem where pressing pause then play would cause the song to start from the beginning.
2009-01-06
Volume now remains at the last point you adjusted it when resuming tracks.
An example of the finished product is being used above in the header
I recently started using flickr instead of my old Gallery2 setup. Obviously flickr is the way to go since it scales nicely and has great API support.
So now I have a great repository and management for my photos but I couldn't find what I was looking for in the way of a slideshow. I needed one that allows me to scroll images from an RSS feed. Most of the plugins out there were setup to use flash and didn't actually scroll, they simply displayed one image at a time. This was not good enough for me. I wanted the old school, stack up all the images and scroll them across the screen. And I absolutely did not want flash/swf to be a player in this in any way(I hate flash).
In theory this class can be modified to handle any RSS feed including markup and not just json responses. But that's for another day.
So over the weekend I whipped together my own slideshow. It's in the early stages but I am putting the code here for anyone who wants to use it as-is. I will refine it as I use it and possibly turn it into a WP plugin at some point. Right now it is designed to run in a WordPress environment but can absolutely run standalone as long as you include jQuery before the following steps.
enough already, let's go...
** REQUIRED **
You need jQuery included for this to work. Make sure you have a jQuery version greater than 1.2.6. If you are using a WordPress setup >2.5 you don't have to do anything.
Now you need to add some code to your page. This can be done anywhere(post, page, file) I added this to my header file so it is static across all my pages.
Step 1) Add the slideshow script
You will need to either download the slideshow.js and then upload it to your host or copy the code at the bottom and paste it inline in your code. Don't link to this file(slideshow.js) as it WILL be renamed, versioned, and eventually cached somewhere other than my host which means if you use it your slideshow will eventually break.
<script src="http://github.com/oxchronxo/Slideshow/raw/master/ef.slideshow.js" type="text/javascript"></script>
Replace the url above pointing to the slideshow library ...
http://github.com/oxchronxo/Slideshow/raw/master/ef.slideshow.js
... with the location of your file. Or skip this in the case where you use the code inline.
Step 2) Add the appropriate markup
<div id="slideshow">
<div id="slideshow-container">
<div id="slideshow-clipper"></div>
</div>
</div>
Step 3) Initialize the slideshow
You need to init the slideshow and pass it a few parameters.
<script type="text/javascript">
var slideshow = new slideshow({
// baseId {String} refers to the id assigned to the outer div above
baseId: 'slideshow',
// feed {String} represents the flickr RSS feed you will pull from
feed: 'http://api.flickr.com/services/feeds/photoset.gne?set=72157610669512045&nsid=82537533@N00&lang=en-us&format=json'
});
</script>
Replace the url above for the RSS feed...
http://api.flickr.com/services/feeds/photoset.gne?set=72157610669512045&nsid=82537533@N00&lang=en-us&format=json
... with the your feed url. The 'set' var refers to the flickr set your pictures are in. I create a set specifically for my slideshow. And the 'nsid' var is your flickr ID(not your username). Get your id by going here.
Get your flickr NSID at idGetter
View the above feed
Step 4) (optional) Customize the style
This is not required but you probably want to customize the styles for this object.
#slideshow {
/* defaults to 'relative', but set to absolute if you want to move it around */
position: relative;
/* defaults to 'auto' but change to suite your needs */
width: auto;
/* defaults to '0px' but set to a positive number to move it, down, on your page */
top: 0px;
/* defaults to '0px' but set to a positive number to move it, to the right, on your page */
left: 0px;
}
ok, all done...