QUOTE(tboehrer @ Apr 29 2004, 07:12 PM)
WARNING.... geek talk about to happen....
QUOTE
Oh, and what happens if a user closes the player before a second has elapsed? Hehehe
Since the initial time callback never arrived, it will be as if the file was never started. Upon restart, everything will work out. The end result? It will work properly to within 1 second. I believe that to be acceptable. Yes?
WARNING: User is running on fumes. Gee, I don't know why I didn't think of that. Umm, no crap? :B
QUOTE
QUOTE
I did not incorporate most of the latest changes, mainly because of the initquit hack. Hmm, maybe the variables that config variable needs to store from could be made static global, since the callback class is a static single instance anyway.
The cfg vars actually should have been static. But the fact they aren't doesn't really change anything. They are already global. i.e., playcounter sets global variables already, yes? Or are you referring to something else?
I mean the current local variables in the callback class. Since the callback is a static class, you can safely move the _played and _length variables out, rename to g_played/g_length, implement the cfg variable storage directly from on_quit.
QUOTE
QUOTE
Maybe I should just up the external requirements to HTTP server and PHP so I can reduce all the component-side overhead. The current binary is exactly 200KB.
So instead of writing to a DB you write to an HTTP service... thereby eliminating MySQL?
No, I meant using HTTP with a PHP script as a bridge to MySQL. That way, the component is only about 20-30KB, using PTypes or even simply wininet to perform the http request. Then you only have to worry about URL encoding the query strings.
QUOTE
But my ultimate concern is that being in an external store precludes searches using play count info
Which is why it is still stored in the database. Searches can reference info fields, I think...
The external database is only backup for when the user reloads the info from the file. The only problem is the uggly delayed insertion *cough*bloodyhack*cough* used to feed the info back into the database.
There might be some info insertion filters or services for such crap as this in the future, and then again, there might not.
QUOTE
Though... I've seen requests to have it external, so your changes will be useful to some. I believe I read in
Right now, the info is duplicated in readily accessible info fields, and currently, only the ReplayGain info fields are ever written to the file's tags. So, this info will never modify the files.
In the future, I can add more options for actually manipulating the data...
- Forcing reload of play count / timestamp for all files referenced in the external database (if you change the formatted tag options, they will be regenerated)
- Forcing scan of external database for entries no longer referenced in the player metadb
- Hilighting entries in the current playlist based on a query to the external database ... could be simplified to facilitate a simpler internal count database, or allow full MySQL query.
- Build a playlist based on the above
Hmm, gee, I could some day start working on a MySQL-based replacement for the core DB, if the API allowed for database replacement. I'm not too sure how I'd go about storing multiple values under the same name... (Why yes, fundamental differences in the Foobar2000 and MySQL database systems would make it hard to use MySQL as a replacement for the core DB, and they don't stop at just this.)
Hmm, now that I think about it, it wouldn't be too hard to store metadata in one table and info in another. Multi text strings in one column would be a bit of a challenge. Not to mention it would be nearly impossible to preserve original field order without a special field to indicate the original order. It would also prove fun creating new fields in the table whenever a new field name pops up....