Skip to content

Commit 1ce87d7

Browse files
authored
Merge pull request #241 from ibrahemomari/enhancement
Enhancement
2 parents 82710db + 5c3b54e commit 1ce87d7

23 files changed

Lines changed: 2115 additions & 1166 deletions

control/content/controllers/content.home.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
AppConfig.setAppId(MediaCenterInfo.id);
104104

105105
var header = {
106-
topImage: 'Top image',
106+
topImage: 'Thumbnail Image',
107107
title: 'Title',
108108
artists: 'Album Artists',
109109
summary: 'Summary',

control/content/templates/media.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ <h3 class="category-name">{{category.data.name}}</h3>
9797
<h1>Item Content Details</h1>
9898
<div class="row flex">
9999
<div class="col-md-3">
100-
<span>Top Image</span>
100+
<span>Thumbnail Image</span>
101101
</div>
102102
<div class="col-md-9 main ">
103103
<div class="screens clearfix margin-bottom-five">

control/settings/controllers/settings.home.controller.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
if (typeof (Settings.data.content.showViewCount) == 'undefined') {
4545
Settings.data.content.showViewCount = false;
4646
}
47+
if (typeof (Settings.data.content.indicatePlayedItems ) === 'undefined') {
48+
Settings.data.content.indicatePlayedItems = false;
49+
}
50+
if (typeof (Settings.data.content.startWithAutoJumpByDefault ) === 'undefined') {
51+
Settings.data.content.startWithAutoJumpByDefault = false;
52+
}
4753
}, (err) => {
4854
console.error(err);
4955
});
@@ -193,6 +199,22 @@
193199
}
194200
}
195201

202+
Settings.setEnableIndicatePlayedItems = (e) => {
203+
let value = e.target.checked;
204+
if (value != Settings.data.content.indicatePlayedItems ) {
205+
Settings.data.content.indicatePlayedItems = value;
206+
MediaCenter.save(Settings.data);
207+
}
208+
}
209+
210+
Settings.setEnableStartWithAutoJumpByDefault = (e) => {
211+
let value = e.target.checked;
212+
if (value != Settings.data.content.startWithAutoJumpByDefault ) {
213+
Settings.data.content.startWithAutoJumpByDefault = value;
214+
MediaCenter.save(Settings.data);
215+
}
216+
}
217+
196218
Settings.setGlobalPlaylistPlugin = (pluginInstance) => {
197219
Settings.data.content.globalPlaylistPlugin = pluginInstance;
198220
MediaCenter.save(Settings.data).then(() => { });

control/settings/templates/home.html

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
</div>
6666
</div>
6767

68-
<div class="setting-toggle margin-bottom-twenty" ng-show="Settings.data.content.autoPlay">
68+
<div class="setting-toggle margin-bottom-twenty" ng-show="Settings.data.content.autoPlay" style="margin-left: 20px;">
6969
<p class="setting-label">
7070
Auto Play Delay
7171
<span class="customTooltipBox btn-primary">
@@ -105,7 +105,7 @@
105105
</div>
106106
</div>
107107

108-
<div class="setting-toggle margin-bottom-twenty" ng-if="Settings.data.content.globalPlaylist">
108+
<div class="setting-toggle margin-bottom-twenty" ng-if="Settings.data.content.globalPlaylist" style="margin-left: 20px;">
109109
<p class="setting-label">
110110
Global Playlist Feature
111111
<span class="customTooltipBox btn-primary">
@@ -191,4 +191,32 @@
191191
<input id="enablePlayCountSwitch" type="checkbox" ng-click="Settings.setEnablePlayCount($event)" ng-checked="Settings.data.content.showViewCount">
192192
<label for="enablePlayCountSwitch" class="label-success"></label>
193193
</div>
194+
</div>
195+
196+
<div class="input-control side-label margin-bottom-twenty">
197+
<label for="">Indicate Played Items
198+
<span class="customTooltipBox btn-primary">
199+
<span class="customTooltipText">
200+
Visually mark a media item that the user has already opened.
201+
</span>
202+
</span>
203+
</label>
204+
<div class="button-switch">
205+
<input id="enableIndicatePlayedItems" type="checkbox" ng-click="Settings.setEnableIndicatePlayedItems($event)" ng-checked="Settings.data.content.indicatePlayedItems">
206+
<label for="enableIndicatePlayedItems" class="label-success"></label>
207+
</div>
208+
</div>
209+
210+
<div class="input-control side-label margin-bottom-twenty">
211+
<label for="">Auto Jump to Last Position
212+
<span class="customTooltipBox btn-primary">
213+
<span class="customTooltipText">
214+
This setting allows users to resume media playback from where they left off upon returning to the app. You have the choice to set it as enabled or disabled by default. Note that changing this setting on one Media Center Manual instance will apply it to all installed instances.
215+
</span>
216+
</span>
217+
</label>
218+
<div class="button-switch">
219+
<input id="enableStartWithAutoJumpByDefault " type="checkbox" ng-click="Settings.setEnableStartWithAutoJumpByDefault ($event)" ng-checked="Settings.data.content.startWithAutoJumpByDefault ">
220+
<label for="enableStartWithAutoJumpByDefault " class="label-success"></label>
221+
</div>
194222
</div>

resources/languages.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@
6969
"placeholder": "Play Next",
7070
"maxLength": 20,
7171
"defaultValue": "Play Next"
72+
},
73+
"playbackSpeed": {
74+
"title": "Playback Speed",
75+
"placeholder": "Playback Speed",
76+
"maxLength": 50,
77+
"defaultValue": "Playback Speed"
7278
}
7379
}
7480
},

