src/providers/subscene.js
async function getSubtitlesByFilename (filename) {
  // TODO: revamp this + add unit tests
  return getSubtitlesList(filename)
    .then(parseSearchResults)
    .then(getBestSearchResult(filename))
    .then(getSubtitlesPage)
    .then(parseDownloadLink)
    .then(downloadZip)
    .then(extractSrt)
}
async function getSubtitlesByFilename (filename) {
  // TODO: revamp this + add unit tests
  return getSubtitlesList(filename)
    .then(parseSearchResults)
    .then(getBestSearchResult(filename))
    .then(getSubtitlesPage)
    .then(parseDownloadLink)
    .then(downloadZip)
    .then(extractSrt)
}
async function getSubtitlesByFilename ( filename ) { // TODO: revamp this + add unit tests return getSubtitlesList ( filename ) . then ( parseSearchResults ) . then ( getBestSearchResult ( filename ) ) . then ( getSubtitlesPage ) . then ( parseDownloadLink ) . then ( downloadZip ) . then ( extractSrt ) }
Get subtitles for the given filename.

@param {string} filename
@returns {Promise<string>} the subtitles, formatted as .srt
Get subtitles for the given filename .