Help - Search - Members - Calendar
Full Version: foo_pod - Foobar2000 meets the iPod
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42
krmathis
Wow, this is going to be a great plugin! biggrin.gif
I am using EphPod at the moment, but I will absolutely switch to foo_pod when its out...

Solaris
danZ
QUOTE (Aero @ Mar 8 2004, 03:07 AM)
Then I'll add Lua scripting support, along with some more unusual ideas I have been coming up with.  Like an iPod to iPod sync - this would be a quick way to duplicate one iPod to another, or copy missing files so that both iPods would have the same set of songs.

I guess when you get the big bucks for doing foobar components you can afford to have 2 iPods wink.gif

Seriously, though, my plugin uses Lua and so do a couple others. I compile Lua into my component but I'm not sure about the other ones. I wonder if PP would consider adding the latest version of lua to the mainline release so that all of the components (and the core code if he's interested) could use the same, standard, lua scripting code and interface. And/or we should all try to use the latest version compiled into a shared DLL since it appears the dlls have to be in the foobar folder vs. the components folder (maybe there is a way around that?). I would have to upgrade my component to lua 5.0 but that shouldn't be a huge problem. I could even build the dll unless you can already get the 5.0 distro in a windows DLL.

Looking forward to testing the write to iPod stuff.
Aero
foo_pod version 0.2 is now available.

This is the first version that supports writing songs to an iPod. Write support is still a little rough in the user interface department, but I have yet to lose data or corrupt my iPod with this version, so I believe it is ready for general testing.

Just to make sure, there is a Debug menu under the foo_pod Component menu. If you are worried that foo_pod might mess up your iPod, select the Backup menu item before using foo_pod for the first time. If something does happen, you can select the Restore item to recover the database file saved by Backup.


From the readme:

foo_pod is a interface between an Apple iPod and Foobar2000 version 0.8. As of Version 0.2, foo_pod allows reading and limited writing to an iPod.

The write support currently is append only - meaning that it will copy files to the iPod, but doesn't yet support removing files. It also doesn't detect duplicate files yet, although one way to get around this is to read the iPod's database into Foobar using the "Load iPod Songs To..." menu item, add the new songs, select Playlist/Remove Duplicates, then transfer the playlist to the iPod using "Send Current Playlist To iPod". foo_pod does not transfer playlist items that are from the iPod, so this should work.

In this version, there is no progress dialog or way to cancel a transfer. Information about the transfer is written out to the Foobar2000 console upon completion. The next version will have a progess dialog as well as a way to abort the transfer.
rufu
Great work, it really looks like this is moving forward. I got the following error message when loading the iPod playlist:

QUOTE
Illegal operation:
Code: C0000005h, flags: 00000000h, address: 77C43108h
Access violation, operation: read, address: 0289FE8Eh
Call path:
WinMain=>app_mainloop=>menu command: "Components/foo_pod/foo_pod:Load iPod Songs To foo_pod Playlist"
This is the first crash logged by this instance.
Code bytes (77C43108h):
77C430C8h:  24 95 F0 31 C4 77 8B FF F7 D9 FF 24 8D A0 31 C4
77C430D8h:  77 8D 49 00 8B C7 BA 03 00 00 00 83 F9 04 72 0C
77C430E8h:  83 E0 03 2B C8 FF 24 85 F8 30 C4 77 FF 24 8D F0
77C430F8h:  31 C4 77 90 08 31 C4 77 28 31 C4 77 50 31 C4 77
77C43108h:  8A 46 03 23 D1 88 47 03 4E C1 E9 02 4F 83 F9 08
77C43118h:  72 B6 FD F3 A5 FC FF 24 95 F0 31 C4 77 8D 49 00
77C43128h:  8A 46 03 23 D1 88 47 03 8A 46 02 C1 E9 02 88 47
77C43138h:  02 83 EE 02 83 EF 02 83 F9 08 72 8C FD F3 A5 FC
Stack (0012EC98h):
0012EC78h:  00B2F8C8 77FA88F0 77F521E0 0000005A
0012EC88h:  00B2D238 C0000005 00B2D214 00B2D224
0012EC98h:  0221FC74 000001B6 0268FF90 013482D5
0012ECA8h:  026908E4 0221FE2A 00680065 00000214
0012ECB8h:  0268FF90 0221F8DC 00000021 00000004
0012ECC8h:  00000000 00000002 00000000 01349121
0012ECD8h:  026908D8 00000008 00000000 01C44C84
0012ECE8h:  021ABB76 00000398 0268FCD8 00000003
0012ECF8h:  0268FF90 0268FCE8 0268FF90 0012ED5C
0012ED08h:  01356DD7 FFFFFFFF 01348847 0268FD18
0012ED18h:  00000060 021ABB76 00000000 01C27AC0
0012ED28h:  0268FCB0 00000001 00000000 00073D0A
0012ED38h:  01346222 00073D66 0012EE10 01F90020
0012ED48h:  0012EE0C 0021BAF6 00000004 021ABB76
0012ED58h:  0012EE10 0012F03C 01356CE4 FFFFFFFF
0012ED68h:  01345C67 021ABB16 01F90020 77C5ACE0
0012ED78h:  002BD750 0134BB06 01F90020 77D46AE9
0012ED88h:  01359BE0 0012F920 00010011 0134265E
0012ED98h:  0012EE3C 77D46AE9 01359BE0 00000000
0012EDA8h:  71997568 DCBAABCD 00000000 0012EE04
Registers:
EAX: 00000001, EBX: 00680065, ECX: 00680064, EDX: 00000003
ESI: 0289FE8B, EDI: 02D10945, EBP: 0012ECA0, ESP: 0012EC98
Crash location: "msvcrt", loaded at 77C10000h - 77C63000h
Symbol: "memcpy" (+000001F8h)

