On 13 March 2014 12:46, Juan Martin Runge <notifications@github.com> wrote:
>
> In mosto.js:
>
> > @@ -89,6 +100,27 @@ mosto.prototype.initDriver = function() {
> >          self.playlists.removePlaylist(id);
> >      });
> >
> > +    this.pl_driver.on('file-not-found', function(media) {
> > +        var error = self.status_driver.publishMessage(self.status_driver.CODES.FILE_NOT_FOUND, JSON.stringify(media), undefined, media.file);
> > +    });
> > +
> > +    this.playlists.on('remove:playlists', function(playlist) {
> > +        var broken = playlist.get('medias').filter(function(m) { return m.get("broken") });
> > +        broken.forEach(function(model) {
> > +            if(model.get('broken')) {
> > +                // a broken file was removed, drop messages regarding it
> > +                self.status_driver.dropMessage(self.status_driver.CODES.FILE_NOT_FOUND, model.get('broken'));
> > +            }
> > +        });
> > +    });
>
> I cant really get what you're doing here...

In mosto.js:

> @@ -89,6 +100,27 @@ mosto.prototype.initDriver = function() {
>          self.playlists.removePlaylist(id);
>      });
>
> +    this.pl_driver.on('file-not-found', function(media) {
> +        var error = self.status_driver.publishMessage(self.status_driver.CODES.FILE_NOT_FOUND, JSON.stringify(media), undefined, media.file);
> +    });
> +
> +    this.playlists.on('remove:playlists', function(playlist) {
> +        var broken = playlist.get('medias').filter(function(m) { return m.get("broken") });
> +        broken.forEach(function(model) {
> +            if(model.get('broken')) {
> +                // a broken file was removed, drop messages regarding it
> +                self.status_driver.dropMessage(self.status_driver.CODES.FILE_NOT_FOUND, model.get('broken'));
> +            }
> +        });
> +    });

I cant really get what you're doing here...



That was a leftover from the original code by Tom. He also checked for
missing files and marked them as broken. I can remove it until that
feature is ready.