diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-02-05 00:07:47 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-02-05 00:07:47 (GMT) |
commit | ca488f8d3609500b89b95c6c2ff6c533e62a7aea (patch) | |
tree | 746431dd97ede28079c87a3951153a0c5fb114e1 /www | |
parent | ee29206687484d49df4c77bd4d634080f1c7dca4 (diff) |
rename rivendell.js to rdxport.js
Diffstat (limited to 'www')
-rw-r--r-- | www/index.html | 4 | ||||
-rw-r--r-- | www/js/apps.js | 4 | ||||
-rw-r--r-- | www/js/auth.js | 4 | ||||
-rw-r--r-- | www/js/rdxport.js (renamed from www/js/rivendell.js) | 102 | ||||
-rw-r--r-- | www/js/rdxport.rh.js (renamed from www/js/rivendell.rh.js) | 16 |
5 files changed, 65 insertions, 65 deletions
diff --git a/www/index.html b/www/index.html index 2a3f28f..706a190 100644 --- a/www/index.html +++ b/www/index.html @@ -18,8 +18,8 @@ <script src="/javascript/jquery/jquery.min.js"></script> <script src="/javascript/bootstrap/js/bootstrap.min.js"></script> <script src="/js/dropzone.js"></script> - <script src="/js/rivendell.js"></script> - <script src="/js/rivendell.rh.js"></script> + <script src="/js/rdxport.js"></script> + <script src="/js/rdxport.rh.js"></script> <script src="/js/utils.js"></script> <script src="/js/clock.js"></script> <script src="/js/importer.js"></script> diff --git a/www/js/apps.js b/www/js/apps.js index 1c04526..ab5d4b9 100644 --- a/www/js/apps.js +++ b/www/js/apps.js @@ -101,7 +101,7 @@ function apps_init() { if(auth_token && auth_username) { // todo: do this at a central place - rivendell = new Rivendell.Rivendell(auth_username, auth_token, '/rd-bin/rdxport.cgi'); + rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi'); rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi'); rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi'); @@ -111,7 +111,7 @@ function apps_init() { $(window).on('popstate', function(event) { if(auth_token && auth_username) { // todo: do this at a central place - rivendell = new Rivendell.Rivendell(auth_username, auth_token, '/rd-bin/rdxport.cgi'); + rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi'); rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi'); rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi'); diff --git a/www/js/auth.js b/www/js/auth.js index c9fe52e..df09ce6 100644 --- a/www/js/auth.js +++ b/www/js/auth.js @@ -39,7 +39,7 @@ function auth_loginSuccess(data) { sessionStorage.setItem("auth_token", auth_token); // todo: do this at a central place - rivendell = new Rivendell.Rivendell(auth_username, auth_token, '/rd-bin/rdxport.cgi'); + rivendell = new Rivendell.Rdxport(auth_username, auth_token, '/rd-bin/rdxport.cgi'); rivendell.setListDropboxesEndpoint('/rh-bin/listdropboxes.cgi'); rivendell.setMusicgridEndpoint('/rh-bin/musicgrid.cgi'); @@ -89,7 +89,7 @@ function auth_init() { $("#loginform").submit(function(event) { event.preventDefault(); - Rivendell.Rivendell.authLogin( + Rivendell.Rdxport.authLogin( '/rh-bin/authtoken.json', $("#username").val(), $("#password").val(), diff --git a/www/js/rivendell.js b/www/js/rdxport.js index 0f4bcda..633b89e 100644 --- a/www/js/rivendell.js +++ b/www/js/rdxport.js @@ -24,23 +24,23 @@ var Rivendell = Rivendell || {}; -Rivendell.Rivendell = function(username, token, rdxportEndpoint) { +Rivendell.Rdxport = function(username, token, endpoint) { this.username = username; this.token = token; - this.rdxportEndpoint = rdxportEndpoint; + this.endpoint = endpoint; }; -Rivendell.Rivendell.prototype.listLog = function(name, success) { +Rivendell.Rdxport.prototype.listLog = function(name, success) { var command = { COMMAND: 22, LOGIN_NAME: this.username, PASSWORD: this.token, NAME: name }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listLogs = function(success) { +Rivendell.Rdxport.prototype.listLogs = function(success) { var command = { COMMAND: 20, LOGIN_NAME: this.username, @@ -49,10 +49,10 @@ Rivendell.Rivendell.prototype.listLogs = function(success) { /*SERVICE_NAME: serviceName, TRACKABLE: trackable*/ }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listServices = function(success) { +Rivendell.Rdxport.prototype.listServices = function(success) { var command = { COMMAND: 21, LOGIN_NAME: this.username, @@ -60,29 +60,29 @@ Rivendell.Rivendell.prototype.listServices = function(success) { //todo: fix optionals /*TRACKABLE: trackable*/ }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listGroups = function(success) { +Rivendell.Rdxport.prototype.listGroups = function(success) { var command = { COMMAND: 4, LOGIN_NAME: this.username, PASSWORD: this.token }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listGroup = function(groupName, success) { +Rivendell.Rdxport.prototype.listGroup = function(groupName, success) { var command = { COMMAND: 5, LOGIN_NAME: this.username, PASSWORD: this.token, GROUP_NAME: groupName }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listCarts = function(groupName, includeCuts, success) { +Rivendell.Rdxport.prototype.listCarts = function(groupName, includeCuts, success) { var command = { COMMAND: 6, LOGIN_NAME: this.username, @@ -90,10 +90,10 @@ Rivendell.Rivendell.prototype.listCarts = function(groupName, includeCuts, succe GROUP_NAME: groupName, INCLUDE_CUTS: includeCuts }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listCart = function(cartNumber, includeCuts, success) { +Rivendell.Rdxport.prototype.listCart = function(cartNumber, includeCuts, success) { var command = { COMMAND: 7, LOGIN_NAME: this.username, @@ -101,10 +101,10 @@ Rivendell.Rivendell.prototype.listCart = function(cartNumber, includeCuts, succe CART_NUMBER: cartNumber, INCLUDE_CUTS: includeCuts }; - return $.post(this.rdxportEndpoint, command, success); + return $.post(this.endpoint, command, success); }; -Rivendell.Rivendell.prototype.addCart = function(groupName, type, cartNumber, success) { +Rivendell.Rdxport.prototype.addCart = function(groupName, type, cartNumber, success) { var command = { COMMAND: 12, LOGIN_NAME: this.username, @@ -115,38 +115,38 @@ Rivendell.Rivendell.prototype.addCart = function(groupName, type, cartNumber, su if (cartNumber !== null) { command.CART_NUMBER = cartNumber; } - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.editCart = function(cartNumber, options, success) { +Rivendell.Rdxport.prototype.editCart = function(cartNumber, options, success) { options.COMMAND = 14; options.LOGIN_NAME = this.username; options.PASSWORD = this.token; options.CART_NUMBER = cartNumber; - return $.post(this.rdxportEndpoint, options, success, 'xml'); + return $.post(this.endpoint, options, success, 'xml'); }; -Rivendell.Rivendell.prototype.removeCart = function(cartNumber, success) { +Rivendell.Rdxport.prototype.removeCart = function(cartNumber, success) { var command = { COMMAND: 13, LOGIN_NAME: this.username, PASSWORD: this.token, CART_NUMBER: cartNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listCuts = function(cartNumber, success) { +Rivendell.Rdxport.prototype.listCuts = function(cartNumber, success) { var command = { COMMAND: 9, LOGIN_NAME: this.username, PASSWORD: this.token, CART_NUMBER: cartNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.listCut = function(cartNumber, cutNumber, success) { +Rivendell.Rdxport.prototype.listCut = function(cartNumber, cutNumber, success) { var command = { COMMAND: 8, LOGIN_NAME: this.username, @@ -154,29 +154,29 @@ Rivendell.Rivendell.prototype.listCut = function(cartNumber, cutNumber, success) CART_NUMBER: cartNumber, CUT_NUMBER: cutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.addCut = function(cartNumber, success) { +Rivendell.Rdxport.prototype.addCut = function(cartNumber, success) { var command = { COMMAND: 10, LOGIN_NAME: this.username, PASSWORD: this.token, CART_NUMBER: cartNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.editCut = function(cartNumber, cutNumber, options, success) { +Rivendell.Rdxport.prototype.editCut = function(cartNumber, cutNumber, options, success) { options.COMMAND = 15; options.LOGIN_NAME = this.username; options.PASSWORD = this.token; options.CART_NUMBER = cartNumber; options.CUT_NUMBER = cutNumber; - return $.post(this.rdxportEndpoint, options, success, 'xml'); + return $.post(this.endpoint, options, success, 'xml'); }; -Rivendell.Rivendell.prototype.addAndEditCut = function(cartNumber, options, success) { +Rivendell.Rdxport.prototype.addAndEditCut = function(cartNumber, options, success) { var self = this; var returnJqXHR = null; return this.addCut(cartNumber, success) @@ -186,7 +186,7 @@ Rivendell.Rivendell.prototype.addAndEditCut = function(cartNumber, options, succ }); }; -Rivendell.Rivendell.prototype.removeCut = function(cartNumber, cutNumber, success) { +Rivendell.Rdxport.prototype.removeCut = function(cartNumber, cutNumber, success) { var command = { COMMAND: 11, LOGIN_NAME: this.username, @@ -194,7 +194,7 @@ Rivendell.Rivendell.prototype.removeCut = function(cartNumber, cutNumber, succes CART_NUMBER: cartNumber, CUT_NUMBER: cutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; /** @@ -207,7 +207,7 @@ Rivendell.Rivendell.prototype.removeCut = function(cartNumber, cutNumber, succes * @param success * @returns {*} */ -Rivendell.Rivendell.prototype.copyCut = function(sourceCartNumber, sourceCutNumber, +Rivendell.Rdxport.prototype.copyCut = function(sourceCartNumber, sourceCutNumber, destinationCartNumber, success) { var self = this; var returnJqXHR = null; @@ -234,7 +234,7 @@ Rivendell.Rivendell.prototype.copyCut = function(sourceCartNumber, sourceCutNumb * @param destinationCartNumber * @param success */ -Rivendell.Rivendell.prototype.moveCut = function(sourceCartNumber, sourceCutNumber, +Rivendell.Rdxport.prototype.moveCut = function(sourceCartNumber, sourceCutNumber, destinationCartNumber, success) { var self = this; var returnJqXHR = null; @@ -244,7 +244,7 @@ Rivendell.Rivendell.prototype.moveCut = function(sourceCartNumber, sourceCutNumb return returnJqXHR; }; -Rivendell.Rivendell.prototype.copyAudio = function(sourceCartNumber, sourceCutNumber, +Rivendell.Rdxport.prototype.copyAudio = function(sourceCartNumber, sourceCutNumber, destinationCartNumber, destinationCutNumber, success) { var command = { COMMAND: 18, @@ -255,10 +255,10 @@ Rivendell.Rivendell.prototype.copyAudio = function(sourceCartNumber, sourceCutNu DESTINATION_CART_NUMBER: destinationCartNumber, DESTINATION_CUT_NUMBER: destinationCutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.audioInfo = function(cartNumber, cutNumber, success) { +Rivendell.Rdxport.prototype.audioInfo = function(cartNumber, cutNumber, success) { var command = { COMMAND: 19, LOGIN_NAME: this.username, @@ -266,19 +266,19 @@ Rivendell.Rivendell.prototype.audioInfo = function(cartNumber, cutNumber, succes CART_NUMBER: cartNumber, CUT_NUMBER: cutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.audioStore = function(success) { +Rivendell.Rdxport.prototype.audioStore = function(success) { var command = { COMMAND: 23, LOGIN_NAME: this.username, PASSWORD: this.token }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.import = function(cartNumber, cutNumber, channels, normalizationLevel, autotrimLevel, +Rivendell.Rdxport.prototype.import = function(cartNumber, cutNumber, channels, normalizationLevel, autotrimLevel, useMetadata, filename, success) { var command = { COMMAND: 2, @@ -292,10 +292,10 @@ Rivendell.Rivendell.prototype.import = function(cartNumber, cutNumber, channels, USE_METADATA: useMetadata, FILENAME: filename }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.export = function(cartNumber, cutNumber, format, channels, sampleRate, bitRate, +Rivendell.Rdxport.prototype.export = function(cartNumber, cutNumber, format, channels, sampleRate, bitRate, quality, startPoint, endPoint, normalizationLevel, enableMetadata, success) { var command = { @@ -314,10 +314,10 @@ Rivendell.Rivendell.prototype.export = function(cartNumber, cutNumber, format, c NORMALIZATION_LEVEL: normalizationLevel, ENABLE_METADATA: enableMetadata }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.exportPeaks = function(cartNumber, cutNumber, success) { +Rivendell.Rdxport.prototype.exportPeaks = function(cartNumber, cutNumber, success) { var command = { COMMAND: 16, LOGIN_NAME: this.username, @@ -325,10 +325,10 @@ Rivendell.Rivendell.prototype.exportPeaks = function(cartNumber, cutNumber, succ CART_NUMBER: cartNumber, CUT_NUMBER: cutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.trimAudio = function(cartNumber, cutNumber, trimLevel, success) { +Rivendell.Rdxport.prototype.trimAudio = function(cartNumber, cutNumber, trimLevel, success) { var command = { COMMAND: 17, LOGIN_NAME: this.username, @@ -337,10 +337,10 @@ Rivendell.Rivendell.prototype.trimAudio = function(cartNumber, cutNumber, trimLe CUT_NUMBER: cutNumber, TRIM_LEVEL: trimLevel }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; -Rivendell.Rivendell.prototype.deleteAudio = function(cartNumber, cutNumber, success) { +Rivendell.Rdxport.prototype.deleteAudio = function(cartNumber, cutNumber, success) { var command = { COMMAND: 3, LOGIN_NAME: this.username, @@ -348,7 +348,7 @@ Rivendell.Rivendell.prototype.deleteAudio = function(cartNumber, cutNumber, succ CART_NUMBER: cartNumber, CUT_NUMBER: cutNumber }; - return $.post(this.rdxportEndpoint, command, success, 'xml'); + return $.post(this.endpoint, command, success, 'xml'); }; Rivendell.GroupList = function(rivendell) { diff --git a/www/js/rivendell.rh.js b/www/js/rdxport.rh.js index a41ccd3..a80e6de 100644 --- a/www/js/rivendell.rh.js +++ b/www/js/rdxport.rh.js @@ -24,7 +24,7 @@ var Rivendell = Rivendell || {}; -Rivendell.Rivendell.authLogin = function(authEndpoint, username, password, success) { +Rivendell.Rdxport.authLogin = function(authEndpoint, username, password, success) { return $.ajax(authEndpoint, { username: username, password: password, @@ -34,15 +34,15 @@ Rivendell.Rivendell.authLogin = function(authEndpoint, username, password, succe }); }; -Rivendell.Rivendell.prototype.setListDropboxesEndpoint = function(listDropboxesEndpoint) { +Rivendell.Rdxport.prototype.setListDropboxesEndpoint = function(listDropboxesEndpoint) { this.listDropboxesEndpoint = listDropboxesEndpoint; }; -Rivendell.Rivendell.prototype.setMusicgridEndpoint = function(musicgridEndpoint) { +Rivendell.Rdxport.prototype.setMusicgridEndpoint = function(musicgridEndpoint) { this.musicgridEndpoint = musicgridEndpoint; }; -Rivendell.Rivendell.prototype.listDropboxes = function(type, success) { +Rivendell.Rdxport.prototype.listDropboxes = function(type, success) { var command = { LOGIN_NAME: this.username, PASSWORD: this.token @@ -54,17 +54,17 @@ Rivendell.Rivendell.prototype.listDropboxes = function(type, success) { }; // see: https://github.com/ElvishArtisan/rivendell/pull/100 -Rivendell.Rivendell.prototype.addAndEditCut = function(cartNumber, options, success) { +Rivendell.Rdxport.prototype.addAndEditCut = function(cartNumber, options, success) { options.COMMAND = 10; options.LOGIN_NAME = this.username; options.PASSWORD = this.token; options.CART_NUMBER = cartNumber; - return $.post(this.rdxportEndpoint, options, success, "xml"); + return $.post(this.endpoint, options, success, "xml"); }; // todo: addAndEditCart -Rivendell.Rivendell.prototype.getMusicgrid = function(success) { +Rivendell.Rdxport.prototype.getMusicgrid = function(success) { var command = { LOGIN_NAME: this.username, PASSWORD: this.token @@ -72,7 +72,7 @@ Rivendell.Rivendell.prototype.getMusicgrid = function(success) { return $.get(this.musicgridEndpoint, command, success, "xml"); }; -Rivendell.Rivendell.prototype.setMusicgrid = function(dow, hour, name, success) { +Rivendell.Rdxport.prototype.setMusicgrid = function(dow, hour, name, success) { var command = { LOGIN_NAME: this.username, PASSWORD: this.token, |