Hello. I am hoping to have an automated way to create Playlist files from Genre txt files I'll be making with my music collection. This is for use with my WD Live player, and is so that certain albums / artists can live in multiple genre directories when I browse to them from my WD Live player.
Here's an example of my directory structure:
The goal is to take each directory with a .Genre.txt file (not all directories have this), add that root Folder to the appropriate playlist.m3u file/s based on genre/s in .Genre.txt using relative paths in the Playlist file. Then take each of those m3u files and alphabetize the contents of the m3u file based on the Folder Name that the Genre.txt file lives in. Here's what I mean:
Genre.txt contents:
Kaki King - 2003 - Everybody Loves You -> .Genre.txt
Acoustic Guitar
Rock
Beck - 2008 - Modern Guilt -> .Genre.txt
Alternative
Rock
Maroon 5 - 2010 - Hands All Over -> .Genre.txt
Alternative
Rock
The m3u files should look like this:
/mnt/user/Music/_Playlists/Acoustic Guitar.m3u/mnt/user/Music/_Playlists/Alternative.m3u/mnt/user/Music/_Playlists/Rock.m3u
I'm fine with the m3u files being completely deleted and recreated each time this script runs, as I expect that will be the easiest solution.
Is this easily possible using Bash? I know there are some GUI solutions to what I'm looking to do, but if I'm able to get a solution using the .Genre.txt files, it would be so much more elegant.
---------- Post updated at 06:04 PM ---------- Previous update was at 03:49 PM ----------
Alright, here's what I have so far.
This will create all of the m3u files I need. The next step will be alphabetizing the m3u files based on the Folder name.
Currently one of my m3u files looks like this: /mnt/user/Music/_Playlists/Rock.m3u
However I want it to look like this: /mnt/user/Music/_Playlists/Rock.m3u
I know the Sort command is likely what I need, but I'm not certain how to sort only based on the folder name. Any help would be greatly appreciated.
put the original folder together with the dir name together and sort base on the 2nd field.
Thanks! I think this is almost what I need. I'm a little confused about what "while read d" does (I'm very much a bash noob who uses Google extensively to program). I'm hoping to add some lines to my code which will look for any m3u files in my $PlaylistDIR (the ones that my script just created - currently set to /mnt/user/Music/_Playlists/), and sort them all one by one using your code.
How would your code need to be altered for that to work?
Hi.
I'm working on showing the video player to new users with under 5 posts which shows only videos like the ones below, which are related to the forums, how to use the forums, code tags, usercp, etc.:
https://www.unix.com/members/1-albums215-picture1265.png
or maybe something minimal and... (5 Replies)
Hi.
Please help with a single line bash that will match field 3, and field 2 , if not then echo "Not Found".
Original Music List name; Musiclists.m3u
Format:
\Music\The Rolling Stones - Angel.mp3
\Music\Maroon 5\Moves Like Jagger.mp3
Make a groomed playlist variable...
$... (0 Replies)
Hi, I hope I am posting in the right place.
I use to stream to justin tv using ffmpeg with that command
ffmpeg -re -i "path/to/input.avi" -vcodec libx264 -preset fast -crf 30 -acodec libfaac -ab 128k -ar 44100 -f flv rtmp://live.justin.tv/app/xxxxxxxxxxx
I would like to know if a bash... (2 Replies)
Hi guys i have written a script which takes the options given to him and execute itself accordingly.
for example
if a script name is doctortux then executing doctortux without option should made doctortux to be executed in automatic mode i.e. doctortux -a
or if a doctortux is needed to run in... (4 Replies)