ActivePerlでNet::DAAP::Server

iPodを持っていないので詳細なテストはできないのが残念ですが、とりあえず問題を起こしているとおぼしき箇所は見つけたのでメモっておきます。

--- Net/DAAP/Server/Track.pm.org	Mon Jun 26 02:13:56 2006
+++ Net/DAAP/Server/Track.pm	Mon Jun 26 02:16:37 2006
@@ -36,11 +36,12 @@
 
 
     my @stat = stat $file;
-    $self->dmap_itemid( $stat[1] ); # the inode should be good enough
+    my $id = $stat[7];  # Win32 doesn't support inode. Set some (hopefully) unique number instead
+    $self->dmap_itemid( $id ); # the inode should be good enough
     $self->dmap_containeritemid( 0+$self );
 
     $self->dmap_itemkind( 2 ); # music
-    $self->dmap_persistentid( $stat[1] ); # blah, this should be some 64 bit thing
+    $self->dmap_persistentid( $id ); # blah, this should be some 64 bit thing
     $self->daap_songbeatsperminute( 0 );
 
     # All mp3 files have 'info'. If it doesn't, give up, we can't read it.

Win32の場合、POE::Component::Server::HTTPの挙動やら何やらの問題もあるのでこれだけで満足に動く保証はないですが、itemidが全部0になっているせいで最後のひとつしか取れないといった症状が出ているとしたら、上記の場所にファイルサイズなり、ファイル名を数値化したIDをこさえるなりして放り込めば解決すると思われ。