Loaded modules:
foobar2000                    loaded at 00400000h - 00451000h
ntdll                            loaded at 77F50000h - 77FF7000h
kernel32                      loaded at 77E60000h - 77F46000h
USER32                        loaded at 77D40000h - 77DCC000h
GDI32                            loaded at 77C70000h - 77CB0000h
ADVAPI32                      loaded at 77DD0000h - 77E5D000h
RPCRT4                        loaded at 78000000h - 78086000h
ole32                            loaded at 771B0000h - 772D1000h
COMCTL32                      loaded at 71950000h - 71A34000h
msvcrt                        loaded at 77C10000h - 77C63000h
SHLWAPI                          loaded at 70A70000h - 70AD5000h
utf8api                          loaded at 10000000h - 1000D000h
comdlg32                      loaded at 763B0000h - 763F5000h
SHELL32                          loaded at 773D0000h - 77BC2000h
foo_abx                          loaded at 008D0000h - 008DA000h
foo_ac3                          loaded at 008E0000h - 008F0000h
foo_albumlist                    loaded at 008F0000h - 008FA000h
foo_ape                          loaded at 00900000h - 0091F000h
foo_apl                          loaded at 00920000h - 0092A000h
foo_bitcompare                loaded at 00930000h - 00938000h
foo_burninate                    loaded at 00940000h - 0094B000h
VERSION                          loaded at 77C00000h - 77C07000h
foo_cdda                      loaded at 00950000h - 0095E000h
foo_clienc                    loaded at 00960000h - 0096B000h
foo_console                      loaded at 00970000h - 00978000h
foo_convolve                  loaded at 00980000h - 009AB000h
foo_dbsearch                  loaded at 009B0000h - 009C6000h
foo_diskwriter                loaded at 009D0000h - 009E2000h
WINMM                            loaded at 76B40000h - 76B6C000h
foo_dsp_crossfade                loaded at 00A70000h - 00A77000h
foo_dsp_crossfeed                loaded at 00A80000h - 00A86000h
foo_dsp_extra                    loaded at 00A90000h - 00AA5000h
foo_dsp_nogaps                loaded at 00AB0000h - 00AB7000h
foo_dsp_pause                    loaded at 00AC0000h - 00AC7000h
foo_dsp_skip_silence          loaded at 00AD0000h - 00AD7000h
foo_dsp_soundtouch            loaded at 00AE0000h - 00AEB000h
MSVCP60                          loaded at 55900000h - 55961000h
foo_dynamics                  loaded at 00AF0000h - 00AF7000h
foo_faac                      loaded at 00B00000h - 00B33000h
foo_festalon                  loaded at 00B40000h - 00C7F000h
foo_flac                      loaded at 00C80000h - 00C96000h
foo_flaccer                      loaded at 00CA0000h - 00CB6000h
foo_freedb                    loaded at 00CC0000h - 00CEE000h
WS2_32                        loaded at 71AB0000h - 71AC4000h
WS2HELP                          loaded at 71AA0000h - 71AA8000h
foo_history                      loaded at 00CF0000h - 00CFE000h
foo_id3v2                        loaded at 00D00000h - 00D26000h
foo_input_std                    loaded at 00D30000h - 00DC9000h
MSACM32                          loaded at 77BE0000h - 77BF4000h
foo_lame                      loaded at 00DD0000h - 00DD9000h
foo_lpac                      loaded at 00DE0000h - 00DE7000h
lpac_codec_api                loaded at 00DF0000h - 00DFA000h
lpaccodec                        loaded at 00E00000h - 00E29000h
foo_masstag                      loaded at 01050000h - 01060000h
foo_matroska                  loaded at 01060000h - 0109F000h
foo_mod                          loaded at 010A0000h - 010A9000h
BASS                          loaded at 010B0000h - 0110A000h
foo_monkey                    loaded at 01110000h - 0112E000h
foo_mpcenc                    loaded at 01130000h - 01138000h
foo_mpeg4u                    loaded at 01140000h - 01169000h
foo_nero                      loaded at 01170000h - 01180000h
MFC42                            loaded at 73DD0000h - 73EC2000h
foo_nez                          loaded at 01180000h - 011AC000h
foo_null                      loaded at 011B0000h - 011B7000h
foo_ofr                          loaded at 011C0000h - 011EE000h
foo_oggpreview                loaded at 01200000h - 012FD000h
foo_output_std                loaded at 01300000h - 01309000h
foo_out_dsound_ex                loaded at 01310000h - 01319000h
DSOUND                        loaded at 51080000h - 510D6000h
foo_out_ks                    loaded at 01330000h - 0133B000h
SETUPAPI                      loaded at 76670000h - 76757000h
foo_pod                          loaded at 01340000h - 0135D000h
MSVCIRT                          loaded at 01360000h - 01370000h
foo_psf                          loaded at 01370000h - 0141B000h
foo_read_http                    loaded at 01420000h - 01429000h
foo_rgscan                    loaded at 01430000h - 0143B000h
foo_scheduler                    loaded at 01440000h - 0144C000h
foo_search_ex                    loaded at 01450000h - 01458000h
foo_shn                          loaded at 01460000h - 0146E000h
foo_shuffle                      loaded at 01570000h - 0157E000h
foo_sid                          loaded at 01580000h - 015C7000h
foo_spc                          loaded at 015D0000h - 015DF000h
foo_speex                        loaded at 015E0000h - 015F8000h
foo_stfu                      loaded at 01600000h - 01607000h
foo_tfmx                      loaded at 01610000h - 01619000h
foo_toolame                      loaded at 01620000h - 01633000h
foo_tunes                        loaded at 01640000h - 016B4000h
uxtheme                          loaded at 5AD70000h - 5ADA4000h
MSCTF                            loaded at 74720000h - 74764000h
foo_ui_std                    loaded at 01770000h - 01787000h
foo_unpack                    loaded at 01790000h - 017C1000h
OLEAUT32                      loaded at 77120000h - 771AB000h
foo_vis_manager                  loaded at 017D0000h - 017D8000h
foo_vis_simple_spectrum          loaded at 017E0000h - 017EA000h
foo_vis_vu_meter              loaded at 017F0000h - 017F8000h
foo_vorbisenc                    loaded at 01800000h - 018FA000h
foo_wavpack                      loaded at 01900000h - 0190B000h
foo_wma                          loaded at 01910000h - 01929000h
WMVCore                          loaded at 08530000h - 0872D000h
WMASF                            loaded at 07260000h - 07299000h
foo_xa                        loaded at 01930000h - 01941000h
CLBCATQ                          loaded at 76FD0000h - 77048000h
COMRes                        loaded at 77050000h - 77115000h
appHelp                          loaded at 75F40000h - 75F5F000h
cscui                            loaded at 76620000h - 7666E000h
CSCDLL                        loaded at 76600000h - 7661B000h
mslbui                        loaded at 605D0000h - 605D8000h
imagehlp                      loaded at 76C90000h - 76CB2000h
DBGHELP                          loaded at 6D510000h - 6D58D000h

Stack dump analysis:
Address: 013482D5h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01349121h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01356DD7h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01348847h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01346222h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01356CE4h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01345C67h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 0134BB06h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 77D46AE9h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "SetCursor" (+00000000h)
Address: 01359BE0h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 0134265Eh, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 77D46AE9h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "SetCursor" (+00000000h)
Address: 01359BE0h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 71997568h, location: "COMCTL32", loaded at 71950000h - 71A34000h
Symbol: "Ordinal384" (+00022876h)
Address: 71997568h, location: "COMCTL32", loaded at 71950000h - 71A34000h
Symbol: "Ordinal384" (+00022876h)
Address: 77D43B1Fh, location: "USER32", loaded at 77D40000h - 77DCC000h
Address: 77D43B4Fh, location: "USER32", loaded at 77D40000h - 77DCC000h
Address: 77D43B33h, location: "USER32", loaded at 77D40000h - 77DCC000h
Address: 77D44A0Fh, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "MBToWCSEx" (+00000153h)
Address: 77D449FDh, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "MBToWCSEx" (+00000141h)
Address: 77D9C3A4h, location: "USER32", loaded at 77D40000h - 77DCC000h
Address: 0135742Ch, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 013573CCh, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 00440073h, location: "foobar2000", loaded at 00400000h - 00451000h
Address: 77C73187h, location: "GDI32", loaded at 77C70000h - 77CB0000h
Symbol: "ExtTextOutW" (+00000568h)
Address: 77C730C9h, location: "GDI32", loaded at 77C70000h - 77CB0000h
Symbol: "ExtTextOutW" (+000004AAh)
Address: 77CAC020h, location: "GDI32", loaded at 77C70000h - 77CB0000h
Address: 77C731C6h, location: "GDI32", loaded at 77C70000h - 77CB0000h
Symbol: "GetTextExtentPointW" (+00000000h)
Address: 77C731DDh, location: "GDI32", loaded at 77C70000h - 77CB0000h
Symbol: "GetTextExtentPointW" (+00000017h)
Address: 77D47510h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "SendMessageTimeoutW" (+000004F0h)
Address: 77D47562h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "DrawTextExW" (+00000040h)
Address: 77D473FEh, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "SendMessageTimeoutW" (+000003DEh)
Address: 77D48477h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "GetDlgItem" (+000003BBh)
Address: 77FA88F0h, location: "ntdll", loaded at 77F50000h - 77FF7000h
Symbol: "wcstombs" (+00003409h)
Address: 77F51C78h, location: "ntdll", loaded at 77F50000h - 77FF7000h
Address: 77F58A3Ah, location: "ntdll", loaded at 77F50000h - 77FF7000h
Symbol: "RtlAllocateHeap" (+00000E8Ch)
Address: 77C2AC14h, location: "msvcrt", loaded at 77C10000h - 77C63000h
Symbol: "free" (+000001A9h)
Address: 77C2AC19h, location: "msvcrt", loaded at 77C10000h - 77C63000h
Symbol: "free" (+000001AEh)
Address: 77C33EB0h, location: "msvcrt", loaded at 77C10000h - 77C63000h
Symbol: "except_handler3" (+00000000h)
Address: 77C12048h, location: "msvcrt", loaded at 77C10000h - 77C63000h
Symbol: "__non_rtti_object::`vftable'" (+00000C60h)
Address: 0134FDB3h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 0134D95Bh, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 77D46AE9h, location: "USER32", loaded at 77D40000h - 77DCC000h
Symbol: "SetCursor" (+00000000h)
Address: 01345074h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01359BE0h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01356A6Ah, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01344B9Ah, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01357214h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01357214h, location: "foo_pod", loaded at 01340000h - 0135D000h
Address: 01359BE0h, location: "foo_pod", loaded at 01340000h - 0135D000h

