[Migration] remove unused imports
[mygpo.git] / couchdb / general / _design / podcasts / views / by_id / map.js
blob178c370eba01401324c7fc7ddbe3384516df330f
1 function(doc)
3     function searchPodcast(podcast_id, podcast)
4     {
5         emit(podcast_id, null);
7         for(var n in podcast.merged_ids)
8         {
9             emit(podcast.merged_ids[n], null);
10         }
11     }
13     if(doc.doc_type == "Podcast")
14     {
15         searchPodcast(doc._id, doc);
16     }
17     else if(doc.doc_type == "PodcastGroup")
18     {
19         for(var n in doc.podcasts)
20         {
21             var podcast = doc.podcasts[n];
22             searchPodcast(podcast.id, podcast);
23         }
24     }