- Status Closed
- Percent Complete
- Task Type Patches
- Category Playlists
- Assigned To No-one
- Operating System Sansa e200
- Severity Low
- Priority Very Low
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
FS#6884 - Sansa E200 m3u/m3u8 to pla playlist converter
This is a viewer plugin (m3u2pla) to allow a user to convert
a rockbox created playlist either (name.m3u or name.m3u8) to a
(name.pla) playlist file that will play on the Sansa E200
in the Original firmware.
Buttons:
Up toggles Display ON of each entry
Down toggles Display OFF
Power is OFF
Converts a 500 song playlist very fast, (+- one second).
It is a simple program but my C is rusty.
GRaTT
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
Fixed an off by one error in the file name extension change.
Just an FYI, it only works on filenames using the latin UTF set. Anything more extended will not work (problem is where you write tempy).
First attempt to make this work for all Char sets.
Using compiler defined NULL.
This looks OK, except:
- Way too much use of splash(), output to the display instaed (and use the multi-screen api, not rb→lcd_puts()..)
- // comments
- tabs
- all the code for the case(plug_QUIT): WTF?
edit: can you make it convert pla→m3u(8) as well?
I just looked at this and I actually uploaded the wrong file.
Thus the extra code in (QUIT) it was a joke.
I will fix comments and tabs and attempt to add in pla→m3u(8).
GRaTT
Fixed
// comments, tabs removed, extra code in QUIT removed.
Saved some space by removing some char buffers that were not really required
Big code changes to add in pla→m3u(8) but it does not work yet.
Just creates an empty (name.m3u) file from a (name.pla) file.
Trouble reading in the lines with null bytes in between each character.
I have only been able to read in the first char.
Also fixed for new viewer.conf
I am unsure about the multi-screen api for display output but I did
remove some spash displays.
If display is on It takes some time for long playlists.
GRaTT
Playlist_Converter V1.0
This new version converts from (m3u8→pla) or (m3u→pla)
Rockbox playlist to Sansa Original Firmware playlist
and from (pla→m3u8)
Sansa OF playlist to Rockbox playlist.
I use a temp file for this instead of working with the array,
but it works well. Display is optional, default timeout it 0 seconds
so you know something is happening or 1 second if Display ON.
It is “fixed " now so it will NOT write music to a playlist
if it is on the SD Card or if it is WMA.
When SD Card and WMA are functional they will work here as well.
If you have other patches you may need to fix the SOURCES and viewers.config files.
GRaTT
The last one choked on pla files (pla→m3u8) over 1024 bytes.
This fixes that, and seems to work on all pla files
tested with 422 songs.
m3u→ pla still works well.
I have been testing with normal svn build and with
patched build: album art, wheel buffer, anti audio glich,
battery optimized, and my Delete Playlist patch.
TODO
more checking for file extentions.
do away with temp file.
better display.
GRaTT
Some oddities fixed some still to overcome.
some characters left that should be removed
is “fixed” some characters removed that should not be?
in a playlist of 426 last line missing?
Most pla→m3u8 work
GRaTT
I think this has it all fixed :)
No missed characters and no extras.
Information display is ok.
Just need to set font to rockbox default
so display is readable, and then set
back to user font.
GRaTT
last small fix.
I will continue to test but I think this has it.
GRaTT
fixed off by one error that added more garbage in.
Just setting the font for display now.
Proper display with rockbox default font only.
GRaTT
Playlist Converter 2.0
Finished version
Display works well with font up to 19
and I have found no more errors in the conversions.
GRaTT
Added support for the SD card support patch.
It now includes songs from the SD card as well.
Small bug fix on song count.
GRaTT
Converts both ways m3u/8↔pla with SD card support.
I still drop out the wma files on pla→m3u8 as RB does
not support them ‘yet’.
GRaTT
updated to current SVN July 03 2007.
Included support for newly added WMA codec.
Support for added SDMMC card support with path “/<microSD1>” Changed SOURCES file to only compile Playlist Converter for Sansa.
GRaTT
updated for changes to the plugins directory structure.
Use of CATAGORIES file.
GRaTT
I looked a bit at the code and found some issues that ought to be fixed, IMHO:
* m3u(8) → pla only supports latin1 chars in filenames.
* When calling snprintf(), don’t use the length of the arguments as the size. No point in using snprintf over sprintf then, as it won’t protect from buffer overflows.
* Don’t mix code and variable declarations within a block.
* Some indentation issues makes the code harder to read.
* No all-caps variable names please. Defines should typically be all caps though.
* Variable names are sometimes confusing (e.g., newparam and newparam1, size_of and size_of_file). Made me think there was a bug when there wasn’t in a couple of places.
* Use memset to clear buffers. And why not use a simple “0” instead of the “(char)*tempy” stuff?
Side note: Rockbox doesn’t care if a playlist uses ‘/’ or ‘\’ in a path.
Well, that’ll do for now… :)
m3u(8) → pla only supports latin1 chars in filenames.
* When calling snprintf(), don’t use the length of the arguments as the size. No point in using snprintf over sprintf then,
as it won’t protect from buffer overflows.
* Don’t mix code and variable declarations within a block.
* Some indentation issues makes the code harder to read.
* No all-caps variable names please. Defines should typically be all caps though.
* Variable names are sometimes confusing (e.g., newparam and newparam1, size_of and size_of_file).
Made me think there was a bug when there wasn’t in a couple of places.
* Use memset to clear buffers. And why not use a simple “0” instead of the “(char)*tempy” stuff?
Side note: Rockbox doesn’t care if a playlist uses ‘/’ or ‘\’ in a path.
GRaTT
Fixed some warnings
GRaTT
Here is the full patch.
GRaTT
Wait a minute guys. I’m really new to this stuff. I was having some trouble adding/making playlists in my Sansa e250. So I searched on Google for some answers and came across this. Bad thing is, I have no idea what I’m suppose to do with the file. I’m think I should have the V3.3 not the one in the original post? Anyone mind explaining what I should do?
Use the most recent version of the patch and apply it to a checkout of the source trunk. You can refer to the docs index for instructions on applying patches and building Rockbox. Also, be aware that there’s a good chance that the patch is out of sync after so much time.