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:
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?
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.
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.
Ratings & Comments
8 Comments
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?
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.
Hi! I just discover this mini-tool and it's just great and simple! Thks for sharing!
You're welcome. That's what I was trying for, nothing special; just something that works.
But i don't see how it works with videos!
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.
I like this :D Thanks for sharing!
Sure. Enjoy.