Skip to main content

Topic: Revealing playback statistics track ID hashes (Read 1014 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • romor
  • [*][*][*][*][*]
Revealing playback statistics track ID hashes
Track ID exposure was requested several times. Here is stylesheet that can reveal it for tracks that do have some statistics: view or download

Limitation is that track needs to be played at least once, as FirstPlayed is the only reasonable unique data in exported playback statistics XML file.
Unfortunately Added is not unique, although the datetime unit is expressed in less then microsecond.

Workflow is this:

1. Export playback statistics to file (let's say to "ps.xml")

2. Select all library and by using text tools component, select advanced option, and add these patterns:
Copy result to "psx.xml"

3. Use tool that can process XSLT 2.0 instructions (i.e. saxon):

Code: [Select]
"C:\Program Files\Saxonica\SaxonHE9.4N\bin\Transform.exe" ps.xml id.xsl param="C:/temp/psx.xml"

param is path to file created with text tools (step 2), note forward slashes

Example output:

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<Items xmlns:xs=""
   <Item ID="984a40d944faa990"
         Artist="Robert Rich"
   <Item ID="d24a08e2bd79b21d"
         Artist="Robert Rich"
         Title="The Raining Room"/>
   <Item ID="f00b2c410e7a4e3e"
         Artist="Brian Eno"
         Title="Prophecy Theme"/>

Other possibility worth noting is less known playback statistics component foo_playcount_sql, which after installation imports all playback statistics from foo_playcount component and exposes SQL SE database, which can be updated by user knowing this format (it is very similar to sqlite). IMHO drawback of using foo_playcount_sql is lack of Added field.