View Single Post
Posts: 450 | Thanked: 16 times | Joined on Mar 2006
#16
Originally Posted by disq View Post
Got to the root of the problem. Looking at the sample playlist file, I saw that your playlists are saved in utf-8 encoding. I'm guessing the m3u-reader part of Kagu doesn't understand that. We'll fix that in the next release. That's the reason for the playlist files not being read correctly.

But how did the playlist files got utf8 encoding in the first place? I'm guessing it's something Python automagically does when needed, as one of the files in the sample playlist had a "ö" in it.

Anyway. I'm attaching a utf8-to-ascii format converter I just hacked up in Python to this message.

1. Save it as utf2ascii.py in the main filesystem (main filesystem = not in one of the mmc's) of the device, preferably in where you keep your playlist files. I had attach it as "utf2ascii.txt" because of ITT's attachment filename regulations.
2. Run "chmod +x utf2ascii.py" to make it executable (you'll need to be in the same directory)
3. Run "./utf2ascii.py < playlist_filename > playlist_new_filename" for each playlist.

Example would be:
./utf2ascii.py < playlist.m3u.pop_songs > playlist.m3u.pop_songs_fixed

The command on the third step will read the file "playlist_filename" file, and write the contents to the file "playlist_new_filename". During this process some playlist entries (the ones with non-latin1 characters like "ö" in it) will be skipped.

If you add those files to the playlist again, the playlist file will be broken once again. Best way to avoid it is to go over your mp3 files and rename all non-latin1 characters in the filenames. Don't forget to run kagu scanner afterwards. We'll fix this issue in the next Kagu release.
Disq: In following your instructions, here are the results of my efforts. I had to extrapolate a bit (I hope without doing too much harm).

1. Running your converter the first time served to identify for me only one title that had a non-latin1 character (an Andrews Sisters number). I then corrected that everywhere (MMC and playlist.m3u -- both original and fixed) with my text editor. I ran the Kagu scanner, but no m3u playlist was picked up and displayed. (When I left /home/user/.kagu in my global.py scanning line, the titles of the /.kagu/mu3 files were identified, but their contents not listed.)

2. I then copied "playlist.m3u.fixed" to "playlist.m3u" and re-edited global.py to only scan (as formerly) my mmc cards. This time, the scan failed to pick up even the m3u titles. When in Kagu I sought to load playlists, no titles appeared on the screen.

The only thing I can now think of is either (1) your solution doesn't work (which I hope is not really the case), or (2) I need to re-edit global.py to include more in its scan.

I really appreciate all the time you've spent with me on this.