Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - playable flag within the library table: (1 Item)
   
playable flag within the library table  
Hi all,

as you may remember we asked for an option to also mark drm-protected files as unplayable within the library-table. This
 is because we don't want the user to experience play errors due to drm-protected files. We don't want to play DRM-
Protected files at all and therefore they will be grayed out in our HMI.
Since there is no mme configuration mechanism, we've achieved this, by using the database trigger you've provided which 
toggles the playable-flag if an protected file is encountered during metadata-pass.


The downside of the is that the playable flag of drm-protected files may change between Sync pass 1 and 2. The reason 
why I'm bringing this up again, is the error handling which I'm implementing right now. The bad case is a sd card which 
consists of "only" unplayable tracks. E.g. 80 files which are already known as unplayable to the mme. The sd-card was 
removed and extended by 10 new drm-protected files and 10 new corrupt files.

The issue I'm struggling with right now is, that I need a mechanism to determine that they're now playable files at all.
 Counting the playFileErrors isn't an option since e.g. I don't know if I receive playErrors for the drm-files at all 
(dependes on the point in time where the playback happens. Before or after the db-trigger toggles the playable flag).

My prefered way would be to fire a sql statement on every filePlayError which determines the state of the playable field
 within the library table (for the fids in the current tracksession). For this I need to rely on the fact that the 
library table is up2date when the mme fires the last filePlayError. Speaking of my example above:



80 Files were skipped automatically because they are already known as unplayable
The 10 drm files were also skipped, since pass 2 was done when the playback attempt happend
At the time the 9 corrupt files generated 9 playFileErrors and the tenth file returned with another playFileError a "
select sum(playable) from library where <tracksession stmt>" would return 0, right? Or could it happen that 1 or another
 value may be returned instead?
Or put differently, on a playFileError the playable column within the library table gets updated before the according 
playFileError is emitted?


Thanks, Daniel