FS-Plugin - iPod

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Stefan2, white, sheep, Hacker

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

FS-Plugin - iPod

Post by *Jonas » 2003-07-04, 18:01 UTC

Hi...

Currently I'm using XPlay to feed my cute little iPod. A nicer way is a TC-fs-plugin. My Question: Does anyone knows of such an existing project? If nothing like this exists, I'm starting to write it. I already hve written a class which reads the iTunesDB (the database where the iPod stores the ID3-information). It's still a bit buggy at the moment but I think I can make it (I can read my iTunesDB till entry 183/~2500 - at this position it breaks up and I don't know why :?) I managed to read the whole DB with a php-implementation of my routine.

It could helping to see other iTuntesDB's, esspecialy some wich XPlay hasn't touched. It would be kind if a few people would give me a link where I can download thier iTunesDB (it is stored in the hidden folder on the iPod "\iPod_conrtoll\iTunes\" or so)

An other thing is unicode. Apple stores als strings in the iTunesDB with UTF-16. I haven't any experiance with unicode at all. At the moment I'm cutting out every second Byte (every '\0'). It works quite well for the west european characterset but I know that this isn't a nice way.
At the moment TC gets normal null-terminated char-arrays for the filenames but how will it be in future? Christian said that one day TC will support unicode. And how far is this furure away?

Edit: Download wfx_iPod below...
Last edited by Jonas on 2003-10-02, 18:28 UTC, edited 1 time in total.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36544
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2003-07-07, 08:42 UTC

I don't know of such a project, so it would really be nice to have!
An other thing is unicode. Apple stores als strings in the iTunesDB with UTF-16. I haven't any experiance with unicode at all. At the moment I'm cutting out every second Byte (every '\0'). It works quite well for the west european characterset but I know that this isn't a nice way.
No please don't do that, it's not nice - it will not work with most non-European languages. Please use MultiByteToWideChar.
At the moment TC gets normal null-terminated char-arrays for the filenames but how will it be in future?
Unicode support in plugins is still far away. If I will ever add it, I will probably use an additional function to set the plugin in Unicode mode, and then use UTF-8. Nothing to worry about at the moment.
Author of Total Commander
http://www.ghisler.com

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-19, 01:34 UTC

Finaly I got a first version done!
Edit: Download wfx_iPod below...
I could'd fix the problems with my iTunesDB-Code, so I used the one from gtkpod, coverd by the LGPL...

This plugin can acces the music stored on an Apple iPod (www.apple.com/ipod). It reads the iTunesDB and proviedes all songs in a directorystrucure like "\{artist}\{album}\{<format>.mp3}" or "\{genre}\{<format>.mp3}". You can copy all songs from an iPod with an well formated filename to your harddisc.
NOTE: With this version you can not add songs to your iPod nor change the songs properties. These features are planed for the next version. The sourcecode is already able to write a working iTunesDB but I haven't yet implement this to the plugin. (it woun't take long time anymore ;))

Known Issue: The filesize of the .mp3's isn't correct. I had to use this as an index of the iTunesDB. Christian, please make the DWORD dwReserved1 from the WIN32_FIND_DATA in the RemoteInfoStruct available. see http://www.ghisler.ch/board/viewtopic.php?t=1719 for details.

Presupposition: An iPod with a readable filesystem. So if you have an mac-formated iPod you will need a hfs+-plugin to read Apple's filesystem. Your iPod needs a drive-letter (discmode enabled)!!
windowsplugins for reading the hfs+-filesystem are i.e.:
MacDrive - http://www.mediafour.com/products/macdrive/
MacOpener - http://www.dataviz.com/products/macopener/
And a working firewire(IEEE 1394)-adapter

IMPORTANT: This version isn't able to find the settings itself. Therefor you have to add these lines to your fsplugin.ini (in the same dir as the wincmd.ini). If not present, create it. (I hope this will change with the next version)
If you changed the ipod-root or the languagefile you have to restart TC!!

fsplugin.ini
[iPod]
languagefile=c:\path\to\language_<language>.lan
ipod-root=<iPod-Drive with trailing '\' i.e. "H:\">
format_artist="%a - %n - %t"
format_artist_album="%n - %t"
format_album="%n - %i - %t"
format_title="%i - %a - %n - %t"
format_genre="%i - %t"
format_composer="%i - %t"
format_playlist="%p - %i - %t"

