erland wrote: 
> It doesn't matter that it's a short transaction because the scanner
> writes all the time so if it happens during scanning it's likely going
> to crash the scanner in some situations. I had issue with increasing the
> play count when the current track was played during scanning and that's
> also an extremely short transaction.
> 
> I'm using a perl if-statement like this:
> > 
Code:
--------------------
  >   > 
  > if($driver eq 'SQLite' && Slim::Music::Import->stillScanning && 
(!UNIVERSAL::can("Slim::Music::Import","externalScannerRunning") || 
Slim::Music::Import->externalScannerRunning)) {
  > # Queue rating request and do it after scanning
  > ....
  > }
  > 
--------------------
> > 
> 
> 
> 
> Yes, TrackStat have a CLI interface, it's documented on the wiki:
> http://wiki.slimdevices.com/index.php/TrackStat_plugin#CLI_interface
> 
> Just note that if you set them while scanning, you won't get the new
> rating value when reading until the scanning is finished, because all
> write requests are queued and executed after the scanner has
> finished.
> 
> Still, I definitely prefer that you use the CLI command instead of
> writing directly to the database, because if I change the database
> structure the CLI command is going to be backward compatible but the
> database might not be, for example I recently added a "urlmd5" column
> in the table which is very important to set if you add new rows to the
> TrackStat tables.

Great, the CLI is the answer then! 
NB. I was never adding rows to TrackStat, only updating.


------------------------------------------------------------------------
jezbo's Profile: http://forums.slimdevices.com/member.php?userid=9888
View this thread: http://forums.slimdevices.com/showthread.php?t=89450

_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to