Skip to content

Commit

Permalink
Tested code 2.0.0
Browse files Browse the repository at this point in the history
(5612dfb commit of server code-internal note)
  • Loading branch information
ravibail committed May 26, 2018
1 parent 94b14af commit 54c1264
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 54 deletions.
39 changes: 27 additions & 12 deletions README.md
Expand Up @@ -2,19 +2,34 @@

Server code to manage piSignage players in a LAN or Private Network or to setup your own server!

**Upgrading to latest from existing versions**


1. Change to pisignage-server directory where you have pulled the code last time
1. Issue the command `git pull origin master`
***IMPORTANT: If you are upadating from before 24 Nov 2016, after git pull, please change the uri variable in config/env/development.js to 'mongodb://localhost/pisignage-dev' to retain the old data***

1. Apply your code changes if any
1. Start the pisignage-server and go to url localhost:3000
1. Enter the username of yours at pisignage.com (not the email ID) (or change under settings, otherwise player license will not be enabled)
1. Default authentication credentials for player webUI has been changed to pi:pi
1. New settings tab has been added for settings instead of config/env/all.js file
1. New player software upgrades are automatically pulled to the server and you can upgrade from the local server itself
1. Upload new licenses bought to the local server so that they are automatically installed in the pi
1. Authentication has been added to the server UI which can be changed under settings (default pi:pi)


##2.0.0 compatible release-features

1. Introduction of domination playlist
1. Play multiple assets when a advertisement event is triggered
1. PDF slide mode
1. Media RSS option to show only text
1. Zoom and sending keystrokes option for webpage links (can be used for login and other uses)
1. Blend transition mode
1. Option to use youtube-dl, disable welcome screen
1. Letterboxed and stretched mode for video and image

## New version 1.9.5a has been released!
**Upgrading to 1.9.5a from existing versions**
1. git pull origin master and apply your code changes if any
1. If you are upadating from before 24 Nov 2016, please change the uri variable in config/env/development.js to 'mongodb://localhost/pisignage-dev' to retain the old data
2. start the pisignage-server and go to url localhost:3000
3. Enter the username of yours at pisignage.com (not the email ID) (or change under settings, otherwise player license will not be enabled)
4. Default authentication credentials for player webUI has been changed to pi:pi
5. New settings tab has been added for settings instead of config/env/all.js file
6. New player software upgrades are automatically pulled to the server and you can upgrade from the local server itself
7. Upload new licenses bought to the local server so that they are automatically installed in the pi
8. Authentication has been added to the server UI which can be changed under settings (default pi:pi)

## Getting Started

