Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
[FIX] Import & displayable track
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingrub authored and m4dz committed Apr 29, 2016
1 parent 5d3d338 commit 7d4a9a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/collections/tracks.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ cozysdk.defineRequest('Track', 'oldDoctype', (doc) => {
});

cozysdk.defineRequest('Track', 'playable', (doc) => {
if (!doc.hidden && !doc._attachments) {
if (!doc.hidden && doc.metas) {
emit(doc._id, doc);
}
}, (error, response) => {
Expand Down
6 changes: 5 additions & 1 deletion app/libs/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ function getTrack(track, callback) {
function getBinary(track, callback) {
let binaryId = track.binary.file.id;
cozysdk.find('Binary', binaryId, (err, binary) => {
migrateTrack(track, binary, callback);
if (binary._attachments) {
migrateTrack(track, binary, callback);
} else {
callback();
}
});
}

Expand Down

0 comments on commit 7d4a9a5

Please sign in to comment.