Version info:
foobar2000 v0.8
UNICODE
reardon
QUOTE (Aero @ Mar 10 2004, 01:56 AM)
foo_pod version 0.2 is now available. 

Worked first time. You may want to note that it requires that you put your iPod in "drive" mode via iTunes the first time before using foo_pod.

-Reardon
reardon
QUOTE (Aero @ Mar 10 2004, 01:56 AM)
foo_pod version 0.2 is now available. 

Whoops. Spoke to soon. My iPod got blanked?

I did "Load iPod songs to ... Playlist". I added a few songs. Then I "Sent Current Playlist to iPod". It seemed to work. I asked WinXP to undock the iPod (iTunes has been turned off). It undocked properly.

When I navigated on the iPod itself, however, it was blanked completely.

I had backed up the db and just restored it. But the restore doesn't seem to work. It appears to have a corrupted db or something, because after undocking it freezes up for about 30 seconds. Then it shows a blank db.

Thoughts?

-Reardon
Aero
QUOTE (reardon @ Mar 10 2004, 05:21 PM)
QUOTE (Aero @ Mar 10 2004, 01:56 AM)
foo_pod version 0.2 is now available. 

Whoops. Spoke to soon. My iPod got blanked?

I did "Load iPod songs to ... Playlist". I added a few songs. Then I "Sent Current Playlist to iPod". It seemed to work. I asked WinXP to undock the iPod (iTunes has been turned off). It undocked properly.

When I navigated on the iPod itself, however, it was blanked completely.

I had backed up the db and just restored it. But the restore doesn't seem to work. It appears to have a corrupted db or something, because after undocking it freezes up for about 30 seconds. Then it shows a blank db.

Thoughts?

-Reardon

Sorry? unsure.gif

Hopefully the backup worked, but for whatever reason, the restore didn't. Try this:

In Windows Explorer (My Computer), go to your iPod's drive, then navigate to iPod_Control\iTunes. There should be an iTunesDB and iTunesDB.foo_pod there - delete iTunesDB, and rename or copy iTunesDB.foo_pod to iTunesDB. If you backed up before running foo_pod, then iTunesDB.foo_pod should be the one created by iTunes or whatever you used.
reardon
Hmm. Its actually pretty bad. I tried just recovering the db (as you described) but that failed. The hard drive started clicking like it had a bad block.

So I reformatted and started over. iTunes worked fine. Sync'ed 12GB of music.

Tried foo_pod. Added one track. Updated the ipod. When I did this WinXP started reporting USB level (same error on 1394 interface) bad block errors. (these always take the form of timeout errors followed by bad block reports).

Given this repro'd twice, and iTunes had no issues, I think there is some bad interaction between foo_pod and the device itself. Perhaps there is some of proprietary bus sync command that gets sent via the IPodService?

EDIT: I misread the events in the eventlog. They bad block occured earlier. Now I can't figure out what happened. The updates are not working, but it continues to read fine. Each time I start iTunes it seems to undo the foo_pod changes.

I am still concerned about the bad block errors. This may in fact just be a bad disk.

-Reardon
Aero
QUOTE (reardon @ Mar 10 2004, 06:42 PM)
Hmm.  Its actually pretty bad.  I tried just recovering the db (as you described) but that failed.  The hard drive started clicking like it had a bad block.

So I reformatted and started over.  iTunes worked fine.  Sync'ed 12GB of music.

Tried foo_pod.  Added one track.  Updated the ipod.  When I did this WinXP started reporting USB level (same error on 1394 interface) bad block errors. (these always take the form of timeout errors followed by bad block reports).

Given this repro'd twice, and iTunes had no issues, I think there is some bad interaction between foo_pod and the device itself.  Perhaps there is some of proprietary bus sync command that gets sent via the IPodService?

EDIT: I misread the events in the eventlog.  They bad block occured earlier.  Now I can't figure out what happened.  The updates are not working, but it continues to read fine.  Each time I start iTunes it seems to undo the foo_pod changes.

I am still concerned about the bad block errors.  This may in fact just be a bad disk.

I'm sorry to hear about your iPod's drive, but I am 100% sure it wasn't (directly) caused by foo_pod. All foo_pod is doing is copying song files to the iPod and generating the iTunesDB file, just like iTunes does. If the iPod is still under warranty, I'd recommend sending it back ASAP.

There might be some interaction between iTunes and foo_pod that is causing the database problem, though. Personally, I can't stand iTunes and other than trying it out a few times, I have used EphPod and now foo_pod, exclusively...I eat my own dogfood! The problem is that the iTunesDB file format is not documented by Apple, so every 3rd party program writes the file a little differently than iTunes.

I will try syncing with iTunes tonight and see if I can reproduce the database problem. Although if I understand iTunes correctly, it forces a sync from the tunes library to the iPod, so any songs not in the iTunes library will be deleted from the iPod. So if you add songs from foo_pod, then sync with iTunes, iTunes will see the foo_pod songs as out of sync files and delete them.

Someone correct me if I'm not understanding iTunes correctly, but I think this is probably the problem you are experiencing.
Otto42
QUOTE (Aero @ Mar 10 2004, 06:03 PM)
Although if I understand iTunes correctly, it forces a sync from the tunes library to the iPod, so any songs not in the iTunes library will be deleted from the iPod.  So if you add songs from foo_pod, then sync with iTunes, iTunes will see the foo_pod songs as out of sync files and delete them.

Someone correct me if I'm not understanding iTunes correctly, but I think this is probably the problem you are experiencing.

Yes, anything off in the f## directories that isn't what iTunes thinks is supposed to be there, assuming you're doing automatic syncing, gets zapped during the sync.

