Skip to content

Commit

Permalink
Filter 'parody' from radio
Browse files Browse the repository at this point in the history
  • Loading branch information
MeoMix committed May 10, 2015
1 parent 96f20bb commit 3a3d525
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/js/background/collection/streamItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,12 @@
var tempFilteredRelatedSongs = _.filter(relatedSongs, function(relatedSong) {
// assuming things >8m are playlists.
var isJustOneSong = relatedSong.get('duration') < 480;
// TODO: I need better detection than this -- this filters out other things with the word live in it.
var isNotLive = relatedSong.get('title').toLowerCase().indexOf('live') === -1;
// TODO: I need better detection than this -- this filters out other things with the word live/parody in it.
var lowerCaseSongTitle = relatedSong.get('title').toLowerCase();
var isNotLive = lowerCaseSongTitle.indexOf('live') === -1;
var isNotParody = lowerCaseSongTitle.indexOf('parody') === -1;

return isJustOneSong && isNotLive;
return isJustOneSong && isNotLive && isNotParody;
});

if (tempFilteredRelatedSongs.length !== 0) {
Expand Down

0 comments on commit 3a3d525

Please sign in to comment.