diff --git a/app/stream/model.js b/app/stream/model.js index 6b0078039..d57e96e24 100644 --- a/app/stream/model.js +++ b/app/stream/model.js @@ -7,6 +7,7 @@ import { shareMetadata } from 'wqxr-web-client/helpers/share-metadata'; const WQXR_slugs = ["wqxr","q2","jonathan-channel","wqxr-special","wqxr-special2"]; // wqxr-special = Operavore, // wqxr-special2 = Holiday Channel +const WNYC_slugs = ["wnyc-fm939", "wnyc-am820"]; export default Model.extend({ audioType: 'stream', @@ -36,6 +37,10 @@ export default Model.extend({ return WQXR_slugs.includes(this.get('slug')); }), + isWNYC: computed('slug', function(){ + return WNYC_slugs.includes(this.get('slug')); + }), + liveWQXR: computed('isWQXR', 'whatsOn', function(){ return this.get('isWQXR') && (this.get('whatsOn') > 0); }), diff --git a/app/stream/route.js b/app/stream/route.js index bfdb7ea00..2af87d562 100644 --- a/app/stream/route.js +++ b/app/stream/route.js @@ -10,7 +10,7 @@ export default Route.extend({ return this.store.findAll('stream').then(streams => { return { wqxrStreams: streams.filterBy('isWQXR'), - otherStreams: streams.rejectBy('isWQXR') + wnycStreams: streams.filterBy('isWNYC') }; }); }, diff --git a/app/stream/template.hbs b/app/stream/template.hbs index 52f2a9f05..ce8832d38 100644 --- a/app/stream/template.hbs +++ b/app/stream/template.hbs @@ -8,7 +8,7 @@ currentAudio=audio.currentId playState=audio.playState}} {{stream-list - streams=model.otherStreams + streams=model.wnycStreams currentAudio=audio.currentId playState=audio.playState}} diff --git a/tests/acceptance/streams-test.js b/tests/acceptance/streams-test.js index 17261c86d..5d5c83a8c 100644 --- a/tests/acceptance/streams-test.js +++ b/tests/acceptance/streams-test.js @@ -32,7 +32,7 @@ test('visiting /streams', function(assert) { andThen(function() { assert.equal(currentURL(), '/streams'); - assert.equal(find('.stream-list li').length, 7, 'should display a list of streams'); + assert.equal(find('.stream-list li').length, 6, 'should display a list of streams'); assert.ok(refreshSpy.calledOnce, 'refresh was called'); }); });