Advertisement
Guest User

Untitled

a guest
Aug 16th, 2016
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. _buildSpotInfo(spotData){
  2. const config = this._appContext.config
  3. const httpUserName = config.authentication.user
  4. const httpPassword = config.authentication.password
  5. let dir = ''
  6. let remoteFile = config.urls.remoteServerUrl + '/remote/getStream/type/'+spotData.type+'/stm/'+spotData.file
  7. let localFileName = spotData.id
  8. switch(spotData.type){
  9. case 'custom_class':
  10. dir = config.dirs.class
  11. break;
  12. case 'courtesy':
  13. dir = config.dirs.courtesy
  14. localFileName = spotData.file
  15. remoteFile = null
  16. break;
  17. default:
  18. dir = config.dirs.spots
  19. break;
  20. }
  21. const localFile = dir+localFileName+config.spotExtension
  22. const options = {
  23. auth:{
  24. user: httpUserName ,
  25. pass: httpPassword
  26. }
  27. }
  28. return {
  29. options,
  30. localFile,
  31. remoteFile
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement