A nice little Nautilus plugin to enqueue audio files into Rhythmbox
Nautilus is the default file manager in Gnome for Linux. And Rhythmbox is the official Gnome music player. Rhythmbox supports many advanced features like Internet Radio, Library management, support for Apple iPod, DAAP shares and MTP to name a few.
So the other day, I had an idea to find a way to directly enqueue an audio file into the rhythmbox play queue. If you have used Winamp over windows, it is akin to the ‘Enqueue in Winamp’ option that windows explorer provides for audio files if you have installed Winamp in your machine and right clicked over any audio file.
So first I searched if such a Nautilus plugin was really already available. To my happiness I found one plugin, written in python for a similar use but for enqueueing into the playlist of the Audacious, another music player on Linux. So, I downloaded it, and after a few minutes of hacking, it was ready for rhythmbox. So I can’t take entire credit for creating this plugin ;-).
The only trouble I had was to find out which option to use with rhythmbox from the command line to import the audio file into the library AND enqueue it into tha play queue. The man page did not mention anything. Then I downloaded the entire rhythmbox source code and finally from the code was able to know how to achieve what I wanted.
So here it is. Click here to download the plugin, add-to-rhythmbox.py. Installing this plugin is really easy. Just follow the following steps:
1. First, install python-nautilus package which gives the python bindings for Nautilus:
sudo apt-get install python-nautilus
2. Create a folder called ‘python-extensions’ within .nautilus within your home folder. i.e if your home folder is /home/foobar then create /home/foobar/.nautilus/python-extensions.
3. Copy the downloaded script, `add-to-rhythmbox.py` into this python-extensions folder.
4. Restart nautilus with the command:
killall nautilus
That’s it. Now you can right click over any audio file and see the new option to enqueue that file into the rhythmbox play queue. Here is a screenshot of how it looks like:
Hope this plugin would prove useful to all you Linux/Gnome users. Ideally I should have written this using dbus but was too lazy to do so. Maybe next time I would do that and post version 0.2.
Until my next post, g’bye and take care!

Neat utility :). Here’s an idea - can it be made to enqueue it to the “default” GNOME audio player for the user?
Cool I like it, and calling bash from a python script isn’t something to be ashamed of.
@alvare,
The real plugin should use dbus.
Actually I was too lazy to use dbus for this
~seemanta
I wish I new how to undo this idea, after trying it Amarok nolonger works at all.
@Mitchauer,
What do you mean Amarok no longer works? This plugin is meant only for Rhythmbox so I am not sure how your Amarok is affected.
But in any case, if you want to remove the plugin then simply delete the add-to-rhythmbox.py file from ~/.nautilus/python-extensions folder and restart Nautilus by the command:
killall nautilus
~seemanta
thx a lot, its really usefull
hey! thnks a lot, works perfectly. i’d upload my spanish version but it’s simpler to just edit some messages lines…
Para todos los hispanohablantes: abran el archivo con gedit, busquen las apariciones de mensajes como “Add audio file…” y reemplacenlas por los mensajes que deseen
@Rhythmbox#,
I am glad that you like it!
~seemanta
THANK YOU VERY MUCH FOR THIS!!! I am a migrant from Windows and this missing feature really irritated me. I hope someday the great folks behind the scenes will incorporate this into their software.
Great!!! I’ve been looking for this for ages! Only I would like to be able to enqueue entire folders as well…
Does anyone have any ideas how to improve any of these bugs/limitations:
- Cannot queue files that have special characters (at least ‘)
- Cannot queue entire folders
@Kristofer,
Thanks for your feedback. I will definitely implement the features you requested. However, right now I am a little busy with some personal stuff. Once that is over, I will take this up.
And thanks for using my little plugin and suggesting improvements!
regards,
Seemanta
thanks.. this is a gr8 post.. I was looking for the same plugin
@pradeep,
Thanks! I am glad that you like it.
Thanks for this !!
great! just what i was looking for. Like Kristofer said, being able to queue an entire folder would be awesome
good one,
do any one know the totem player plugin to enqueue songs
Thank you very much!
I would also like the possibility to enqueue a folder, since thats the way my music library is organized.
Great but i doesn’t work with multiple files or directories. Can some modification be done for this to work?
Thanks for your feedback. I now have created a better and enhanced version of this plugin. The complete post is at: http://seemanta.net/myblog/?p=634 which also has the download link for the updated and enhanced script.
I’d like to know how to send files to the rhythmbox play queue from within gPodder. Could we add this “Send to” to the menu system like the MPlayer enqueue option that was/is available? I tried “rhythmbox –enqueue” but that didn’t do it.