And there's nothing funky about how any program accesses the iPod. When the iPod is in drive mode (which it has to be to be able to talk to it at all), it's basically just an external drive. There's nothing special you do to talk to it. You create files on a drive letter in a certain directory. That's it. The "Do No Disconnect" shows up whenever the iPod is "mounted" as a drive, and the "Ok to Disconnect" shows up whenever it's connected to a computer but not currently "mounted". Simple as that. There's nothing special to it, and no way that iTunes can do anything special to it other than simple mounting and unmounting and writing files.

Thought for the future Aero: Add mount and unmount capabilities to foo_pod so that it mounts when you need it to do so and unmounts when you don't need it to be mounted. Just an idea. I'm not sure exactly how to do it under windows, but it'd be cool though. Would also eliminate the need for iTunes or Apple software to be installed to enable drive mode. smile.gif
Aero
QUOTE (Otto42 @ Mar 10 2004, 08:35 PM)
Yes, anything off in the f## directories that isn't what iTunes thinks is supposed to be there, assuming you're doing automatic syncing, gets zapped during the sync.


"isn't what iTunes thinks is supposed to be there" == an MHIT entry in the iPod's iTuneDB file for which iTunes doesn't have a matching song for in its library?


QUOTE
Thought for the future Aero: Add mount and unmount capabilities to foo_pod so that it mounts when you need it to do so and unmounts when you don't need it to be mounted. Just an idea. I'm not sure exactly how to do it under windows, but it'd be cool though. Would also eliminate the need for iTunes or Apple software to be installed to enable drive mode. smile.gif


I looked into adding unmount functionality, and it doesn't look like it be too difficult. I want it simply because it would be cool to have a global hotkey (or multimedia key) that unmounted the iPod - I am always having to turn on my monitor just to unmount the iPod, or risk foobar'ing it up by just undocking.

I'm not sure about the drive mode, though. My iPod has always Just Worked in drive mode, without having to make any changes in iTunes. Plus, can't you force drive mode by holding down the Previous and Next keys?
Otto42
QUOTE (Aero @ Mar 10 2004, 07:07 PM)
"isn't what iTunes thinks is supposed to be there" == an MHIT entry in the iPod's iTuneDB file for which iTunes doesn't have a matching song for in its library?


Assuming nothing has changed, then yes. However, you gotta remember that during an autosync, it's rebuilding the iTunesDB itself. So anything you added to the iPod using any other program will go away because the newly built iTunesDB won't have your songs in it, unless they're in iTunes library as well.

Essentially, it reads the useful data off the iPod (last played time, stars, playcount, otgplaylist). Then it erases the Playcounts and OTGPlaylist files. Then reads in the existing iTunesDB, and redoes all the MHIT records to correspond with the songs it thinks are supposed to be on the thing. That is, MHITs not in the iTunes library get removed, and MHITs that are in the library but not in the iTunesDB get added. Then it goes and checks every file in the f## dirs and deletes any without a matching MHIT. Any MHITs that don't have a matching file on the iPod get that file copied to the right place. Finally, the playlists get erased from the iTunesDB and rebuilt entirely from iTunes list of playlists.

That's a conceptual thing though... it may do it in a different order or something, but that's the gist of it. An automatic iTunes Sync does everything it has to do to make the iPod's contents identical to the iTunes Library.

Edit: Ahh, I see what you're asking. You want to know if it'll delete something in there that the iPod doesn't know about with an MHIT entry. I'm not certain, but I think it will. It's easy to test, drop a file in the f01 directory without changing the iTunesDB, then do a sync. I think iTunes will kill it, but I'm not 100% certain on that.

QUOTE (Aero @ Mar 10 2004, 07:07 PM)
I looked into adding unmount functionality, and it doesn't look like it be too difficult.  I want it simply because it would be cool to have a global hotkey (or multimedia key) that unmounted the iPod - I am always having to turn on my monitor just to unmount the iPod, or risk foobar'ing it up by just undocking.

I'm not sure about the drive mode, though.  My iPod has always Just Worked in drive mode, without having to make any changes in iTunes.  Plus, can't you force drive mode by holding down the Previous and Next keys?

Yeah, you can force drive mode, but as you can tell, the "drive mode" thing is really on the iPod firmware side of things. It goes into drive mode automatically when you connect it to a computer, regardless of what's on the computer. Unmounting it (which is the same as right clicking its drive letter and doing "Eject") will punch it back out of drive mode. Someone with iTunes or the iPod Manager software installed will get their iPod kicked back out of drive mode nearly automatically if they don't have "Enable Disk Mode" turned on. The reason you'd want a mount command is what if someone has the thing unmounted and decides to try to sync. It'd be nice to be able to mount the thing, if it's not already mounted, and sync, and then unmount again.

If I'm not mistaken, because the iPod is simply looking like an external drive, you should be able to not have any software installed (not iTunes, not the iPod Manager, nothing) and be able to hook it up and see it as a drive letter just fine. Then ejecting it will unmount it. All these software programs do is make it more seamless, in that it'll start iTunes automagically, iTunes will sync automagically, etc, etc.
Otto42
More info on SoundCheck:

