android
  #1  
Old 01-09-2007, 09:44 PM
HankB HankB is offline
Junior Member
 
Join Date: Jan 2007
Posts: 98
Default Playlists for Linux users?

Hi all,
I can't seem to be able to create a playlist that works. I've found an awk and perl script that purport to do this, but no joy. I wrote a little C program that converts an m3u playlist to one identical with the Go list on the Sansa and it does not work. (That's byte for byte identical - same MD5 hash.) It just doesn't show up in the list.

I'd like to find a solution for this and a bit more than just a program with no usage hints.

If I get my program working, I'd be glad to share it, but that seems kind of pointless at the moment.

The version of S/W on my e280 is 01.02.07A. I think that 01.02.15A is current. Will a newer version make a difference with this?

thanks,
hank
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 01-09-2007, 11:19 PM
zivan56 zivan56 is offline
Member
 
Join Date: May 2006
Location: Vancouver, BC
Posts: 461
Default

There is nothing special about the playlist files, they are simple UTF text which do not use any sort of hashing whatsoever. You sure that you put them in the playlists folder? You can try the program in my sig if you want to mess around setting up mono/libgdi with a GUI.
__________________
Sandisk Sansa e200 v1 w/Rockbox
Microsoft Zune 30 GB v2.3 Firmware
Reply With Quote

  #3  
Old 01-10-2007, 05:05 AM
HankB HankB is offline
Junior Member
 
Join Date: Jan 2007
Posts: 98
Default

Thanks, I'll take a look at that. I suppose the thing to do would be to install the windows S/W on my wife's PC and use it to add playlists.

The hash reference was to a tool used to calculate the MD5 checksum on a file. I used that to confirm that the files were identical:
hbarta@baobab:/media/Sansa e280/PLAYLISTS$ md5sum *
2b092cb326d86059b119d3bf01bb8dee Go List.plp
2b092cb326d86059b119d3bf01bb8dee trype.plp


thanks,
hank
Reply With Quote

  #4  
Old 01-10-2007, 05:34 PM
gensec's Avatar
gensec gensec is offline
Member
 
Join Date: Oct 2006
Posts: 128
Default

Quote:
Originally Posted by HankB View Post
The hash reference was to a tool used to calculate the MD5 checksum on a file. I used that to confirm that the files were identical:
hbarta@baobab:/media/Sansa e280/PLAYLISTS$ md5sum *
2b092cb326d86059b119d3bf01bb8dee Go List.plp
2b092cb326d86059b119d3bf01bb8dee trype.plp
Could it be that just changing the name trype.plp to trype.pla would make the playlist run in the Sansa? That's the file extension my imported playlists have on my Sansa, so maybe it ignores any playlist files without that extension aside from its own Go List.

Sounds too easy to be true, but also easy enough to try.
Reply With Quote

  #5  
Old 01-10-2007, 06:00 PM
HankB HankB is offline
Junior Member
 
Join Date: Jan 2007
Posts: 98
Smile

Quote:
Originally Posted by gensec View Post
Could it be that just changing the name trype.plp to trype.pla ...

Sounds too easy to be true, but also easy enough to try.
Never underestimate the power of a simple solution.

Yes, that was it.

That's a big help. I usually keep my music organized by albums in directories. W/out this I could see no way to choose an album and have the player go to the next when it finished the first. Now I can just put all of the albums (or mixes of albums) in a playlist and start playing anywhere in the list.

Thanks!

Now I have to clean up some bugs in my C program...

thanks,
hank
Reply With Quote

  #6  
Old 01-13-2007, 09:02 PM
HankB HankB is offline
Junior Member
 
Join Date: Jan 2007
Posts: 98
Default

OK... Here's the program: http://hbarta.googlepages.com/m3u2pla.c

I use Ubuntu Linux and compile it by typing:
Code:
gcc -o m3u2pla m3u2pla.c
and put the executable somehwere in my path. (I add ~/bin/ to my path and put it there.) (Apologies if this is too elementary. I'd rather bore you than leave things out.)

When I plug in my Sansa it mounts at "/media/Sansa e280". I copy the directory for my podcasts to .../MUSIC/podcast/

Next I use 'fapg' to generate an M3U format list. (You could probably use anything that creates this format list, but make sure the files are listed from the base of the Sansa mount point.)

Commands I execute are:
Code:
hbarta@baobab:~$ cd /media/Sansa\ e280/
hbarta@baobab:/media/Sansa e280$ ls MUSIC/podcast/2007-01-13/
04-123-well-rounded-life_Sat.mp3                      npr_6847548.mp3
20070112_drugs28.mp3                                  scifri-2007011211.mp3
20070112_sb28.mp3                                     scifri-2007011212.mp3
20070112_stragety28.mp3                               scifri-2007011213.mp3
2007-01-13-podcasts.m3u                               scifri-2007011224.mp3
Black_Jack_Justice_14_-_The_Trouble_With_Doubles.mp3  scifri-2007011225.mp3
npr_6844258.mp3                                       scifri-2007011226.mp3
npr_6846159.mp3
hbarta@baobab:/media/Sansa e280$ fapg -o PLAYLISTS/podcast.m3u MUSIC/podcast/*
hbarta@baobab:/media/Sansa e280$ cat PLAYLISTS/podcast.m3u
#EXTM3U
#EXTINF:55,04-123-well-rounded-life Sat
MUSIC/podcast/2007-01-13/04-123-well-rounded-life_Sat.mp3
#EXTINF:688,The Online NewsHour - Getting the Best Price on Prescription Drugs
MUSIC/podcast/2007-01-13/20070112_drugs28.mp3
#EXTINF:787,The Online NewsHour - Shields and Brooks 
MUSIC/podcast/2007-01-13/20070112_sb28.mp3
#EXTINF:689,The Online NewsHour - Military Views Towards New Iraq Stragety
MUSIC/podcast/2007-01-13/20070112_stragety28.mp3
#EXTINF:1395,Decoder Ring Theatre - The Trouble With Doubles
MUSIC/podcast/2007-01-13/Black_Jack_Justice_14_-_The_Trouble_With_Doubles.mp3
#EXTINF:1674,NPR - NPR: All Songs Considered for Friday, Jan 12 2007
MUSIC/podcast/2007-01-13/npr_6844258.mp3
#EXTINF:4029,NPR - NPR: Movies for Friday, Jan 12 2007
MUSIC/podcast/2007-01-13/npr_6846159.mp3
#EXTINF:367,NPR - NPR: World Story of the Day for Friday, Jan 12 2007
MUSIC/podcast/2007-01-13/npr_6847548.mp3
#EXTINF:1303,Science Friday Podcast  - Funding for Science -- SciFri 2007011211
MUSIC/podcast/2007-01-13/scifri-2007011211.mp3
#EXTINF:784,Science Friday Podcast  - Dark Matter Mapped -- SciFri 2007011212
MUSIC/podcast/2007-01-13/scifri-2007011212.mp3
#EXTINF:701,Science Friday Podcast  - Stem Cell Update -- SciFri 2007011213
MUSIC/podcast/2007-01-13/scifri-2007011213.mp3
#EXTINF:1424,Science Friday Podcast  - New Consumer Electronics -- SciFri 2007011224
MUSIC/podcast/2007-01-13/scifri-2007011224.mp3
#EXTINF:383,Science Friday Podcast  - Comet Viewing -- SciFri 2007011225
MUSIC/podcast/2007-01-13/scifri-2007011225.mp3
#EXTINF:1033,Science Friday Podcast  - Electric Cars -- SciFri 2007011226
MUSIC/podcast/2007-01-13/scifri-2007011226.mp3
hbarta@baobab:/media/Sansa e280$ m3u2pla PLAYLISTS/podcast.m3u PLAYLISTS
output to "PLAYLISTS/podcast.pla"

MUSIC/podcast/2007-01-13/04-123-well-rounded-life_Sat.mp3
MUSIC/podcast/2007-01-13/20070112_drugs28.mp3
MUSIC/podcast/2007-01-13/20070112_sb28.mp3
MUSIC/podcast/2007-01-13/20070112_stragety28.mp3
MUSIC/podcast/2007-01-13/Black_Jack_Justice_14_-_The_Trouble_With_Doubles.mp3
MUSIC/podcast/2007-01-13/npr_6844258.mp3
MUSIC/podcast/2007-01-13/npr_6846159.mp3
MUSIC/podcast/2007-01-13/npr_6847548.mp3
MUSIC/podcast/2007-01-13/scifri-2007011211.mp3
MUSIC/podcast/2007-01-13/scifri-2007011212.mp3
MUSIC/podcast/2007-01-13/scifri-2007011213.mp3
MUSIC/podcast/2007-01-13/scifri-2007011224.mp3
MUSIC/podcast/2007-01-13/scifri-2007011225.mp3
MUSIC/podcast/2007-01-13/scifri-2007011226.mp3
hbarta@baobab:/media/Sansa e280$
So... Here's a concrete example of how this works. Code is reasonably (IMO ) commented. My program is really pretty simple. The heavy lifting is done by 'fapg' in my case or whatever you use to generate the M3U list in yours. Just make sure the list entries start with MUSIC/<rest of path to MP3 file>.

Next... I'm working out a script that builds play lists based on how I organize my music. If there's any interest, I'll post that.

-hank
Reply With Quote

  #7  
Old 01-21-2007, 06:53 AM
undii undii is offline
Junior Member
 
Join Date: Jan 2007
Posts: 1
Default

Quote:
Originally Posted by HankB View Post
Next... I'm working out a script that builds play lists based on how I organize my music. If there's any interest, I'll post that.

-hank


Hello.I have an interest in that script please
Reply With Quote

  #8  
Old 01-21-2007, 10:08 AM
HankB HankB is offline
Junior Member
 
Join Date: Jan 2007
Posts: 98
Default

Quote:
Originally Posted by undii View Post
Hello.I have an interest in that script please
Since that time, I've modified 'fapg' to output playlists in the format that works with the Sansa. I don't have a specification for the format. I have just reverse engineered what I found in the Go list.

You can find the script at: http://hbarta.googlepages.com/update-lists.sh
And it includes (what I hope is) sufficient description on how I use it. I've copied that below:
Code:
# This playlist generator depends on the way I organize my music. If
# you organize differently, it may work by tweaking the entries you
# put in the .lst files or you may find it more convenient to tweak
# the script itself.
#
# it also requires version 0.36 of 'fapg' (Fast Audio Playlist
# Generator) by Antoine Jacquet) to which I have added support for the
# Sansa. You can find the source at:
# http://royale.zerezo.com/fapg/
#
# I keep albums each in their own directory and those directories go
# into the /MUSIC directory on my Sansa (Except for podcasts or any
# other ad hoc MP3s I wish to listen to. Those go into
# /MUSIC/podcasts/<dirname> where dirname is date or whatever. And I
# usually generate the playlist for them with the command:
#
# fapg -o PLAYLISTS/podcast.pla -f pla MUSIC/podcasts/*
#
# Next I have created master list of directories using the 'ls'
# command from the base directory on the Sansa (where it gets
# mounted.) For me, that's:

# hbarta@baobab:~$ cd /media/Sansa\ e280/
# hbarta@baobab:/media/Sansa e280$ ls MUSIC >PLAYLISTS/master.lst

# Now I edit the master list and copy entries from it to other smaller
# lists. (<filename>.lst in the PLAYLISTS directory on the Sansa) I
# create themes and mixes based on what I think I might want to listen
# to at any given time. Note that my technique produces a list that
# plays entire albums at a time because that's what I like. You could
# easily create lists that include your favorite tracks if that was
# your preference. You can manually create the lists too. Some entries
# in one of my list files might look like (without the '# ' prefix):

# DavidSanchez-obsesion
# John_Coltrane-Blue_Train
# Miles_Davis-Kind_Of_Blue

# (There's nothing magical about the directory names, that's just how
# autorip names them.)

# BUGS
# - doesn't handle directories with spaces in the name. I'm not even
#   sure if that is a problem with the script or 'fapg'
Just run the script from the base directory on the Sansa.

One thing I'm unclear on is the character type of he playlist. Everything I have looks like 8 bit characters with intervening nulls, so that's what I programmed in 'fapg.' If this uses 16 bit characters, my hacks to 'fapg' may not work for everyone. If anyone can test that for me, let me know how it works. As near as I can tell, my American-English based system uses 8 bit characters for folder names and so on.

I hope you find this useful. Let me know if my description leaves anything out.

-hank
Reply With Quote

  #9  
Old 01-31-2007, 05:42 PM
gratt gratt is offline
Junior Member
 
Join Date: Dec 2006
Posts: 31
Default

I posted some m3u and sync tools written in perl in the programs section.
I also found a perl script on another site to do the image conversion to 16 bbp on linux.

Gratt
Reply With Quote

  #10  
Old 02-01-2007, 06:32 PM
Zwack Zwack is offline
Junior Member
 
Join Date: Dec 2006
Location: Oregon, USA
Posts: 73
Default Playlist Character set...

When I looked at several programs (the only source of specifications on this format that I can find) I realised that <char><null> was probably some 16 bit format. It took me a couple of minutes to find out... it's utf-16le (little endian, 16 bit, unicode).

So far I can tell you that there is a two line header followed by a blank line, followed by a list of songs in the format HARP, <PATH> and each line is CRLF terminated. The character set is utf-16le, and other devices use something other than HARP at the start of the line.


PLP PLAYLIST
VERSION 1.20

HARP, <PATH/TO/FILE/ONE>
HARP, <PATH/TO/FILE/TWO>

I hope that this helps,

Z.

Last edited by Zwack; 02-01-2007 at 06:36 PM. Reason: typo
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 04:16 PM.