Expand Down
2 changes: 2 additions & 0 deletions app/models/settings.js
Expand Up @@ -12,6 +12,8 @@ var SettingsSchema = new Schema({
url: {type: String},
sshPassword: {type: String, default: null},
enableLog : {type: Boolean, default: false},
hideWelcomeNotice: {type: Boolean, default: false},
enableYoutubeDl : {type: Boolean, default: false},
authCredentials: {
user: {type: String , default: 'pi'},
password: {type: String , default: 'pi'}
Expand Down
12 changes: 12 additions & 0 deletions public/app/js/controllers/assets.js
Expand Up @@ -597,6 +597,18 @@ angular.module('piAssets.controllers',[])
}
}

$scope.saveNewChanges = function(){
$http
.post(piUrls.links ,{ details : $scope.urlLink} )
.then(function(response) {
var data = response.data;
$scope.linkform.$setPristine();
},function(response){
console.log(response);
})
}


$scope.delete= function(index){
piPopup.confirm("File "+$state.params.file, function() {
$http
Expand Down
9 changes: 7 additions & 2 deletions public/app/partials/asset-details.html
Expand Up @@ -12,7 +12,7 @@
</audio>
<iframe ng-if="filedetails.type==&quot;html&quot;" ng-src="{{ filedetails.path }}"></iframe>
<iframe ng-if="filedetails.type==&quot;pdf&quot;" height="300px" width="100%" ng-src="{{filedetails.path}}"></iframe>
<div ng-if="fileType==&quot;link&quot;">
<form role="form" name="linkform" ng-show="fileType==&quot;link&quot;">
<div ng-if="urlLink.type != '.txt'" class="row">
<div class="col-xs-2 col-xs-offset-1">
<h4 class="text-muted">Address</h4>
Expand Down Expand Up @@ -102,7 +102,12 @@ <h4 class="text-muted">Item duration</h4>
</div>
<div class="col-sm-6"><small>for key definitions refer http://robotjs.io/docs/syntax#keys</small></div>
</div>
</div>
<div class="row">
<div class="col-sm-3 col-sm-offset-2">
<button ng-disabled="!(linkform.$dirty &amp;&amp; linkform.$valid)" ng-click="saveNewChanges()" class="btn btn-success">Update</button>
</div>
</div>
</form>
<div ng-if="(fileType==&quot;gcal&quot;) &amp;&amp; calendar.list.length">
<h4><strong> Profile</strong></h4>
<div class="media">
Expand Down
6 changes: 5 additions & 1 deletion public/app/partials/asset-details.jade
Expand Up @@ -9,7 +9,7 @@
source(ng-src='{{filedetails.path}}',type="audio/mpeg")
iframe(ng-if='filedetails.type=="html"', ng-src='{{ filedetails.path }}')
iframe(ng-if='filedetails.type=="pdf"',height="300px",width="100%",ng-src='{{filedetails.path}}')
div(ng-if='fileType=="link"')
form(role="form",name="linkform",ng-show='fileType=="link"')
.row(ng-if="urlLink.type != '.txt'")
.col-xs-2.col-xs-offset-1
h4.text-muted Address
Expand Down Expand Up @@ -82,6 +82,10 @@
.col-sm-6
small for key definitions refer http://robotjs.io/docs/syntax#keys

.row
.col-sm-3.col-sm-offset-2
button.btn.btn-success(ng-disabled='!(linkform.$dirty && linkform.$valid)',ng-click="saveNewChanges()") Update


div(ng-if='(fileType=="gcal") && calendar.list.length')
h4: strong Profile
Expand Down
35 changes: 18 additions & 17 deletions public/app/partials/playlist-add.html
Expand Up @@ -43,23 +43,24 @@ <h6>{{file.fileDetails.name }}</h6>
<button ng-if="file.playlistDetails[zone]" ng-click="removeLinkFile(file,zone)" class="btn btn-xs btn-warning">X</button>
</div></span></small></div>
</div>
<div ng-show="file.fileDetails.type == &quot;video&quot;" class="col-sm-3">
<label title="mute the audio" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }"/><span class="pl-5">mute audio</span>
</label>
</div>
<div ng-show="file.fileDetails.type == &quot;audio&quot; || file.fileDetails.type == &quot;radio&quot;" class="col-sm-3">
<label title="play in background" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }" ng-true-value="false" ng-false-value="true" ng-checked="file.playlistDetails.option.main !== true"/><span class="pl-5"> play in background</span>
</label>
</div>
<div ng-show="file.fileDetails.type == &quot;pdf&quot;" class="col-sm-3">
<label title="use presentation mode" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }"/><span class="pl-5">use presentation mode</span>
</label>
<input ng-show="file.playlistDetails.option.main" type="number" ng-model="file.playlistDetails.option.subduration" min="1" placeholder="duration for each slide" ng-model-options="{ debounce: 500 }" class="form-control input-sm"/>
</div>
<div class="col-sm-1 pull-right"><a title="{{'Duplicate this asset to add multiple times in the playlist'}}" ng-click="makeCopy(file,$index)" class="btn btn-xs btn-link"><i class="fa fa-copy"></i></a>
<div class="row">
<div ng-show="file.fileDetails.type == &quot;video&quot;" class="col-sm-3">
<label title="mute the audio" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }"/><span class="pl-5">mute audio</span>
</label>
</div>
<div ng-show="file.fileDetails.type == &quot;audio&quot; || file.fileDetails.type == &quot;radio&quot;" class="col-sm-3">
<label title="play in background" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }" ng-true-value="false" ng-false-value="true" ng-checked="file.playlistDetails.option.main !== true"/><span class="pl-5"> play in background</span>
</label>
</div>
<div ng-show="file.fileDetails.type == &quot;pdf&quot;" class="col-sm-3">
<label title="use presentation mode" class="btn btn-link text-muted">
<input type="checkbox" ng-model="file.playlistDetails.option.main" ng-model-options="{ debounce: 500 }"/><span class="pl-5">use presentation mode</span>
</label>
<input ng-show="file.playlistDetails.option.main" type="number" ng-model="file.playlistDetails.option.subduration" min="1" placeholder="duration for each slide" ng-model-options="{ debounce: 500 }" class="form-control input-sm"/>
</div>
<div class="col-sm-1 pull-right"><a title="{{'Duplicate this asset to add multiple times in the playlist'}}" ng-click="makeCopy(file,$index)" class="btn btn-xs btn-link"><i class="fa fa-copy"></i></a></div>
<!--span(ng-show="asset.showAssets.playlist.layout != '2bp' && asset.showAssets.playlist.layout != '2bp270'")-->
<!-- button.btn.btn-xs.btn-info(ng-click="linkFile(file.playlistDetails,'side')")-->
<!-- span Side Zone:&nbsp; {{file.playlistDetails.side || "Select a file"}}-->
Expand Down
41 changes: 21 additions & 20 deletions public/app/partials/playlist-add.jade
Expand Up @@ -50,27 +50,28 @@
i.fa.fa-paperclip(ng-if="!file.playlistDetails[zone]")
button.btn.btn-xs.btn-warning(ng-if="file.playlistDetails[zone]",
ng-click="removeLinkFile(file,zone)") X
.col-sm-3(ng-show='file.fileDetails.type == "video"')
label.btn.btn-link.text-muted(title='mute the audio')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }")
span.pl-5 mute audio
.col-sm-3(ng-show='file.fileDetails.type == "audio" || file.fileDetails.type == "radio"')
label.btn.btn-link.text-muted( title='play in background')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }",
ng-true-value="false", ng-false-value="true",
ng-checked="file.playlistDetails.option.main !== true")
span.pl-5 play in background
.col-sm-3(ng-show='file.fileDetails.type == "pdf"')
label.btn.btn-link.text-muted(title='use presentation mode')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }")
span.pl-5 use presentation mode
input.form-control.input-sm(ng-show='file.playlistDetails.option.main',
type='number', ng-model='file.playlistDetails.option.subduration',min="1",placeholder="duration for each slide",
ng-model-options="{ debounce: 500 }")
.row
.col-sm-3(ng-show='file.fileDetails.type == "video"')
label.btn.btn-link.text-muted(title='mute the audio')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }")
span.pl-5 mute audio
.col-sm-3(ng-show='file.fileDetails.type == "audio" || file.fileDetails.type == "radio"')
label.btn.btn-link.text-muted( title='play in background')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }",
ng-true-value="false", ng-false-value="true",
ng-checked="file.playlistDetails.option.main !== true")
span.pl-5 play in background
.col-sm-3(ng-show='file.fileDetails.type == "pdf"')
label.btn.btn-link.text-muted(title='use presentation mode')
input(type='checkbox', ng-model='file.playlistDetails.option.main',ng-model-options="{ debounce: 500 }")
span.pl-5 use presentation mode
input.form-control.input-sm(ng-show='file.playlistDetails.option.main',
type='number', ng-model='file.playlistDetails.option.subduration',min="1",placeholder="duration for each slide",
ng-model-options="{ debounce: 500 }")