Okay, I did some experimenting. Near as I can tell, the soundcheck field in the iTunesDB (which is identical to the first number in the iTunNORM comment that we've seen) is essentially telling the iPod how much to reduce the volume of the song when Sound Check is enabled. I've not seen a case where iTunes puts in a number that noticably increases the volume, and I have not tried to do so myself as of yet.

To determine the value of this field, I picked a bunch of songs in iTunes, and did a "Get Info" on them to get what that screen has as the "Volume" field. This is a number expressed in dB there. I do not exactly know what it means, but still, there's a pretty blatent relationship between this number and both the actual volume of the song and the number that iTunes puts into the soundcheck field.

The lower this number is, the louder the song is. So a "volume" of -8.6dB is an extremely loud song. Loudest I found in a quick search of my library. Songs with larger numbers are quieter. +1.5dB was the largest I found.

To show the relationship, I found the info in the soundcheck field for each song that I looked up (9 of them). Here's the results:
dB number followed by soundcheck field
+1.5 000002ca
+1.2 000002f9
+0.3 0000039d
-1.1 000002fb
-2.1 0000050b
-4.3 00000a72
-6.0 00000f65
-7.6 000016a2
-8.6 00001c75

As you can clearly see, as the volume numbers get smaller, the soundcheck field increases. Here's the same data with the hex converted to decimal:

1.5 714
1.2 761
0.3 925
-1.1 763
-2.1 1291
-4.3 2674
-6 3941
-7.6 5794
-8.6 7285

I graphed the data in excel, and while it's not enough to be sure, it looks like some kind of logarithmic expansion. I figure the weirdness around the low end is due to iTunes being funky.

Look, I'm out of my depth here. I don't know enough about what I'm doing to know what any of this means. All I really know is that if you increase the number in the sound check field, the volume on the iPod gets smaller when sound check is on. But as to correlating this to the value that MP3Gain gives you for any given file, I have no idea on what to do next. Somebody else who knows this stuff should probably take a whack at it. I'm going on vacation for 10 days now. See ya. biggrin.gif
Mike Giacomelli
As someone who spends way too much time trying to fit trendlines to bad lab data, I thought I'd take a look.

Heres your data with an exponential trendline:



Not a great fit.

However if we graph the positive and negative gains independantly and assume a linear relationship (which would be logical given the precision available), its a nearly perfect fit, but we have too few data points to draw any conclusions. Anyone want to try their hand at getting more?
Aero
Version 0.3.1 is now available.

This version adds some good stuff, such as a smarter "Send Playlist" that detects duplicate files that are already on the iPod, an Eject iPod menu item, a "Delete All Songs" features, and progress dialogs so you can monitor and cancel lengthy operations.

This release should also improve reliability when sending songs to the iPod, and fixes the crash reported by rufu (related to smart playlists).

Upcoming versions will have a real iTunes-like sync functionality, Lua scripting, and speed improvements, as well as support for building iPod playlists. I'm also open to feature suggestions and bug reports. The Eject iPod should work with all iPod versions, but it has only been tested with 3rd generation iPods, so I would appreciate feedback from 1st and 2nd generation owners.

Edit - Updated to 0.3.1 after the original posting of 0.3.

Notes from the Readme:

Version 0.3.1 - Mar 18, 2004
* Minor change from 0.3 - don't transfer file formats that the iPod can't play.
These are only MP3, AAC (.m4a and .m4p), and WAV. AIFF isn't currently supported
by foo_pod, due to a problem with Foobar's detection of AIFF.

Version 0.3 - Mar 18, 2004
* Improved reliability when writing to the iPod, hopefully reducing the
number of things that could go wrong resulting in a loss of iPod data.
* "Send Playlist To iPod" now detects duplicate files, so sending the
same file won't result in two copies on the iPod.
* Added an "Eject iPod", which allows you to safely remove the iPod from
the computer.
* Added a "Delete All iPod Music" feature, which deletes all music on the
iPod, as well as the iTunesDB file.
* Added progress dialogs, with cancel support, to "Send Playlist" and "Delete All".
* Fixed a foo_pod crash related to smart playlists (thanks for your help, rufu).
Mike Giacomelli
Very good.
mixmixmix
working well for me; thanks HEAPS!

i don't suppose any of you have any good ideas on a skin for my ipod? getting scratched tongue.gif
Aero
QUOTE (mixmixmix @ Mar 21 2004, 10:17 PM)
working well for me; thanks HEAPS!

i don't suppose any of you have any good ideas on a skin for my ipod? getting scratched tongue.gif

Thanks for the report! It was a little quiet before you and Mike G posted, so I was wondering if no one was using foo_pod, or no one was having any problems!

I have only tried one iPod skin, but I really like Speck's iPod Skin. The fit isn't perfect like the exo2 (or so I hear), but is cheap (3 pack of skins for $30 at Fry's) and the best feature is that the bottom is hinged so you can dock the iPod without removing the skin. I added 3rd party belt clip and a piece of clear plastic on the screen, so now the case is nearly perfect. I have also read accounts of people of modifying the exo2 case so that the bottom part hinges like the Speck case.
mixmixmix
sound good...but the website wants to charge 25.95 for shipping to australia - ouch....
ill have to look into getting one here or something.

anyway i suppose this is getting a bit too offtopic so ill go play with foo_pod some more

cool.gif
pnjman
Cool pugin, I've been using it for a few days now with no problems.

I hope someone works out how to convert replaygain info into soundcheck info.
Otto42
QUOTE (Mike Giacomelli @ Mar 11 2004, 11:43 PM)
As someone who spends way too much time trying to fit trendlines to bad lab data, I thought I'd take a look.

Heres your data with an exponential trendline:



Not a great fit.

However if we graph the positive and negative gains independantly and assume a linear relationship (which would be logical given the precision available), its a nearly perfect fit, but we have too few data points to draw any conclusions.  Anyone want to try their hand at getting more?

Sorry it took so long to reply. Been on vacation.

I can get as many data points as you want, but it's a bit of a laborious process for each one. I'm currently moving though and won't have internet for a while, so give me a few days on it. Think weekend or so.

Anyway, looking at your graph, I'd say that the curve there is a very good fit, given the fact that iTunes is likely *rounding* the dB number that it displays on the Get Info window. I mean, I would round it if I was programming the thing. Given this, that means that the data points can easily slide left/right on the graph a little bit.. Given that there's so much more precision in the SoundCheck field itself (ranging all the way from 0x2ca to 0x1c75, so far), then this seems somewhat more likely to me.

For starters, let's assume that the numbers are rounded to the nearest 0.1 dB. That means a 8.6 number is within 8.55 to 8.64. Now it seems like the curve you drew hits every single one of the data points, except for the anomoly at -1.1...

Looking closer at it, you might be right about the positive vs. negative info... Looking at the negatives only, it looks like a pretty good, and slightly different, curve if you assume it hits 0,0.

Edit: Just a thought, but is there any way to actually measure the sound volume using the iPod itself? Perhaps using the line output on the dock? Really, we don't have to stick to iTunes' curves and sound profiles and what have you. What we really need is to adjust the volume according to the ReplayGain data, and to do that, we really need to know the volume change that occurs due to the value in the SoundCheck field. What iTunes says the volume of the song is is irrelevant, what matters is how much the iPod changes the volume based on the data in the soundcheck field. Knowing that an iTunes volume change of -8.6dB = 1c75 is fine and dandy, if ReplayGain tels us that we need to throttle the volume down by -8.6dB, but we're then assuming that iTunes knows the iPod's sound characteristics. It'd just be nice to actually measure the blamed thing, I mean.
reardon
Been using 3.1 for several days, haven't had any further corruption problems. Thanks for moving this thing along.

A few suggestions:
1) Rather than requiring usage of iTunes to switch the iPod to drive mode, do this yourself. Of course I have no idea how this is done.

2) Would love to see playlist building/sync, glad to know its on your radar.

3) Perhaps the iPod playlist&db should be visible only when its connected, ala iTunes? I haven't thought thru this long...maybe having it always viewable is a nice feature.

4) Deletion... I presume you are doing this as part of "full sync"?

5) Long term: you've done a nice job here, this could perhaps become the hub of generic device sync with profiles for iPod, Creative players, etc.

6) Sort of new to it, but curious: what will Lua support enable?

-Reardon
Aero
QUOTE (reardon @ Mar 22 2004, 02:19 PM)
Been using 3.1 for several days, haven't had any further corruption problems.  Thanks for moving this thing along.

A few suggestions:
1) Rather than requiring usage of iTunes to switch the iPod to drive mode, do this yourself.  Of course I have no idea how this is done.

Ditto! Actually, I have never had to use iTunes to put my iPod into drive mode, so I guess I don't really understand the problem. If anyone knows of source code to do this or more information about how iTunes works, I would appreicate a pointer to it.


QUOTE
2) Would love to see playlist building/sync, glad to know its on your radar.

Yeah, this should be easy (thanks to Otto42!). I haven't used playlists much on my iPod, so this wasn't a priority until after I got read, write, and sync working. Basically, I expect that the Foobar created iPod playlists will take the name of the Foobar playlist, and the order of songs. So you should be able to create as many playlists as you want, and foo_pod will be able to determine if the files already exist on the iPod and transfer them, otherwise just create and populate the playlist on the iPod.


QUOTE
3) Perhaps the iPod playlist&db should be visible only when its connected, ala iTunes?  I haven't thought thru this long...maybe having it always viewable is a nice feature.

It will probably be an option for the foo_pod specific playlist to open/close automatically when the iPod is present.


QUOTE
4) Deletion... I presume you are doing this as part of "full sync"?

I actually already have full sync working, and it is sweet. Of course, this is coming from someone that has almost no experience with iTunes, so it probably won't be a big deal to everyone else. I'm just doing some final testing now to make sure it is reliable (no problems so far).

In 0.3, I added the "Delete All iPod Music" feature, so it is already possible to delete files, albeit in a rather heavy handed manner. Playlist Sync will make file transfer/deleting practically transparent to the Foobar user.


