
Random-Music.sh (Nautilus Script)
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
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.
9 years ago
1.0: Initial Release
9 years ago
1.0: Initial Release
obscurant
9 years ago
Could this be a possible addition to this script, or is it a ludicrous idea and a waste of time?
Report
inameiname
9 years ago
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.
Report
ubuntix07
9 years ago
I just discover this mini-tool and it's just great and simple!
Thks for sharing!
Report
inameiname
9 years ago
Report
ubuntix07
9 years ago
Report
inameiname
9 years ago
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.
Report
ilnanny75
9 years ago
Thanks for sharing!
Report
inameiname
9 years ago
Report