repo.or.cz
/
mygpo.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
refs
|
edit
|
fork
739b3231a7c8bdf655ab863a89bea4521b475345
[mygpo.git]
/
couchdb
/
general
/
_design
/
listeners
/
views
/
by_user_podcast
/
map.js
blob
739b3231a7c8bdf655ab863a89bea4521b475345
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
emit([doc.user, doc.podcast], doc.episode);
11
return;
12
}
13
}
14
}
15
}