Home > Linux, Ubuntu > A nice little Nautilus plugin to enqueue audio files into Rhythmbox

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:

Screenshot of my Nautilus plugin.

Screenshot of my Nautilus plugin to enqueue an audio file into Rhythmbox.

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!

admin Linux, Ubuntu , , , ,

  1. May 24th, 2009 at 21:31 | #1

    Neat utility :). Here’s an idea - can it be made to enqueue it to the “default” GNOME audio player for the user?

  2. May 29th, 2009 at 23:26 | #2

    Cool I like it, and calling bash from a python script isn’t something to be ashamed of.

  3. admin
    May 29th, 2009 at 23:28 | #3

    @alvare,
    Actually I was too lazy to use dbus for this ;-) The real plugin should use dbus.

    ~seemanta

  4. Mitchauer
    June 1st, 2009 at 02:52 | #4

    I wish I new how to undo this idea, after trying it Amarok nolonger works at all.

  5. admin
    June 1st, 2009 at 14:10 | #5

    @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

  6. Drakko
    June 16th, 2009 at 12:43 | #6

    thx a lot, its really usefull

  7. christianhc
    June 26th, 2009 at 10:09 | #7

    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

  8. June 28th, 2009 at 00:03 | #8

    @Rhythmbox#,
    I am glad that you like it!

    ~seemanta

  9. Curtis
    July 24th, 2009 at 01:32 | #9

    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.

  10. Kristofer
    July 30th, 2009 at 09:15 | #10

    Great!!! I’ve been looking for this for ages! Only I would like to be able to enqueue entire folders as well…

  11. Kristofer
    August 13th, 2009 at 03:27 | #11

    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

  12. August 13th, 2009 at 12:17 | #12

    @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

  13. pradeep
    August 29th, 2009 at 12:34 | #13

    thanks.. this is a gr8 post.. I was looking for the same plugin

  14. August 31st, 2009 at 12:39 | #14

    @pradeep,
    Thanks! I am glad that you like it.

  15. Katsa
    October 2nd, 2009 at 12:47 | #15

    Thanks for this !!

  16. chapa
    December 1st, 2009 at 04:06 | #16

    great! just what i was looking for. Like Kristofer said, being able to queue an entire folder would be awesome

  17. guduru
    February 7th, 2010 at 21:46 | #17

    good one,
    do any one know the totem player plugin to enqueue songs

  18. Orbitize
    February 21st, 2010 at 18:13 | #18

    Thank you very much!

    I would also like the possibility to enqueue a folder, since thats the way my music library is organized.

  19. rubeng
    March 12th, 2010 at 10:42 | #19

    Great but i doesn’t work with multiple files or directories. Can some modification be done for this to work?

  20. April 25th, 2010 at 15:17 | #20

    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.

  21. May 16th, 2010 at 08:56 | #21

    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.

  1. March 17th, 2010 at 00:56 | #1
  2. April 25th, 2010 at 15:01 | #2