QUOTE
5) Long term: you've done a nice job here, this could perhaps become the hub of generic device sync with profiles for iPod, Creative players, etc.

Start up a "Buy Aero a xxx player" collection, and I'll consider it! wink.gif

I implemented this for the iPod since:
  • I have one.

  • Transferring music to the iPod isn't very easy.

  • There is a good library (iPodDB) available that makes it easy to interface Foobar with the player.

  • The existing software is either commercial (XPlay/Anapod), not very reliable (EphPod), or I just don't like (iTunes).

So to add support for additional players, I would want the majority of those requirements met.


QUOTE
6) Sort of new to it, but curious: what will Lua support enable?

Everything! I intend that all functions of foo_pod will be customizable via Lua scripting. A couple of examples off the top of my head:

1. You could write a script that detects when the iPod is docked, start a sync of a playlist or directory, then eject the iPod afterwards.

2. As discussed in earlier posts, you will be able to dynamically modify the metadata as it is being put into the iTunesDB file. So if you want the album field to show up as the artist on the iPod, you could easily do that.

3. It will make it possible to easily do smart playlists. For example, you could automatically create playlists based on genre, or any other attribute of the songs.

Lua is really just going to make it easy for power users to do whatever they want on the iPod, just by writing simple scripts. It will take a little bit of work to add to foo_pod, so Lua support is probably my lowest priority right now, although when it is implemented, it will really make foo_pod a unique iPod utility.


Thanks for your comments!
pnjman
I'm not sure if this is what you mean, but to put the ipod into disk mode without itunes you can hold down menu + play/pause to reboot the ipod and then old down the skip forward and skip backwards keys as the ipod is reloading.
Aero
QUOTE (pnjman @ Mar 22 2004, 06:02 PM)
I'm not sure if this is what you mean, but to put the ipod into disk mode without itunes you can hold down menu + play/pause to reboot the ipod and then old down the skip forward and skip backwards keys as the ipod is reloading.

I'm not sure, but Otto42 had some insight in an earlier post:
QUOTE
Yeah, you can force drive mode, but as you can tell, the "drive mode" thing is really on the iPod firmware side of things. It goes into drive mode automatically when you connect it to a computer, regardless of what's on the computer. Unmounting it (which is the same as right clicking its drive letter and doing "Eject") will punch it back out of drive mode. Someone with iTunes or the iPod Manager software installed will get their iPod kicked back out of drive mode nearly automatically if they don't have "Enable Disk Mode" turned on. The reason you'd want a mount command is what if someone has the thing unmounted and decides to try to sync. It'd be nice to be able to mount the thing, if it's not already mounted, and sync, and then unmount again.

If I'm not mistaken, because the iPod is simply looking like an external drive, you should be able to not have any software installed (not iTunes, not the iPod Manager, nothing) and be able to hook it up and see it as a drive letter just fine. Then ejecting it will unmount it. All these software programs do is make it more seamless, in that it'll start iTunes automagically, iTunes will sync automagically, etc, etc.

So I'm guessing that problems people have with the iPod not auto-mounting are due to using iTunes (without the disk mode option enabled) or the iPod Service switching the iPod out of disk mode. Since I don't use either iTunes or the iPod Service, I never experience this problem, although if I understand Otto42 correctly, the solution is to just set Enable Disk Mode in iTunes. Does anyone know of a reason why you would not want Enable Disk Mode enabled?
pnjman
Intersting.

I guess I don't get this problem as I don't use itunes or ipod service either.

Is there any standard way of mounting/unmounting an external HD?
Otto42
QUOTE (Aero @ Mar 22 2004, 04:23 PM)
Does anyone know of a reason why you would not want Enable Disk Mode enabled?

If you use iTunes for your syncing, and have Disk Mode enabled, then you have to manually eject the thing after the sync is done to be able to safely disconnect it. So I leave mine not enabled, since generally all I want to do is sync the thing. Of course, I'm not using foo_pod yet as I'm not yet fully comfortable with foobar as my music library system. Still working on it though. smile.gif

But if you use foobar for all your music needs, then I see no real reason not to enable the Disk Mode.

Something that might help people experiencing the problem is to uninstall all Apple software related to the iPod. Music Match, any of the firmware upgrade stuff, the iPod Manager program that came on the iPod CD, iTunes, everything. Then reboot and try to dock the thing. I'd be a bit surprised if it didn't go directly into drive mode on, say, an XP machine without any of the Apple software on it. Then you can simply eject that drive letter to get the "OK to disconnect" screen and, hopefully, the eject functions in foo_pod will work just as well. Then you'd be golden, I think.

But if you have iTunes installed, then you will have the iPodService installed, and just leaving Disk Mode enabled in iTunes is probably a requirement.
Aero
QUOTE (Otto42 @ Mar 22 2004, 08:18 PM)
If you use iTunes for your syncing, and have Disk Mode enabled, then you have to manually eject the thing after the sync is done to be able to safely disconnect it. So I leave mine not enabled, since generally all I want to do is sync the thing. Of course, I'm not using foo_pod yet as I'm not yet fully comfortable with foobar as my music library system. Still working on it though. smile.gif

Yeah, we need to work on you a little more to break Apple's reality distortion field and bring you over to the Foobar side!

I guess that non-disk mode is an Apple propietary transfer mode that flushes any disk caches after every write, or at least prevents any OS interaction, so it is always safe to disconnect the iPod.

QUOTE
But if you have iTunes installed, then you will have the iPodService installed, and just leaving Disk Mode enabled in iTunes is probably a requirement.

One option that might work is (temporarily) disabling the IPod Service. I have also started looking through the iPodService COM interface, and there are some interesting methods available, including Mount, Unmount, and IsMounted. So it might be possible to use the IPodService to do a lot of things that only iTunes can currently do.

Stay tuned... smile.gif


Update: Good news! I was able to access iPodService's interface, so I can now force the iPod to mount, apparently even if it isn't in disk mode (I unmounted it, got the OK to disconnect checkmark, then mounted right away without removing and redocking it).

I will try to get something posted later on tonight so people can test mount & sync.
Aero
Version 0.4 is now available.

More good stuff in the new version. Most significantly is a iTunes-like Sync Playlist feature, which will add/remove files from the iPod so that it matches the current playlist. Also, I was able to tap into the iPodService, so foo_pod will automatically mount the iPod if necessary (there is also a menu item for this). There is also a context menu item that allows you to send only selected files to the iPod.

Under the preferences, there are a few new settings - "Eject On Exit" will safely remove the iPod from the system at Foobar2000 exit. You can also set the iPod's name, the owner's name, and control the disk mode setting.

From the Readme:

Version 0.4 - March 23, 2004
* Added full iTunes-like sync support. This will transfer files to the iPod and delete
files from it so that it matches the current playlist. As this operation can involve
deleting files, make sure your playlist is as you want your whole iPod before beginning.

* Added a context menu (right mouse button) that allows an easy way to send only the
selected files in the current playlist to the iPod.

* Added several new preference items:
- Eject On Exit will safely eject the iPod when Foobar2000 exits
- iPod Name and iPod Owner's Names are just strings that you can set if you wish
- Enable Disk Mode is the equivalent of iTunes' Enable Disk Mode option. Unless
you use iTunes and do not want this enabled, I recommend checking this option.

* Added a "Mount iPod" menu option. foo_pod will also try to mount the iPod before
any iPod related activity, so you will probably only need to use this directly if
there is a problem, and you do not have Enable Disk Mode checked.
Aero
I just wanted to add that I would appreciate a lot of testing of sync, since it is probably the most likely source of problems. But also let me know about any mount iPod problems (or anything else, of course).

