MediaDB.updateMetadata() is an async function, so if we wait the callback of writing successfully in MediaDB, ui also needs to wait for it. For slowly tapping maybe this is not a problem, but if the tapping is really fast, you will see the ui is still updating after the fast tapping. And if the MediaDB encounters the problem on writing records to storage(Storage full or broken), ui might never see the ratings updates cause there will be no successful callback to update the ui.

The possible solution is we just musicdb.updateMetadata() with the new rating then this.setRatings() just right after it. If we got storage problem, we can still update the ratings without writing back the records.

This is an existed issue, so if we can also fix this in this patch, that will be very nice!