repo.or.cz
/
mygpo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
move categories into own database
[mygpo.git]
/
couchdb
/
general
/
_design
/
listeners
/
views
/
by_podcast
/
map.js
blob
2798c54d09c9d56a9a75328ae8d83a9a22f02c77
1
function(doc)
2
{
3
if(doc.doc_type == "EpisodeUserState")
4
{
5
for(var n=doc.actions.length-1; n>=0; n--)
6
{
7
var action = doc.actions[n];
8
if(action.action == "play")
9
{
10
var day = action.timestamp.slice(0, 10);
11
emit([doc.podcast, day], doc.user);
12
return;
13
}
14
}
15
}
16
}