Closed GoogleCodeExporter closed 9 years ago
Sorry that should have been enhancement.
Original comment by nick.gl...@lycos.com
on 3 Jul 2011 at 9:19
Once again this is good stuff. I might have some follow up questions for you!
Original comment by mellowaredev
on 4 Jul 2011 at 1:11
Emailed you some questions that were not quite appropriate to discuss on this
thread.
Original comment by mellowaredev
on 5 Jul 2011 at 1:03
OK I incorporated your patch and made one minor change in the "mdbk" OTHER
handling but other than that nothing broke and everything looks good.
I posted the latest BETA in the downloads for people to try before I deploy.
Original comment by mellowaredev
on 8 Jul 2011 at 8:30
No I don't think that will work right.
If controlling an iTunes session that can see a shared db you will end up
controlling the last shared db in the list only. I think this would be better:
{{{
for (Response resp : databases.getNested("avdb").getNested("mlcl").findArray("mlit")) {
// Local DB - mdbk = 1?
if (resp.getNumberLong("mdbk") == 1 || !resp.containsValue("mdbk")) {
this.databaseId = resp.getNumberLong("miid");
this.databasePersistentId = resp.getNumberHex("mper");
Log.d(TAG, String.format("found database-id=%s", this.databaseId));
// Radio DB - mdbk = 100?
} else if (resp.getNumberLong("mdbk") == 100) {
this.radioDatabaseName = resp.getString("minm");
this.radioDatabaseId = resp.getNumberLong("miid");
this.radioPersistentId = resp.getNumberHex("mper");
Log.d(TAG, String.format("found radio-database-id=%s", this.radioDatabaseId));
// Other DB
// mdbk = 2 = shared db?
} else {
// We have found another database
// I've seen shared libraries appear here
Log.d(TAG, "found other-database = " + resp.getString("minm"));
}
}
}}}
If the mdbk field is present it follows my new logic. Otherwise it updates the
databaseId to whatever it finds.
Original comment by nick.gl...@lycos.com
on 8 Jul 2011 at 8:44
You are right. I am testing against a server that returns only 1 database. I
will update the code as above.
Original comment by mellowaredev
on 8 Jul 2011 at 10:00
!resp.containsValue("mdbk")
should be
!resp.containsKey("mdbk")
Original comment by nick.gl...@lycos.com
on 10 Jul 2011 at 5:42
OK how does this look...
http://code.google.com/p/tunesremote-plus/source/browse/trunk/src/org/tunesremot
e/daap/Session.java?spec=svn83&r=83
Original comment by mellowaredev
on 11 Jul 2011 at 12:18
works for me
Original comment by nick.gl...@lycos.com
on 11 Jul 2011 at 8:37
Released on Android Market v 2.4.1
Original comment by mellowaredev
on 24 Aug 2011 at 8:41
Original issue reported on code.google.com by
nick.gl...@lycos.com
on 3 Jul 2011 at 9:19Attachments: