I am working on a new rating system in pMusic. I want to see how many times the track is played last week or last month.
The idea is to add 'date +%s' to the rating-index each time the track has played. The index file could look like this
Code: Select all
/root/file1.mp3| 1345641102,1345644563,1345647584,...
/root/file2.mp3| 1345623045,1345643786,1345648695,...
How many times has file2 played since 1345643390?
In other words:
How many numbers in line 2 is above 1345643390?
The list will be long, so we need a fast calculation
Thank you
Sigmund