.col-sm-1.pull-right
a.btn.btn-xs.btn-link(title="{{'Duplicate this asset to add multiple times in the playlist'}}", ng-click='makeCopy(file,$index)')
i.fa.fa-copy
.col-sm-1.pull-right
a.btn.btn-xs.btn-link(title="{{'Duplicate this asset to add multiple times in the playlist'}}", ng-click='makeCopy(file,$index)')
i.fa.fa-copy


//span(ng-show="asset.showAssets.playlist.layout != '2bp' && asset.showAssets.playlist.layout != '2bp270'")
Expand Down
5 changes: 5 additions & 0 deletions public/app/templates/ad-popup.html
Expand Up @@ -89,6 +89,11 @@ <h4 class="text-center">Play this playlist only once during selected duration</h
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-6 col-sm-offset-6">
<button ng-click="saveSettings()" class="btn btn-success">Save</button>
</div>
</div>
</form>
</div>
<div class="modal-header bg-info">
Expand Down
4 changes: 4 additions & 0 deletions public/app/templates/ad-popup.jade
Expand Up @@ -61,6 +61,10 @@
input.form-control(type='number',ng-model='playlist.selectedPlaylist.settings.domination.timeInterval')
.input-group-addon
small(translate) minutes
.form-group
.col-sm-6.col-sm-offset-6
button.btn.btn-success(ng-click="saveSettings()") Save



.modal-header.bg-info
Expand Down
2 changes: 1 addition & 1 deletion public/app/templates/display-set.html
Expand Up @@ -189,7 +189,7 @@ <h4>Select Display Orientation and Resolution</h4>
</div>
<div class="radio">
<label>
<input type="radio" ng-model="group.selectedGroup.imageSize" ng-value="0"/><small>Stretched</small>
<input type="radio" ng-model="group.selectedGroup.imageSize" ng-value="2"/><small>Stretched</small>
</label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion public/app/templates/display-set.jade
Expand Up @@ -144,7 +144,7 @@
small Letterbox
.radio
label
input(type='radio', ng-model='group.selectedGroup.imageSize',ng-value="0")
input(type='radio', ng-model='group.selectedGroup.imageSize',ng-value="2")
small Stretched
.col-sm-4
.checkbox
Expand Down

0 comments on commit 54c1264

Please sign in to comment.