Also, there isn't much logging in this version and sometimes there can be long delays before the progress dialog appears. I'll fix that in the next version.
ronyzyz1
Thank you Aero. You rule my socks!
Aero
QUOTE (DocUK @ Mar 23 2004, 05:55 PM)
Thank you Aero. You rule my socks!

Thanks. It is better than smelling them!
Lew_Zealand
I must say, as a person who purchased XPlay (back when HFS+ iPods were the only thing around), foo_pod rocks. The eject/mount feature works perfectly - something Xplay hasn't been able to do in 2 years.

Technical feedback here:
WinXP Pro SP1
fb2k 0.8
foo_pod 0.4

I have a firewire CF card reader that is usually identified on my computer as the J: drive, and my iPod connected is the K: drive.

If I attempt to manipulate the (foo_pod) playlist (right-click, for example) and there is no card in the drive, I get an error "There is no disk in the drive. Please insert a disk into drive J:" There are 3 buttons - Cancel, Try Again and Continue. Choosing either "Cancel" or "Continue", I get the error a second time, and then it wil go away, and I can perform the action. Clicking "Try again" repeatedly gives the same error message.

If there is a card in the drive, I do not get this error.

Let me know if there is any additional feedback I can provide to solve this issue.
Aero
QUOTE (Lew_Zealand @ Mar 23 2004, 06:33 PM)
I must say, as a person who purchased XPlay (back when HFS+ iPods were the only thing around), foo_pod rocks.  The eject/mount feature works perfectly - something Xplay hasn't been able to do in 2 years.

I'm glad to hear that! Maybe I should contact Mediafour and offer to work on XPlay for them (I used to work about 2 blocks from their offices)... smile.gif

QUOTE
I have a firewire CF card reader that is usually identified on my computer as the J: drive, and my iPod connected is the K: drive. 

If I attempt to manipulate the (foo_pod) playlist  (right-click, for example) and there is no card in the drive, I get an error "There is no disk in the drive. Please insert a disk into drive J:"  There are 3 buttons - Cancel, Try Again and Continue.  Choosing either "Cancel" or "Continue", I get the error a second time, and then it wil go away, and I can perform the action.  Clicking "Try again" repeatedly gives the same error message. 

If there is a card in the drive, I do not get this error.

The quick answer is to go to foo_pod Preferences, and select "K:" under Force iPod Drive Letter.

The longer answer is that foo_pod locates an iPod by looking for an iPod specific file on all removable drives D: through Z:. So it is finding your removable Compact Flash drive J: before it finds the the iPod drive K:, and thus you are getting an error. By forcing the drive letter in the Prefs, you bypass this search and foo_pod will always use drive K:.

I was actually just thinking about drive letters last night while playing around with the iPodService interface, since there is a method for directly retreiving the iPod drive letter without doing this search. So I will probably add the iPodService way as the default method of locating an iPod, and only fallback on my current method if the service is not available.
anathema
Loving the plugin, Aero. Unfortunately, the latest version crashes when I try to access the foo_pod preferences, either through the preferences menu or directly through the Components --> foo_pod menu. I'll PM you the log.

Also, I was wondering whether it was in the plans to allow the user to define custom TAGZ strings for artist/title/album.
rufu
I'm also getting a crash when accessing the preferences using foobar 0.8.1 beta 2. Will PM the log.
Aero
QUOTE (anathema @ Mar 24 2004, 10:50 AM)
Loving the plugin, Aero. Unfortunately, the latest version crashes when I try to access the foo_pod preferences, either through the preferences menu or directly through the Components --> foo_pod menu. I'll PM you the log.

Thanks anathema & rufu for the logs. If anyone else is experiencing the crash, try this test version and see if it helps.

I added some more checks related to the iPodService, and also some debugging information written to the Foobar console. If you are still experiencing problems, please send me the part that either gives the iPodService version, or the "iPodService is not available" message.

QUOTE
Also, I was wondering whether it was in the plans to allow the user to define custom TAGZ strings for artist/title/album.

I'm still in the pre-planning stages for the Lua scripting support, but it will probably be something like this: There will be callbacks from foo_pod into the Lua script for various operations, like OnSyncStart(), OnFileTransfer(), OnAddFileToDB(), etc. What you will be able to do is add a OnAddFileToDB() function that intercepts the file as it is being added to the iPod database, and modify the metadata.

So if you wanted to format the artist and album for all Blues genre songs, the script might look something like:
CODE
function OnAddFileToDB(file)
 if file.GetGenre() == "Blues" then
   file.SetArtist("%tracknumber% - %_filename%")
   file.SetAlbum("%comment%")
 end
end

Any valid TAGZ format strings will be supported, so there will be quite a bit of flexibility and control over what shows up on the iPod.
reardon
QUOTE (Aero @ Mar 23 2004, 12:39 PM)
Version 0.4 is now available.

More good stuff in the new version.  Most significantly is a iTunes-like Sync Playlist feature, which will add/remove files from the iPod so that it matches the current playlist.

Ok, Sync didn't work for me. I loaded the iPod playlist into Foobar, then just as a test I immediately did a Sync. It wiped iPod clean (not just the db, it deleted all files).

Database was enabled in Foobar. (Are the iPod-resident files inserted there?)

I had previously set the playlist for foo_pod to "iPod". It is still set this way.

Also, fwiw, I am running the foo_tunes UI.

-Reardon
Aero
QUOTE (reardon @ Mar 24 2004, 03:18 PM)
Ok, Sync didn't work for me.  I loaded the iPod playlist into Foobar, then just as a test I immediately did a Sync.  It wiped iPod clean (not just the db, it deleted all files).

Database was enabled in Foobar.  (Are the iPod-resident files inserted there?)

I had previously set the playlist for foo_pod to "iPod".  It is still set this way.

Also, fwiw, I am running the foo_tunes UI.

That is sort of a bug, but also sort of "as designed". The problem is that you attempted to sync the files that were already on the iPod, and foo_pod's transfer function is designed to avoid copying files from the iPod to the same iPod.

When you synced the iPod playlist, it looked to foo_pod as you were syncing an empty playlist, so it did the correct thing and delete all files on the iPod so that it matched the playlist.

Granted, that is not an expected or good behavior, so I will fix this in the next version. Thanks for the report and sorry about wiping your iPod! :/
ronyzyz1
QUOTE (Aero @ Mar 25 2004, 12:37 AM)
QUOTE (reardon @ Mar 24 2004, 03:18 PM)
Ok, Sync didn't work for me.  I loaded the iPod playlist into Foobar, then just as a test I immediately did a Sync.  It wiped iPod clean (not just the db, it deleted all files).

Database was enabled in Foobar.  (Are the iPod-resident files inserted there?)

I had previously set the playlist for foo_pod to "iPod".  It is still set this way.

Also, fwiw, I am running the foo_tunes UI.

That is sort of a bug, but also sort of "as designed". The problem is that you attempted to sync the files that were already on the iPod, and foo_pod's transfer function is designed to avoid copying files from the iPod to the same iPod.

When you synced the iPod playlist, it looked to foo_pod as you were syncing an empty playlist, so it did the correct thing and delete all files on the iPod so that it matched the playlist.

Granted, that is not an expected or good behavior, so I will fix this in the next version. Thanks for the report and sorry about wiping your iPod! :/

