         else
           subtitles['zh-TW'][shipIdOrSth] = {} unless subtitles['zh-TW'][shipIdOrSth]
           subtitles['zh-TW'][shipIdOrSth][voiceId] = Traditionalized(text) for voiceId, text of value
-      [err] = yield fs.writeFileAsync subtitlesI18nPath['zh-TW'], JSON.stringify(subtitles['zh-TW'], null, '\t')
-  else
-    [dataBackup] = yield fs.readFileAsync subtitlesBackupPath[locale]
+      fs.writeFileSync subtitlesI18nPath['zh-TW'], JSON.stringify(subtitles['zh-TW'], null, '\t')
+  else
+    dataBackup = fs.readFileSync subtitlesBackupPath[locale]
     subtitlesBackup = JSON.parse dataBackup
     if not subtitles[locale]?.version or +subtitles[locale]?.version < +subtitlesBackup?.version
       data = dataBackup
       subtitles[locale] = subtitlesBackup
-      [err] = yield fs.writeFileAsync subtitlesI18nPath[locale], data
-  console.error err if err
+      fs.writeFileSync subtitlesI18nPath[locale], data
   dataBackup
 
 getSubtitles = async () ->

      window.success "#{__('Update Success')}(#{version})",
        stickyFor: 3000
    for lang in langs
      [err] = yield fs.writeFileAsync subtitlesI18nPath[lang], JSON.stringify(subtitles[lang], null, '\t')
      throw err if err
  catch e
    if e instanceof Error
      console.error "#{e.name}: #{e.message}\n#{e.stack}"
    else
      console.error e
    if locale isnt 'zh-TW'
      [err] = yield fs.writeFileAsync subtitlesI18nPath[locale], dataBackup[locale]
      console.error err if err
      subtitles[locale] = JSON.parse dataBackup[locale]
    # window.warn "语音字幕自动更新失败，请联系有关开发人员，并手动更新插件以更新字幕数据",
    #   stickyFor: 5000

Promise = require 'bluebird'
path = require 'path'
async = Promise.coroutine
fs = require('fs-extra')
request = Promise.promisifyAll require('request'), { multiArgs: true }
{Traditionalized} = require './traditionalized'
dbg.extra('subtitlesAudioResponse')