widget/app.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
'mediaCenterWidgetServices',
88
'mediaCenterWidgetFilters',
99
'mediaCenterWidgetModals',
10+
'mediaCenterWidgetHandlers',
1011
'ngAnimate',
1112
'ngRoute',
1213
'ui.bootstrap',
@@ -320,7 +321,12 @@
320321
$httpProvider.interceptors.push(interceptor);
321322

322323
}])
323-
.run(['Location', '$location', '$rootScope', '$window', 'Messaging', 'EVENTS', 'PATHS', 'DB', 'COLLECTIONS', function (Location, $location, $rootScope, $window, Messaging, EVENTS, PATHS, DB, COLLECTIONS) {
324+
.run(['Location', '$location', '$rootScope', '$window', 'Messaging', 'EVENTS', 'PATHS', 'openedMediaHandler', function (Location, $location, $rootScope, $window, Messaging, EVENTS, PATHS, openedMediaHandler) {
325+
openedMediaHandler.sync();
326+
buildfire.appearance.navbar.show(null, (err) => {
327+
if (err) return console.error(err);
328+
console.log('Navbar is visible');
329+
});
324330
buildfire.navigation.onBackButtonClick = function () {
325331
if ($rootScope.fullScreen) {
326332
$rootScope.goingBackFullScreen = true;
@@ -342,6 +348,10 @@
342348
$("#showFeedBtn").click();
343349
$rootScope.showGlobalPlaylistButtons = true;
344350
if (!$rootScope.$$phase) $rootScope.$digest();
351+
buildfire.appearance.navbar.show(null, (err) => {
352+
if (err) return console.error(err);
353+
console.log('Navbar is visible');
354+
});
345355
} else {
346356
if ($rootScope.currentlyDownloading.length > 0) {
347357
buildfire.dialog.confirm(
@@ -414,6 +424,19 @@
414424
$rootScope.showGlobalPlaylistButtons = false;
415425
} else $rootScope.showGlobalPlaylistButtons = true;
416426

427+
if (path.indexOf('/media') === 0 || $("#feedView").hasClass('showing')) {
428+
buildfire.appearance.navbar.show(null, (err) => {
429+
if (err) return console.error(err);
430+
console.log('Navbar is visible');
431+
});
432+
} else if(path.indexOf('/nowplaying') === 0 && !$("#feedView").hasClass('showing')){
433+
console.log('nav',$("#feedView").hasClass('showing'));
434+
buildfire.appearance.navbar.hide(null, (err) => {
435+
if (err) return console.error(err);
436+
console.log('Navbar is hidden');
437+
});
438+
}
439+
417440
if (!$rootScope.$$phase) $rootScope.$digest();
418441
});
419442

Lines changed: 7 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)