Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarrough committed Jul 13, 2018
1 parent 7606b26 commit baaf053
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/components/track-edit/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export default TrackFormComponent.extend({

setMediaAvailable: task(function * (event) {
event.preventDefault()
set(this, 'track.mediaNotAvailable', false)
yield set(this, 'track.mediaNotAvailable', false)
}).drop()
})
2 changes: 1 addition & 1 deletion app/models/track.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default Model.extend(Validations, {

let mediaNotAvailable = yield !fetchTrackAvailability(ytid)

if(mediaNotAvailable) {
if (mediaNotAvailable) {
this.set('mediaNotAvailable', true)
} else {
this.set('mediaNotAvailable', false)
Expand Down
3 changes: 2 additions & 1 deletion app/services/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ export default Service.extend({
get(this, 'store').findRecord('track', event.track.id)
.then(track => {
// only set media as not-available for track owner (for now)
if(channel.get('id') === track.get('channel.id')) {
const isOwner = channel.get('id') === track.get('channel.id')
if (isOwner) {
track.set('mediaNotAvailable', true);
track.save();
}
Expand Down
1 change: 0 additions & 1 deletion app/utils/youtube-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const fetchTitle = async function (ytid) {
return data && data.snippet.title
}


const fetchTrackAvailability = async function (ytid) {
// let data = await fetchYoutubeTrack(ytid, 'items(id,status)&part=status')
let data = await fetchYoutubeTrack(ytid, 'items(id,snippet(title))&part=snippet');
Expand Down

0 comments on commit baaf053

Please sign in to comment.