Posted on May 6th 2009 by pieceofsummer.
Some time ago a Mac port of Mono was released, so it made completely possible to run .NET applications there. But ArtDoctor needs to operate directly with device and was strictly tied with iTunesMobileDevice.dll, which has no analog on a Mac.
And today I’ve managed to create a fully cross-platform .NET library to deal with Apple devices. It even works without re-compiling for target platform. The trick is to use MobileDevice (dll on Windows and framework on Mac OS X) instead and apply some dll redirections for Mono.
However, it’s not just to change referenced library name. Unlike iTunesMobileDevice, MobileDevice framework doesn’t use native threads on both platforms. Also it is more strict about strings, so hand-made CFStrings most likely won’t do.
P.S. I really have no idea why both of these libraries are included in Windows distribution of Apple Mobile Device Support, ’cause they don’t even reference each other.
Posted on Mar 17th 2009 by pieceofsummer.
For some time I thought that current ArtDoctor version (1.0.2) can fix any artwork-related issues. Well, I was wrong: maybe in case of iTunes that’s true, but other managers could not be trusted a bit.
A few days ago I was trying to resolve a reported issue with “parameter is not valid” error.
At first I thought there were some changes in thumbnail formats (error was got on iTouch 2G, and I’ve never tested it on that device). Then I looked in ArtworkDB and noticed that it had invalid information inside, like overlapping offsets in cache files.
So I understood ArtDoctor must also be able to rewrite artwork database, not only cache. It still doesn’t affect main database and is safe for your player. Even if something goes wrong, you won’t lose your music.
Continue Reading »
Posted on Mar 7th 2009 by pieceofsummer.
What should you do if you need to get position of a record in DataView? Generally, DataView implements an IList interface, so you may concider calling ((IList) dataView).IndexOf(dataRowView) would do all the magic for you.
I thought in such a way before I found out, that calling IndexOf on a DataRowView being edited would return “-1″ (i.e. not found).
It happens because a DataRow creates a temporary copy of itself when calling BeginEdit() and associates a DataRowView with that copy. And calling IndexOf on DataView performs lookup through DataTable’s index, who has no idea about that temporary copy and returns nothing.
So you should finish with editing before performing any lookup.