Notices


Reply
Thread Tools
Posts: 102 | Thanked: 23 times | Joined on Apr 2010
#11
All my music is on my 16 Gb SD card and it plays fine from there on my N900.
Question, all my songs are in m4a format so does m3u support this format.. thanks. I do not want to use mp3 going forward as well.
 
Posts: 486 | Thanked: 251 times | Joined on Oct 2009
#12
Originally Posted by dave1010 View Post
I've created this script that makes a playlist for each folder in your music. This lets you play a folder at a time with the default media player.

Code:
cd ~/MyDocs/.sounds
for i in *; do
  echo Processing $i
  if [ -d "$i" ]; then
    find "$i/" -type f -iname "*.mp3" > "$i.m3u"
  fi
done
The following also addresses date ordering.

If the playlist is in the same directory as the audio files, no path information is needed in the playlist. This also makes it easy to move directories around on a device or between devices.

Code:
cd  $1
for i in *; do
  echo Processing $i
  if [ -d "$i" ]; then
    cd $i
     ls "*.mp3" "*.ogg" "*.wma" > "$i.m3u"
     cd ..
  fi
done
To sort by date:

Code:
cd  $1
for i in *; do
  echo Processing $i
  if [ -d "$i" ]; then
    cd $i
     ls -rt "*.mp3" "*.ogg" "*.wma" > "$i.m3u"
     cd ..
  fi
done
__________________
The Mini-USB plug is an improvement over both the Type B plug and the Micro-B plug.
 

The Following User Says Thank You to j.s For This Useful Post:
Posts: 36 | Thanked: 28 times | Joined on Jul 2010
#13
Originally Posted by leojab View Post
Question, all my songs are in m4a format so does m3u support this format.
M3U playlists should support any file - I think even videos. Just change the find line to:
Code:
find "$i/" -type f -iname "*.m4a" > "$i.m3u"
 
Posts: 36 | Thanked: 28 times | Joined on Jul 2010
#14
j.s, that's a great idea using ls instead of find. I keep most of my music in an Arist/Album/Track structure so it woudn't work so well some of the time. I'm experimenting with ls -R (recursive) but it's not getting the whole path.
 
kl2010's Avatar
Posts: 35 | Thanked: 2 times | Joined on Jul 2010 @ lagos, Nigeria
#15
Originally Posted by soeiro View Post
You must run it again when you make changes. However, you could also create a desktop shortcut to make it easier to start.
pls how do i make it as a desktop shortcut? thanks.
 
Posts: 36 | Thanked: 28 times | Joined on Jul 2010
#16
Originally Posted by kl2010 View Post
pls how do i make it as a desktop shortcut? thanks.
  1. Save the script at the top of this thread as a file as /home/user/make-playlists.sh
  2. Install Queen Beecon Widget
  3. Add the Queen Beecon widget to your desktop
  4. Configure it and add /home/user/make-playlists.sh as a customnew command
 

The Following User Says Thank You to dave1010 For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Aug 2010
#17
Hi.. M sure my question might sound lame! but m not aware of how one is supposed to use scripts!! Pls guide me on how i am supposed to install this script in my fone to be able to play my tracks by folders!! Thanks in advance!!
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:13.