Synching Rhythmbox “Now Playing” with the Web [Linux FTW]

A couple weeks ago, my wife introduced me to Blip.fm — that’s a whole blog post in itself, as I’ve got mixed feelings about it.

rhythmboxNevertheless, it made me curious about ways I could integrate blip.fm or something similar into my awesometop. I currently use Rhythmbox Music Player to play all of my music; It’s kind of like iTunes — in fact the only noticeable difference I’ve found is that when you import a CD you can’t select specific songs: it’s just all or nothing.

One thing that it does have that I don’t think iTunes has is the ability to load plugins (and write your own!!!).  A plugin that caught my eye was the “Rhythm for Web” plugin, which takes the currently playing song data and sends it off to a URL of your choosing. The destination URL can be a widget, a website, an API call, whatever. The author’s website provides sample code to use, but I wanted to do it a little differently than he did. I also made some slight modifications to the plugin itself, in order to make it more clean.

To install the plugin, unzip the tar.gz file to ~/.gnome2/rhythmbox/plugins/RhythmToWeb/. Then load Rhythmbox, click on “Edit”->”Plugins” and locate “RhythmToWeb” in the list. Click on “Configure”.

For “URL” type in the URL of where you will have your handler script. For “Secret” type in any password or string of characters you want to use  (1two3four5six would work, for example, or perhaps your birthdate and name — try to not use spaces of #’s.). Make sure you jot it down for a moment, because you’ll need to use it in the server script below. (Leave “interval” at 2… I’ve never had reason to change that.)

Felix, the original author, liked my “multiple song” tracking and has updated his code to use it.  Nice work!

My PHP server-side code is below.

Continue reading

The Ten-Year Growth

In a week and a half, I am graduating.

I started my undergrad, back in Pennsylvania, when I was 18 and I am now 28.  I am what admissions refers to as a “non-traditional student.”

I’ve been to five institutions, across three states, changed majors six times, and this will be my second and third college degrees: first was an A.S. in Accounting, the second and third are A.S. in Chemistry and B.A. in Natural Science & Math.

This is really exciting for me, as I’m sure you can imagine.  Not only because it’s my undergrad, or because it’s been ten years in the making, or even just because commencement will probably be really exciting — it’s just the whole idea of finishing something. Continue reading

In which I go sleuthing… (pt. 3)

(When we last left, our hero, he was making some headway in the search for the missing Phone / MP3 Player. Faced with a hiccup in progress, he had a sudden epiphany…)

Back to Verizon Wireless’s website.

View current usage.

Bingo! Two more pages of calls made, some to Louisville, one to Atlanta, and one to New Hampshire (Kemco Industries, an 800 number). And even better: a slew of fresh Richmond numbers.

As I plugged those new numbers into the Reverse Lookup tool, I finally got a few successes. One of them had the same last name as the first name I found; but a couple other seemed entirely unrelated. Most of them were labeled as residents that were 50+ years old.

The phone rang again, it was the woman from the Palladium-Item again. She mentioned a name and asked if it was familiar. I told her that whomever stole the phone did so anonymously, and that I doubted I knew the person myself. I started reading off a few of the new names I uncovered from the Reverse Lookup tool. Two of the names she definitely recognized, and said she thought she knew who it was. Continue reading

In which I go sleuthing… (pt. 2)

(in part 1, our hero has lost his fancy communications / music-playing device. With no end in sight, will it ever be found?)

Second day back at work since “vacation”. Typical day. Meetings, notes, quiche.

*Jarring Chord* An email. From Verizon Wireless. “blah blah blah monthly bill blah blah blah $101.xx, blah blah blah pay online blah bla–” wait.. $101.xx?

Normally, our cell phone bill is about $84. Considering we have two lines and two phones, that’s really not that bad. We share a bed, a house, and handsoap; Why not share minutes? But $101? Something is fishy in the state of Denmark.

Continue reading

In which I go sleuthing… (pt. 1)

So last week we took a “vacation” to see my family. I’ll post more about that (along with videos) later. Right now, there is treachery afoot!

We were about 72 miles into Ohio, almost to Columbus. Mel said she was going to try to take a nap, I thought “Great, I’ll listen to some music on my Cellphone / MP3 player”. I groped around my pocket where I normally keep it; surprisingly there was nothing there.

Check the other side; Still nothing.

Uh-oh. Continue reading