hey marc2003,
i got a little problem, in the old version either the new one. My Problem is, that he didn't update the lastfm playcount from songs, that are already in the customdb database.
for example:
i play the song and this is what he calls for the WshShell.Run Command:
sqlite3.exe "D:\Media\foobar2000\\"customdb_sqlite.db "INSERT INTO quicktag(url,subsong,fieldname,value) VALUES(\"930765360\",\"-1\",\"LASTFM_PLAYCOUNT_DB\",\"8\")";
The real interessting part is, that with an SQL Viewer like the firefox addon sqlitemanager i tried to UPDATE the record, instead of insert a new one, because this fails also in the sqlite viewer for the customdb database.
But when i run the following command:
"UPDATE quicktag SET value='15' WHERE url='930765360' AND fieldname='LASTFM_PLAYCOUNT_DB'";
it works. Mhm okay, lets try this with sqlite3.exe
and i run this in the cmd shell:
sqlite3.exe "D:\Media\foobar2000\\"customdb_sqlite.db "UPDATE quicktag SET value=\"9\" WHERE url=\"930765360\" AND fieldname=\"LASTFM_PLAYCOUNT_DB\""
Guess what? That works 100%, he updates the database and in foobar i see the new value (of course i have to refresh the playlist panel)
So i tried to get this working in foobar and ended with this little snippet:
if(fb.TitleFormat("%LASTFM_PLAYCOUNT_DB%").EvalWithMetadb(g_metadb)>0){
var query1 = '\"UPDATE quicktag SET value=\\"' + userplaycount + '\\" WHERE url=\\"' + crc32 + '\\" AND fieldname=\\"LASTFM_PLAYCOUNT_DB\\"\";';
WshShell.Run("sqlite3.exe \"" + fb.ProfilePath + "\\\"customdb_sqlite.db " + query1, 0, true);
}else{
while(fb.TitleFormat("%LASTFM_PLAYCOUNT_DB%").EvalWithMetadb(g_metadb) != userplaycount && attempt <=3) {
var query1 = '\"INSERT quicktag(url,subsong,fieldname,value) VALUES(\\"' + crc32 + '\\",\\"-1\\",\\"LASTFM_PLAYCOUNT_DB\\",\\"' + userplaycount + '\\")\";';
WshShell.Run("sqlite3.exe \"" + fb.ProfilePath + "\\\"customdb_sqlite.db " + query1, 0, true);
attempt++;
}
}
But unfortunately that doesn't work and i don't know why, it seems that he's not starting sqlite3.exe at all, because if i run this command exactly manually from the cmd shell, everything works. I just wonder myself why you don't update the database, i mean, if you insert a new record he seems to return a error, well .... at my computer
hope you can help me or that you have an idea of whats going on.
PS:Tried the last version of your config, your new "get all lastm data" script works really great, but he does not update the files.