move categories into own database
[mygpo.git] / couchdb / general / _design / episodes / views / by_slug / map.js
blob0de595df6bd8d62e731706d06b02a4d82550793c
1 function(doc)
3     if(doc.doc_type == "Episode")
4     {
5         if(doc.slug != null)
6         {
7             emit([doc.podcast, doc.slug], null);
8         }
10         if(doc.merged_slugs)
11         {
12             for(n in doc.merged_slugs)
13             {
14                 emit([doc.podcast, doc.merged_slugs[n]], null);
15             }
16         }
17     }