I decided to move my blog at blogger to this one.
Hello World!
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Changed My Blog Hosting
My new blog is located at http://rubenlaguna.com/wp
Javascript + iTunes
The other day I found out this post. Thanks to the examples javascript (or more accurately jscript) provided in the post I learned to write my own javascripts to manage muy iTunes library. Here’s the result a script to find out files under the “iTunes Music” folder that are not present in the iTunes library. It helpful we you mess up the library (I used the “Consolidate library” feauture and ended up with tons of duplicated files in the hard drive that didn’t show up the iTunes interface).
Here’s the script
It output it’s results to a “filesnotlinked.txt”. You can either delete those files if they are duplicates or add them to the library.
Tags: itunes javascript applescript
PHP Proxy and iTunes
It seems that the company I’m working on has blocked http://media.libsyn.com. They have categorized it as entertaiment/radio so I cannot access the podcasts from Java Posse at work. I’m sync my iPod with the ITunes at work so I cannot hear them anymore. Because I’m not happy with the situation I tried to overcome the blocking using my connection at home, so after googling a little bit I found PHP Proxy that allows to access other sites throught it. So I installed at home and now I point my iTunes to retrieve the javaposse feed through it.
But I didn’t work off the shelf. It’s designed to work with web pages only so I had to tweak it a little bit:
- Add ‘text/xml’ and ‘application/xml’ to list of Content-Type’s that PHP Proxy is able to understand
- Add the tag to the list of “rewritten” tags.
- Append the original file extension of the url to the rewritten links so iTunes can identify the the link as a playable podcast.
- Use Apache 2.0 mod_rewrite to rewrite requests to index.php.xxxx back to index.php
The weird thing is that iTunes wouldn’t recognize a link like this one
http://mydomain/unrestricted/phpproxy/index.php?q=aHR0cDovL3Z ...
as a playable episode even when the content-type of the link is “video/x-m4v” and the type attribute of the enclosure tag is also “video/x-m4v”. The actual error says "there are no playable episodes " .iTunes needs that the file extension in the url to be one of .mp3, .m4v, .mov or similar so I had to add code to add the right file extension next to the .php in the links and instruct the Apache web server to map al queries to index.php.xxx back to index.php. So the link in the enclosure tag look like
http://mydomain/unrestricted/phpproxy/index.php.m4v?q=aHR0cDovL3Z …
I tested it with the following podcast and it works like a charm
- diggnationvideo http://feeds.feedburner.com/diggnationvideo
- the java posse http://feeds.feedburner.com/javaposse
- ask a ninja http://feeds.feedburner.com/AskANinja
- security now! http://leo.am/podcasts/sn
The actual mod_rewrite commands that you need to add to httpd.conf are
1 2 |