Maybe just a warning dialog will suffice?
NEMO7538
Is the foo_pod source code available ?
Aero
Version 0.4.1 is now available.

This version fixes the Preferences crash reported by anathema & rufu, and improves sync so the problem experienced by reardon (syncing files from the iPod to the iPod) works correctly now. I also changed the way foo_pod locates an iPod, so users like Lew_Zealand who have multiple removable drives probably won't have to use Force iPod Drive Letter.

Fixing the sync problem was a bigger deal than I orignally expected, but it forced me to make some good and necessary improvments that will improve it for everyone. The next release will probably include playlist creation on the iPod as well as better progress dialogs, as well as fixes for any bugs that crop up.



From the Readme:

Version 0.4.1 - March 26, 2004
* Fixed a crash in Preferences reported by rufu and anathema. Also fixed a related
problem which might have caused the iPod Name and Owner's Name strings to be
corrupted or empty.

* Changed the logic in detecting the iPod drive, so it should be more reliable now.

* Improved sync, so it is now safe to sync files even if they are located on the iPod.
Aero
QUOTE (NEMO7538 @ Mar 26 2004, 03:29 PM)
Is the foo_pod source code available ?

Not currently. foo_pod is still going through major internal revisions, so it wouldn't be very useful to release the source code yet.

But the source code for iPodDB (the real guts of foo_pod) is available at http://otto.homedns.org:8888/iTunes/iPodDB.zip or I can provide a copy. As I have been adding features to foo_pod, I have been making improvements to iPodDB and sending the changes back to Otto42.
NEMO7538
QUOTE (Aero @ Mar 26 2004, 02:25 PM)
QUOTE (NEMO7538 @ Mar 26 2004, 03:29 PM)
Is the foo_pod source code available ?

Not currently. foo_pod is still going through major internal revisions, so it wouldn't be very useful to release the source code yet.

But the source code for iPodDB (the real guts of foo_pod) is available at http://otto.homedns.org:8888/iTunes/iPodDB.zip or I can provide a copy. As I have been adding features to foo_pod, I have been making improvements to iPodDB and sending the changes back to Otto42.


It seems the link (Otto) is broken ....
BTW will foo_pod source code be available in the future?
Aero
QUOTE (NEMO7538 @ Mar 26 2004, 05:15 PM)
It seems the link (Otto) is broken ....
BTW will foo_pod source code be available in the future?

I think Otto's URL is hosted on a DSL connected server, so it may not always be active.

I put a copy of what I have up at http://loodi.com/iPodDB.zip. But understand that this is an unofficial version, and may be out of date with Otto42's latest code. iPodDB.cpp and iPodDB.h are the main files - the rest are either helpers or example code (and quite likely aren't usable - I only use iPodDB.cpp/h in foo_pod).


As for the foo_pod source code - after it stablizes, I don't see a problem releasing the source code under a BSD style license (I'm not totally sure of the status of iPodDB, but from the ReadMe, it seems to be similiar).
Lew_Zealand
QUOTE (Aero @ Mar 26 2004, 03:21 PM)
* Changed the logic in detecting the iPod drive, so it should be more reliable now.


editing post: It actually still gives the error.

Aero, you can either reply via this thread or PM if you need more data.
reardon
I am slowly building a repro scenario for the "iPod is wiped" situation I've run into several times.

This morning doing a sync with the latest foo_pod I hit abort. I think restarted the sync. At the end, foo_pod thought the db was fine. I cleared the playlist and reloaded, and everything looked good. I used RealPlayer as well, just to sanity check. Everything ok there as well.

But the player itself thinks everything as been wiped. Oddly, there are two playlists on the device. On-the-go, as expected. And a blank pl just above On-the-go.

Maybe I could send you the db to check out?

EDIT: also should have noted that once it gets into this mode, iTunes can no longer see it. iPodService sees it (given that some of the data I think you rely on from there is available in foo_pod, such as the "Owner Name").

-Reardon
Aero
QUOTE (reardon @ Mar 31 2004, 12:08 AM)
I am slowly building a repro scenario for the "iPod is wiped" situation I've run into several times.

This morning doing a sync with the latest foo_pod I hit abort.  I think restarted the sync.  At the end, foo_pod thought the db was fine.  I cleared the playlist and reloaded, and everything looked good.  I used RealPlayer as well, just to sanity check.  Everything ok there as well.

But the player itself thinks everything as been wiped.  Oddly, there are two playlists on the device.  On-the-go, as expected.  And a blank pl just above On-the-go.

Do you think the problem is related to cancelling the sync (or have you experienced problems without cancelling)? In theory, it should be possible to cancel at any point and resume the sync later.

I have seen the blank playlist situation as well, and it usually means that the iTunesDB file is corrupted (which is why it looks like all of your songs were wiped out)...although it could also mean that the hidden playlist that the iPod requires was not written correctly. Actually the more I think about this, if "Load iPod Songs To The foo_pod Playlist" works, but the files don't appear on the iPod, then it is almost definitely a hidden playlist problem.

FYI: the hidden playlist is a special playlist that contains all the songs on the iPod - without this list, even though the songs are on the iPod, the iPod 'About' indicates that there are songs, and the iTunesDB is ok, the iPod won't display any songs.

QUOTE
Maybe I could send you the db to check out?

Yeah, I would like to see the iTunesDB file where this is happening to see. Please send it to foopod(at)argz.com. Just in case you don't know, the iTunesDB files is located at iPod_Control\iTunes\iTunesDB.

QUOTE
EDIT: also should have noted that once it gets into this mode, iTunes can no longer see it.  iPodService sees it (given that some of the data I think you rely on from there is available in foo_pod, such as the "Owner Name").

This still sounds like a corrupt iTunesDB file, since the Owner Name is stored in the NVRAM, not the db file.
krmathis
Great plugin! rolleyes.gif
But I really hope you add a feature to create playlists on the iPod as well. That would be the greatest...

Solaris
Aero
QUOTE (solaris @ Apr 2 2004, 09:46 AM)
Great plugin!  rolleyes.gif
But I really hope you add a feature to create playlists on the iPod as well. That would be the greatest...

Solaris

Thanks!

I have already implemented iPod Playlist creation, which will be released in 0.5 as soon as I redo the progress dialogs and look into reardon's sync problem.

There are 3 new preference items related to playlists. One just enables sending playlists to the iPod, another enables automatically creating randomized playlists, and the last allows a user-defined TAGZ format for sorting songs in the playlists.

If you enable sending playlists (enabled by default), when you do a Send or Sync Playlist, foo_pod will also create a playlist on the iPod with the same name and file order as the Foobar playlist.. That is pretty straightforwad - if you have a playlist on Foobar named "My Songs", Send/Sync Playlist will copy the necessary files to the iPod and create a "My Songs" playlist that matches the Foobar playlist.

If you enable Randomized playlist creation, foo_pod will also automatically create a "rnd_My Songs" playlist on the iPod, containing the same list of songs as "My Songs", but in a random order. I like this feature because I can leave the iPod's shuffle mode disabled, and just select the randomized playlist when I would normally have used shuffle.

The third mode is a user customizable TAGZ format string, which allows the user to create playlists sorted by artist, title, or any other valid TAGZ format. For example, setting the format to "%title%", will create a "usr_My Songs" playlist with the songs sorted by title.

Finally, I added Send All/Sync All Playlists features, which automatically sends/syncs up all Foobar playlists, rather than one at a time. It is pretty slick, and as soon as I take care of the progress and reardon's sync problem, I'll post 0.5.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.