Or if you can change for me :)
Em 06/03/2014 12:25, "Jerome Lefeuvre" <notifications@github.com> escreveu:

> In js/frontend/providers/cache.js:
>
> > @@ -63,7 +63,21 @@ App.Cache = {
> >          db.transaction(function (tx) {
> >              tx.executeSql('CREATE TABLE IF NOT EXISTS ' + provider + ' (key TEXT, data TEXT)');
> >
> > -            tx.executeSql('INSERT INTO ' + provider + ' VALUES (?, ?)', [key, data]);
> > +            //Implementation to check if exist registration in db and update instead of insert
> > +            //Does a SELECT on Provider
> > +            tx.executeSql('SELECT data FROM ' + provider + ' WHERE key = ?', [key], function (tx, results) {
> > +                try {
> > +                    if (results.rows.length) {
> > +                        tx.executeSql('UPDATE ' + provider + ' SET data = ? WHERE key = ?', [data, key]);
> > +                    } else {
> > +                        tx.executeSql('INSERT INTO ' + provider + ' VALUES (?, ?)', [key, data]);
> > +                    }
> > +                } catch (e) {
>
> Why do you need a catch ? Possible to broke all ?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/popcorn-time/popcorn-app/pull/216/files#r10345675>
> .
>