| View previous topic :: View next topic |
| Author |
Message |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Fri Jul 04, 2003 12:01 pm Post subject: FS-Plugin - iPod |
|
|
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 Thu Oct 02, 2003 12:28 pm; edited 1 time in total |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 17794 Location: Switzerland
|
Posted: Mon Jul 07, 2003 2:42 am Post subject: |
|
|
I don't know of such a project, so it would really be nice to have!
| Quote: | | 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.
| Quote: | | 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 |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Thu Sep 18, 2003 7:34 pm Post subject: |
|
|
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 Thu Oct 02, 2003 12:29 pm; edited 2 times in total |
|
| Back to top |
|
 |
oblomov Junior Member

Joined: 04 Apr 2003 Posts: 98
|
Posted: Fri Sep 19, 2003 1:43 am Post subject: |
|
|
| 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"?  |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Fri Sep 19, 2003 4:58 am Post subject: |
|
|
| oh, sry... I c&p'd an old version in here... the plugin already reads the correct keys.. try it! |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Fri Sep 19, 2003 10:17 am Post subject: |
|
|
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 Thu Oct 02, 2003 12:30 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Tue Sep 23, 2003 1:47 pm Post subject: |
|
|
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 Thu Oct 02, 2003 12:57 pm; edited 2 times in total |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Tue Sep 23, 2003 3:03 pm Post subject: |
|
|
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) |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Wed Sep 24, 2003 6:54 pm Post subject: |
|
|
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 Thu Oct 02, 2003 12:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Fri Sep 26, 2003 9:43 am Post subject: |
|
|
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 Thu Oct 02, 2003 12:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Mon Sep 29, 2003 5:15 pm Post subject: |
|
|
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 Thu Oct 02, 2003 12:31 pm; edited 1 time in total |
|
| Back to top |
|
 |
koo Junior Member

Joined: 02 Oct 2003 Posts: 3
|
Posted: Thu Oct 02, 2003 8:45 am Post subject: |
|
|
congratulation!
very usefull plugin!
thanx  |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Thu Oct 02, 2003 12:54 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
koo Junior Member

Joined: 02 Oct 2003 Posts: 3
|
Posted: Fri Oct 03, 2003 1:31 am Post subject: |
|
|
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: | [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?  |
|
| Back to top |
|
 |
Jonas Senior Member

Joined: 27 May 2003 Posts: 325 Location: Germany
|
Posted: Fri Oct 03, 2003 5:12 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|