EDIT: correct the keys format_artist and format_artist_album.
Last edited by Jonas on 2003-10-02, 18:29 UTC, edited 2 times in total.

oblomov
Junior Member
Junior Member
Posts: 98
Joined: 2003-04-04, 15:41 UTC

Post by *oblomov » 2003-09-19, 07:43 UTC

Jonas wrote: fsplugin.ini
[iPod]
languagefile=c:\path\to\language_<language>.lan
ipod-root=<iPod-Drive with trailing '\' i.e. "H:">
format_atrist="%a - %n - %t"
format_atrist_album="%n - %t"
format_album="%n - %i - %t"
format_title="%i - %a - %n - %t"
format_genre="%i - %t"
format_composer="%i - %t"
format_playlist="%p - %i - %t"
Good job. Now what about using "artist" instead of "atrist"? ;)

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-19, 10:58 UTC

oh, sry... I c&p'd an old version in here... the plugin already reads the correct keys.. try it!

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-19, 16:17 UTC

New version! (the last read-only ;) )
Now it's a easy to use iPod music-ripper ;)
Edit: Download wfx_iPod below...

Playlist support
Format added
- %% - "%"
- %p - position in playlist (2 digits)
- %P - position in playlist (4 digits)
iPod autodetection (starts at D:\)
Updated Languagefiles (v2)
- language_de.lan - german (myself)
- language_en.lan - english (myself)
Change the language by copying the *.lan-file to the plugin

The next version that supports adding of songs and change thier propperties will follow after the weekend :)

I also need translators for the language-files! Put your name and eMail in the [info]-sektion. also very importent is the "version=2"!
Last edited by Jonas on 2003-10-02, 18:30 UTC, edited 1 time in total.

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-23, 19:47 UTC

New Version!
Edit: Download wfx_iPod below...

Ability to delete songs from iPod
Ability to delete songs from a playlist
New iTunesDB is written on disconnect! (I recommend to make a backup of this hidden file <ipod>:\iPod_Control\iTunes\iTunesDB)
Updated Languagefiles (v3)
- language_de.lan - german (myself)
- language_en.lan - english (myself)
New languagefile
- language_fr.lan (thx to achim <a-baehr@gmx.net>)
Filesize is now shown correctly

Please test as much as possible. I had no problems but I only got one iPod (first generation, 20GB, firmware 1.3) for testing
Last edited by Jonas on 2003-10-02, 18:57 UTC, edited 2 times in total.

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-23, 21:03 UTC

WARNING:
It's absolutly nessesary that you backup you iTunesDB.
I discovered recently that wlx_iPod can't read playlists made with ephPod! They get lost while writing the iTunesDB with my TC-Plugin.
Because also the Master-Playlist is lost, iPod will find no more songs (even if my Plugin and many other software will do)

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-25, 00:54 UTC

New Version:
Edit: Download wfx_iPod below...

New ini-key: show_master-playlist={no|yes}
All ini-keys will be set to a default-value if nonexistent
Fixed problem ephPod (iPod didn't recognize any ong after editing an iTunesDB which was written by ephPod)
iTunesDB is only rewritten if changes are made (so your DB isn't touched if you only copy music from iPod to harddisc)
Last edited by Jonas on 2003-10-02, 18:31 UTC, edited 1 time in total.

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-26, 15:43 UTC

New Version:
Edit: Download wfx_iPod below...

Ability to rename folders of artists (albums, etc.) to change the artist (albums, etc.) of all .mp3's inside this folder
Ability to move songs into the folders genre (composer, etc.) to change the genre (composer, etc.) of all these .mp3's
Last edited by Jonas on 2003-10-02, 18:31 UTC, edited 1 time in total.

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-09-29, 23:15 UTC

New Version:
Edit: Download wfx_iPod below...

2003-09-29
Ability to copy songs to the iPod (the directory on the iPod-side doesn't matter)
This is still very slow (~2MB/s) because I use blocks of 65536 Bytes. Larger blocks are not working well and I don't know why...

2003-09-27
New languagefile
- language_no.lan (thx to Fredrik Rodland <totcmd@rodland.no>)

NOTE: All funktions except reading (= copy from iPod to harddisc) are experimental. This is also why you won't find any information about renaming, deleting and uploading of songs in the docs. (they are working for me but I haven't any feetback from other users/iPods)
As soon as these features are stable und working the way they should I will release new language-files where all this will be documented.

This is free software that comes with absolutly no warrenty!

Anyone who could help is wellcome :)
Last edited by Jonas on 2003-10-02, 18:31 UTC, edited 1 time in total.

koo
Junior Member
Junior Member
Posts: 3
Joined: 2003-10-02, 14:42 UTC

Post by *koo » 2003-10-02, 14:45 UTC

congratulation!
very usefull plugin!
thanx :-)

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-10-02, 18:54 UTC

