Random-Music.sh (Nautilus Script)

Nautilus Scripts

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.7

Description:
For those who want a very simple method of randomly playing music, here is a nautilus script to make it extremely easy for everybody.

Requires mplayer and nautilus: sudo apt-get install mplayer nautilus

Directions:
- Put this script inside your ~/.gnome/nautilus-scripts folder
- Once inside your nautilus-scripts folder, it can be run one of two ways:
1. - right click any folder, select this script, and it will automatically randomly play any music file inside it
2. - if nothing is selected when running the script, it will default to this script's preset locations (just add the desired paths to your music in the script beforehand for quick access - add as many paths/menu choices as you would like)

Credit also goes to "nothingspecial" and "VH-BIL" for their part in the creation of this.
Last changelog:

1.0: Initial Release


Ratings & Comments

8 Comments

obscurant

I have a directory full of subdirectories that have radio shows in them. I'd like to right-click on the directory, and have random subdirectories chosen and their contents played in order of file name. Sort of like a random album, but the songs on the album are played sequentially. Could this be a possible addition to this script, or is it a ludicrous idea and a waste of time?

inameiname

Sorry it took so long getting back to you... Anyway, hmmmmmmm.... thinking about it, I can see your request as being a possibility; definitely not a waste of time. I just do not know off-hand exactly how to do that. Technically, the part of this script that lets you right click a directory and play what is inside it is a single line: mplayer -loop 0 -quiet -shuffle -playlist <(find -L $ARCHIVE_FULLPATH -type f | egrep -i '(\.mp3|\.wav|\.flac|\.ogg|\.m4a|\.aac|\.mpa|\.mid|\.aif|\.iff|\.m3u|\.ra)') I am sure with a small tweak here and there it could be made to work the way you want. I will look into it and will let you know if I can get anywhere, but it might take a posting in Ubuntu Forums or something and some help from people far more skilled at bash scripting than myself to figure it out. Regardless, it would be a good little idea if it could be done.

ubuntix07

Hi! I just discover this mini-tool and it's just great and simple! Thks for sharing!

inameiname

You're welcome. That's what I was trying for, nothing special; just something that works.

ubuntix07

But i don't see how it works with videos!

inameiname

It doesn't. Although, technically, just adding/removing file extensions at the end of it will make it work with videos. Just add 'avi', 'mp4', 'mkv', or whatever and viola, it'll play videos. And if you want it to play everything Mplayer can play, just remove all of the extensions at the end, and it'll randomly play anything and everything inside a particular folder.

ilnanny75

I like this :D Thanks for sharing!

inameiname

Sure. Enjoy.

Pling
0 Affiliates
Details
license
version 1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

More Nautilus Scripts from inameiname:

product
The Ultimate Nautilus/Nemo Scripts Pack
inameiname
last update date: 7 years ago

Score 6.8

product
Easy TV Watch/Convert Script
inameiname
last update date: 13 years ago

Score 5.0

product
Install all Google Fonts via Naut Script
inameiname
last update date: 13 years ago

Score 5.7

product
Easy Video Convert To DVD
inameiname
last update date: 14 years ago

Score 5.0

product
Easily Hide Files/Folders in Nautilus
inameiname
last update date: 14 years ago

Score 5.0

product
Easy Video Convert To AVI
inameiname
last update date: 14 years ago

Score 5.0

Other Nautilus Scripts:

product
Gflv2avi
acidc00l
last update date: 15 years ago

Score 5.0

product
My Movie Portal v3.2.8
iTechScripts
last update date: 13 years ago

Score 4.7

product
Browse Nautilus as root
SteveSims
last update date: 17 years ago

Score 5.0

product
Open Nautilus as Root
Mariux
last update date: 17 years ago

Score 5.0

product
Compare Strings
cdmn
last update date: 17 years ago

Score 5.0

product
grooto
pontos
last update date: 17 years ago

Score 5.0



System Tags