Nautilus is one versatile file manager. The ability to add actions (with the help of Nautilus Actions) makes Nautils’ ability seemingly endless. I have covered adding actions to Nautilus before (see my article “Add actions to extend Nautilus functionality“). That article covered an earlier version of Nautilus Actions. Now that this tool has matured quite a bit, I thought it wise to revisit the topic and show you yet another way you can take advantage of this ability to make Nautilus do more to manage your files.
In this instance I am going to show you how to use the Nautilus Actions tool to directly add music to your Rhythmbox Play Queue. Although the action will not initiate the playing of the music, it’s a very easy way to fill up your play queue.
A few notes
First and foremost, in order for this to work (outside of making sure you have everything installed) the music you will add from Nautilus must already be in your Rhythmbox library. This action takes advantage of the Rhythmbox command line tool rhythmbox-client which can not actually add music to the library. We can, however, create an action that will both enqueue the music AND begin playing the music. That is exactly what we are going to do.
A piece to install
In case you don’t already have Nautilus Actions installed, you will need to do so. This is very simple to do if you follow these steps:
Once the installation is complete, you can then close the Add/Remove Software Tool and get ready to work.
Creating the action
The first step is to start up the Nautilus Actions Configuration Tool. To do this click System > Preferences > Nautilus Actions Which will open up the tool in question. When you first open up this tool it will be empty of actions. To create an action click File > New Action. This will open the New Action tabs (see Figure 1) where you will begin to create what you need.
Now, let’s take a look at what you need to configure in order to enable an action to both add to and play from your Rhythmbox play list. We’ll look at this tab by tab.
Under the action tab, you need to do the following:
Under the Command section of the command tab, you need to do the following:
/usr/bin/rhythmbox-clientin the Path section.
--enqueue %M --playin the Parameters section.
Under the Conditions tab, you need to do the following:
*.mp3; *.flacc; *.acc; *.oggin the Filenames section. NOTE: You can add as many file types as you need here.
audio/*in the Mimetypes section.
That’s it. Now you have to save the action by clicking the Save button (or clicking File > Save). The final step is to restart nautilus with the command
nautilus -q. After you restart Nautilus open up Nautilus to your ~/Music folder (or where ever you house your collection) and notice the new icons (see Figure 2) in the upper right corner of the Nautilus window. In my sample I have created two actions: One that only adds music and the other that adds and then plays music. Select the folder you want to add and then press the icon for your action and the music will be added to the queue and Rhytmbox will start playing.
It’s amazing how flexible Nautilus is. Even just a file manager can be so much more than that in the world of Linux. And what’s best…you can create so many different actions with Nautilus to perfectly suit your needs.
Continua a leggere – Original Link: Queue music into Rhythmbox from Nautilus