Thx :)

Here is a new version
http://www.jonas-baehr.de/forum/wfx_iPod_bin.zip (~176K, only binary & language - for normal users)
http://www.jonas-baehr.de/forum/wfx_iPod_src.zip (~43K, plugin-source - for developpers)
http://www.jonas-baehr.de/forum/wfx_iPod_id3lib.zip (~1.6M, id3lib-source - for developpers)

2003-10-02
fix: crash when moving an artist from "artist - album" to <some place on iPod>
add: append songs to a playlist by copying them into the playlist's directory
fix: crash when deleting the last playlist-entry
add: adding a playlist by making a dir in the playlist-folder
add: renaming playlists
add: delete playlists
fix: renaming something unknown changed very unknown value
add: extract ID3v1-Genres from IDv2-tags ("(##)") incl. Winamp extensions

2003-09-30
improved copy-speed to the iPod (but as a consequence the copy-state isn't visible any more)
updated languagefiles (v4)
- language_de.lan - german (myself)
- language_en.lan - english (myself)
- language_fr.lan (thx to achim <a-baehr@gmx.net>)
- language_no.lan (thx to Fredrik Rodland <totcmd@rodland.no>)
fix: crash caused by deleting from a playlist
logging improved

A detailed manual in your language can be found in the [about]-section of the correspondent languagefile. If your language isn't available, plz translate it and send me your version. I will include it into the package...

I fixed a lot of bugs and it works good for me but I haven't any information about how it works with other iPod's. Please test it and send me feedback. If you're afraid of any damage to your iPod, do it taht way:
1. make a backup of the file <iPod-drive>:\iPod_Control\iTunes\iTunesDB (! it's hidden !)
2. change with the plugin the name of an artist. The new iTunesDB is written on disconnect or TC-quit.
3. Try if your iPod can read the new DB. Do you see all songs? Is the Artist renamed?
If not, let any other experiments be (only copying from iPod to harddisc is save. The new DB is only written i you changed anything)
If everything goes fine you can test other features. In worst case TC crashes and the changes you made in this session are lost.

koo
Junior Member
Junior Member
Posts: 3
Joined: 2003-10-02, 14:42 UTC

Post by *koo » 2003-10-03, 07:31 UTC

hi,
I 've tried to install your plugin but I seems not to be ok:

* My total commander is in C:\apps\totalcmd
* My ipod drive is E:\
* in total commander, I've added the ipod.wfx plugin (by option menu)
* in my c:\app`\totalcmd, i've got the 3 files:
- ipod.wfx
- fsplugin.ini
- language_fr.lan

and my fsplugin.ini is:

Code: Select all

[iPod] 
languagefile=C:\Apps\Totalmd\language_fr.lan
ipod-root=E:\
show_master-playlist=yes
format_atrist="%a - %n - %t" 
format_atrist_album="%n - %t" 
format_album="%n - %i - %t" 
format_title="%i - %a - %n - %t" 
format_genre="%i - %t" 
format_composer="%i - %t" 
format_playlist="%p - %i - %t"
When i browse my ipod, in ipod_control\iTunes directory, i see the ituneDB file but i can do nothing:
when i press enter on each file, no action except for the iTunesControl file but there is nothing inside.
What's wrong? :(

Jonas
Senior Member
Senior Member
Posts: 325
Joined: 2003-05-27, 16:59 UTC
Location: Germany
Contact:

Post by *Jonas » 2003-10-03, 11:12 UTC

First off all, the fsplugin.ini must be in the same dir as your wincmd.ini! (standard %WINDIR%\wincmd.ini)

To browse your iPod, go to the network neighborhood. there you will see the Plugin as "iPod". It is not a packer-plugin for the iTunesDB. I only recommend to make a backup of this file because this plugin isn't too much testet yet.

Post Reply