Rename audio functions using "url" to use "uri"

This commit is contained in:
toasted-nutbread 2020-03-07 14:37:44 -05:00
parent 391f3dd29a
commit aad4ab5ecc
4 changed files with 8 additions and 8 deletions

View File

@ -67,7 +67,7 @@ class Backend {
['noteView', this._onApiNoteView.bind(this)],
['templateRender', this._onApiTemplateRender.bind(this)],
['commandExec', this._onApiCommandExec.bind(this)],
['audioGetUrl', this._onApiAudioGetUrl.bind(this)],
['audioGetUri', this._onApiAudioGetUri.bind(this)],
['screenshotGet', this._onApiScreenshotGet.bind(this)],
['forward', this._onApiForward.bind(this)],
['frameInformationGet', this._onApiFrameInformationGet.bind(this)],
@ -513,7 +513,7 @@ class Backend {
return this._runCommand(command, params);
}
async _onApiAudioGetUrl({definition, source, optionsContext}) {
async _onApiAudioGetUri({definition, source, optionsContext}) {
const options = this.getOptions(optionsContext);
return await this.audioUriBuilder.getUri(source, definition, options);
}

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/*global getOptionsContext, getOptionsMutable, settingsSaveOptions, apiAudioGetUrl
/*global getOptionsContext, getOptionsMutable, settingsSaveOptions, apiAudioGetUri
AudioSystem, AudioSourceUI*/
let audioSourceUI = null;
@ -26,7 +26,7 @@ async function audioSettingsInitialize() {
audioSystem = new AudioSystem({
getAudioUri: async (definition, source) => {
const optionsContext = getOptionsContext();
return await apiAudioGetUrl(definition, source, optionsContext);
return await apiAudioGetUri(definition, source, optionsContext);
}
});

View File

@ -69,8 +69,8 @@ function apiTemplateRender(template, data) {
return _apiInvoke('templateRender', {data, template});
}
function apiAudioGetUrl(definition, source, optionsContext) {
return _apiInvoke('audioGetUrl', {definition, source, optionsContext});
function apiAudioGetUri(definition, source, optionsContext) {
return _apiInvoke('audioGetUri', {definition, source, optionsContext});
}
function apiCommandExec(command, params) {

View File

@ -18,7 +18,7 @@
/*global docRangeFromPoint, docSentenceExtract
apiKanjiFind, apiTermsFind, apiNoteView, apiOptionsGet, apiDefinitionsAddable, apiDefinitionAdd
apiScreenshotGet, apiForward, apiAudioGetUrl
apiScreenshotGet, apiForward, apiAudioGetUri
AudioSystem, DisplayGenerator, WindowScroll, DisplayContext, DOM*/
class Display {
@ -919,6 +919,6 @@ class Display {
async _getAudioUri(definition, source) {
const optionsContext = this.getOptionsContext();
return await apiAudioGetUrl(definition, source, optionsContext);
return await apiAudioGetUri(definition, source, optionsContext);
}
}