Phil Meyer;227674 Wrote:
>
> I downloaded James' iTunesUpdate210.zip and compared iTunesUpdate.pl
> with TrackStatiTunesUpdateWin.pl, and found lots of differences in
> general between those files. Did you mean that there were no
> differences in the part of the script that would handle that part of
> the functionality?
>
> I can't use iTunesUpdate, as it apparently doesn't work when running as
> a service.
>
I think the TrackStatiTunesUpdateWin.pl is based on the 1.5.2 version
of the iTunesUpdate.pl script delivered with the iTunes Update plugin.
I should probably upgrade the TrackStat version by merging my changes
into the 2.10 script. Some of the things James has added in the 2.10
scripts are:
- Support for skipped counters in iTunes 7+ (This is not supported in
TrackStat yet)
- Support for both Mac and Windows iTunes, the 1.52 script only
supported Windows.
I've attached the patch that adds my changes to the 1.5.2 version,
unfortunately it can't be applied on the 2.1.0 version automatically.
But you should be able to see what the changes I've made does,
basically it is:
- A new optional "added" column that contains the time when the track
was added to the SlimServer library. The added time is irrelevant for
the incremental files used later, but it is needed for the initial load
which the TrackStat version supports.
- A new optional "playCount" column that contains the play count, the
iTunes Update script always increased the play count with one.
Increasing the play count works for the incremental files used later,
but for the initial load you need to write the real play count which is
what the TrackStat version does.
- A change regarding the rating field. I think this was a bug in the
iTunes Update version, where manually set rating wasn't exported
correctly. The rating values in the TrackStat files is always 0-100, so
the *20 that exist in the 1.5.2 version of the iTunes Update script
isn't needed.
I also had a look at James revision history and saw that the filetype
handling was added in the 1.7.3 version of iTunes Update. I had a
closer look and it seems like the option exist in the Plugin code when
using the direct iTunes connection, but I couldn't find the same logic
in the iTunesUpdate.pl script.
Anyway, it might be as simple as adding this particular logic to the
TrackStatiTunesUpdate.pl script. If this is the case, you should be
able to change this by changing the following rows in the
_searchiTunesWin function:
Code:
--------------------
# reverse the slashes in case SlimServer is running on UNIX
$searchTerms{location} =~ s/\//\\/g;
#replace \\ with \ - not consistent within iTunes (not in my library at
least)
$searchTerms{location} =~ s/\\\\/\\/;
--------------------
To:
Code:
--------------------
# reverse the slashes in case SlimServer is running on UNIX
$searchTerms{location} =~ s/\//\\/g;
#replace \\ with \ - not consistent within iTunes (not in my library at
least)
$searchTerms{location} =~ s/\\\\/\\/;
$searchTerms{location} =~ s/\.\W+?$//;
--------------------
I don't have the time to verify this myself at the moment, but if you
like to do the change yourself and test it I would be happy to include
it in the next version.
Phil Meyer;227674 Wrote:
> Did you have any contact with James?
No, I didn't
+-------------------------------------------------------------------+
|Filename: trackstatpatch152.txt |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=3324|
+-------------------------------------------------------------------+
--
erland
Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat, SQLPlayList, DynamicPlayList, Custom Browse,
Custom Scan, Custom Skip, Multi Library and Database Query plugins'
(http://wiki.erland.homeip.net/index.php/Category:SlimServer))
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=37986
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins