IPB

Welcome Guest ( Log In | Register )

> foobar2000 General Forum Rules

This is NOT a tech support forum.
Tech support questions go to foobar2000 Tech Support forum instead.

See also: Hydrogenaudio Terms of Service.

 
Reply to this topicStart new topic
Revealing playback statistics track ID hashes, xslt
romor
post Oct 14 2012, 12:00
Post #1





Group: Members
Posts: 671
Joined: 16-January 09
Member No.: 65630



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: http://pastebin.com/raw.php?i=HL52v6BS
Copy result to "psx.xml"

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

CODE
"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
<?xml version="1.0" encoding="UTF-8"?>
<Items xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:fn="http://www.w3.org/2005/xpath-functions">
   <Item ID="984a40d944faa990"
         Artist="Robert Rich"
         Album="Rainforest"
         Title="Mbira"/>
   <Item ID="d24a08e2bd79b21d"
         Artist="Robert Rich"
         Album="Rainforest"
         Title="The Raining Room"/>
   <Item ID="f00b2c410e7a4e3e"
         Artist="Brian Eno"
         Album="Dune"
         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.


--------------------
scripts: http://goo.gl/M1qVLQ
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 2nd September 2014 - 14:10