diff --git a/src/main/resources/static/app/css/podcastserver.css b/src/main/resources/static/app/css/podcastserver.css
index f14b49394..a58903ed3 100644
--- a/src/main/resources/static/app/css/podcastserver.css
+++ b/src/main/resources/static/app/css/podcastserver.css
@@ -43,7 +43,7 @@
border-top-right-radius: 5px;
max-height: 219px;
width: 100%;
- background-size: 100%;
+ background-size: cover;
background-repeat: no-repeat;
background-position: center center;
padding-left: 0 !important;
@@ -55,11 +55,6 @@
/*background-position : top center;*/
}
}
-@media screen and (max-width: 767px) {
- .item-search-list .item-in-list .cover {
- background-size: 120%;
- }
-}
.item-search-list .item-in-list img {
height: 215px;
border-top-left-radius: 5px;
diff --git a/src/main/resources/static/app/css/podcastserver.min.css b/src/main/resources/static/app/css/podcastserver.min.css
index 53d941803..3e5878654 100644
--- a/src/main/resources/static/app/css/podcastserver.min.css
+++ b/src/main/resources/static/app/css/podcastserver.min.css
@@ -8,9 +8,8 @@
.item-search-list .search-button{margin-top:20px}
.item-search-list [class^=col-]{padding-right:8px;padding-left:8px}
.item-search-list .item-in-list{padding-top:15px;padding-bottom:0}
-.item-search-list .item-in-list .cover{display:flex;justify-content:center;height:215px;border-top-left-radius:5px;border-top-right-radius:5px;max-height:219px;width:100%;background-size:100%;background-repeat:no-repeat;background-position:center center;padding-left:0!important;padding-right:0!important}
+.item-search-list .item-in-list .cover{display:flex;justify-content:center;height:215px;border-top-left-radius:5px;border-top-right-radius:5px;max-height:219px;width:100%;background-size:cover;background-repeat:no-repeat;background-position:center center;padding-left:0!important;padding-right:0!important}
@media screen and (min-width:1200px){.item-search-list .item-in-list .cover{height:165px}}
-@media screen and (max-width:767px){.item-search-list .item-in-list .cover{background-size:120%}}
.item-search-list .item-in-list img{height:215px;border-top-left-radius:5px;border-top-right-radius:5px;max-height:219px;width:100%;object-fit:cover}
@media screen and (min-width:1200px){.item-search-list .item-in-list img{height:165px}}
.item-search-list .item-in-list .more-button{z-index:100;position:absolute;top:0;right:0}
diff --git a/src/main/resources/static/app/js/podcastserver.js b/src/main/resources/static/app/js/podcastserver.js
index 3b526f84e..74c1c80f0 100644
--- a/src/main/resources/static/app/js/podcastserver.js
+++ b/src/main/resources/static/app/js/podcastserver.js
@@ -19,11 +19,11 @@
return Constructor;
};
}();
- var _classCallCheck = function (instance, Constructor) {
+ function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError('Cannot call a class as a function');
}
- };
+ }
angular.module('podcastApp', [
'ps.search',
'ps.podcast',
@@ -234,6 +234,27 @@
return item;
});
}]);
+ angular.module('ps.partial', []).run([
+ '$templateCache',
+ function ($templateCache) {
+ $templateCache.put('html/authorize-notification.html', '
\n');
+ $templateCache.put('html/download.html', '\n\n
\n
\n\n\n
\n\n
\n \n \n Liste d\'attente {{ dc.waitingitems.length }}\n \n \n\n \n \n\n\n
');
+ $templateCache.put('html/item-detail.html', '\n\n\n
\n
\n - Podcasts
\n - {{ idc.item.podcast.title }}
\n - {{ idc.item.title }}
\n
\n\n
\n
\n
\n
\n
\n \n\n
\n\n
\n \n
\n \n \n \n\n \n
\n\n
\n\n \n
\n \n \n \n\n
\n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
{{ idc.item.title }}
\n \n
\n {{ idc.item.description | htmlToPlaintext }}\n
\n \n
\n
\n\n
\n
\n\n');
+ $templateCache.put('html/item-player.html', '');
+ $templateCache.put('html/items-search.html', '\n\n \n\n
\n\n
\n
\n
\n \n
\n
\n');
+ $templateCache.put('html/navbar.html', '');
+ $templateCache.put('html/player.html', '\n
\n
\n
\n \n\n \n \n {{ currentTime | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n {{ timeLeft | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n\n
');
+ $templateCache.put('html/podcast-creation.html', '\n
\n
Ajouter un Podcast
\n \n
\n\n\n\n\n\n');
+ $templateCache.put('html/podcast-detail.html', '\n\n\n\n\n\n');
+ $templateCache.put('html/podcast-details-edition.html', '
\n\n \n \n \n \n \n \n \n \n \n\n');
+ $templateCache.put('html/podcast-details-episodes.html', '
\n\n\n ');
+ $templateCache.put('html/podcast-details-stats.html', '
\n\n\n \n
\n');
+ $templateCache.put('html/podcast-details-upload.html', '
\n\n
\n
\n D\xE9poser un ou des fichiers ici\n
\n
\n
\n');
+ $templateCache.put('html/podcasts-list.html', '\n\n');
+ $templateCache.put('html/stats.html', '');
+ $templateCache.put('html/updating.html', '\n \n');
+ }
+ ]);
angular.module('ps.config.route', [
'ngRoute',
'cfp.hotkeys'
@@ -316,7 +337,7 @@
key: 'onDownloadUpdate',
value: function onDownloadUpdate(message) {
var item = JSON.parse(message.body);
- var elemToUpdate = _.find(this.items, { id: item.id });
+ var elemToUpdate = _.find(this.items, { 'id': item.id });
switch (item.status) {
case 'Started':
case 'Paused':
@@ -357,16 +378,15 @@
value: function onWaitingUpdate(message) {
var remoteWaitingItems = JSON.parse(message.body);
_.updateinplace(this.waitingitems, remoteWaitingItems, function (inArray, elem) {
- return _.findIndex(inArray, { id: elem.id });
+ return _.findIndex(inArray, { 'id': elem.id });
}, true);
}
},
{
key: 'getTypeFromStatus',
value: function getTypeFromStatus(item) {
- if (item.status === 'Paused') {
+ if (item.status === 'Paused')
return 'warning';
- }
return 'info';
}
},
@@ -533,27 +553,6 @@
}
});
}]).controller('ItemDetailCtrl', ItemDetailCtrl);
- angular.module('ps.partial', []).run([
- '$templateCache',
- function ($templateCache) {
- $templateCache.put('html/authorize-notification.html', '\n');
- $templateCache.put('html/download.html', '\n\n
\n
\n\n\n
\n\n
\n \n \n Liste d\'attente {{ dc.waitingitems.length }}\n \n \n\n \n \n\n\n
');
- $templateCache.put('html/item-detail.html', '\n\n\n
\n
\n - Podcasts
\n - {{ idc.item.podcast.title }}
\n - {{ idc.item.title }}
\n
\n\n
\n
\n
\n
\n
\n \n\n
\n\n
\n \n
\n \n \n \n\n \n
\n\n
\n\n \n
\n \n \n \n\n
\n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
{{ idc.item.title }}
\n \n
\n {{ idc.item.description | htmlToPlaintext }}\n
\n \n
\n
\n\n
\n
\n\n');
- $templateCache.put('html/item-player.html', '');
- $templateCache.put('html/items-search.html', '\n\n \n\n
\n\n
\n
\n
\n \n
\n
\n');
- $templateCache.put('html/navbar.html', '');
- $templateCache.put('html/player.html', '\n
\n
\n
\n \n\n \n \n {{ currentTime | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n {{ timeLeft | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n\n
');
- $templateCache.put('html/podcast-creation.html', '\n
\n
Ajouter un Podcast
\n \n
\n\n\n\n\n\n');
- $templateCache.put('html/podcast-detail.html', '\n\n\n\n\n\n');
- $templateCache.put('html/podcast-details-edition.html', '
\n\n \n \n \n \n \n \n \n \n \n\n');
- $templateCache.put('html/podcast-details-episodes.html', '
\n\n\n ');
- $templateCache.put('html/podcast-details-stats.html', '
\n\n\n \n
\n');
- $templateCache.put('html/podcast-details-upload.html', '
\n\n
\n
\n D\xE9poser un ou des fichiers ici\n
\n
\n
\n');
- $templateCache.put('html/podcasts-list.html', '\n\n');
- $templateCache.put('html/stats.html', '');
- $templateCache.put('html/updating.html', '\n \n');
- }
- ]);
/**
* Created by kevin on 01/11/14.
*/
@@ -656,7 +655,7 @@
key: 'reloadPlaylist',
value: function reloadPlaylist() {
_.updateinplace(this.playlist, this.playlistService.playlist(), function (inArray, elem) {
- return _.findIndex(inArray, { id: elem.id });
+ return _.findIndex(inArray, { 'id': elem.id });
});
}
},
@@ -972,7 +971,7 @@
key: 'updateItemFromWS',
value: function updateItemFromWS(wsMessage) {
var item = JSON.parse(wsMessage.body);
- var elemToUpdate = _.find(this.items, { id: item.id });
+ var elemToUpdate = _.find(this.items, { 'id': item.id });
if (elemToUpdate)
_.assign(elemToUpdate, item);
}
@@ -1021,7 +1020,7 @@
value: function reset(item) {
var _this12 = this;
return item.reset().then(function (itemReseted) {
- var itemInList = _.find(_this12.items, { id: itemReseted.id });
+ var itemInList = _.find(_this12.items, { 'id': itemReseted.id });
_.assign(itemInList, itemReseted);
return itemInList;
}).then(function (itemInList) {
@@ -1691,7 +1690,7 @@
key: 'onMessageFromWS',
value: function onMessageFromWS(message) {
var item = JSON.parse(message.body);
- var elemToUpdate = _.find(this.podcast.items, { id: item.id });
+ var elemToUpdate = _.find(this.podcast.items, { 'id': item.id });
_.assign(elemToUpdate, item);
}
},
@@ -1731,7 +1730,7 @@
value: function reset(item) {
var _this22 = this;
return item.reset().then(function (itemReseted) {
- var itemInList = _.find(_this22.podcast.items, { id: itemReseted.id });
+ var itemInList = _.find(_this22.podcast.items, { 'id': itemReseted.id });
_.assign(itemInList, itemReseted);
return itemInList;
}).then(function (itemToRemove) {
@@ -1922,12 +1921,12 @@
]).then(function (arrayResult) {
var downloadData = _(arrayResult[0]).map(PodcastDetailsStatsCtrl.dateMapper()).sortBy('date').map(PodcastDetailsStatsCtrl.highChartsMapper()).value(), publicationData = _(arrayResult[1]).map(PodcastDetailsStatsCtrl.dateMapper()).sortBy('date').map(PodcastDetailsStatsCtrl.highChartsMapper()).value();
_this26.chartSeries.push({
- name: 'Download Date',
- data: downloadData
+ 'name': 'Download Date',
+ 'data': downloadData
});
_this26.chartSeries.push({
- name: 'Publication Date',
- data: publicationData
+ 'name': 'Publication Date',
+ 'data': publicationData
});
return _this26.chartSeries;
});
diff --git a/src/main/resources/static/app/js/podcastserver.min.js b/src/main/resources/static/app/js/podcastserver.min.js
index 2566a1497..0c985c8e1 100644
--- a/src/main/resources/static/app/js/podcastserver.min.js
+++ b/src/main/resources/static/app/js/podcastserver.min.js
@@ -1,4 +1,4 @@
-!function(){"use strict";var t=function(){function t(t,e){for(var n=0;n]+>/gm,"")}}),_.mixin({updateinplace:function(t,e){var n=void 0===arguments[2]?function(t,e){return t.indexOf(e)}:arguments[2],a=void 0===arguments[3]?!1:arguments[3];return _.forEachRight(t.slice(),function(a,i){return-1===n(e,a)&&t.splice(i,1)}),_.forEach(e,function(e){return-1===n(t,e)&&t.push(e)}),a&&_.forEach(e,function(e,a){var i=t.splice(n(t,e),1)[0];t.splice(a,0,i)}),t}});var s=function B(){e(this,B),this.navCollapsed=!0},o=function(){function n(){e(this,n),this.transclude=!0,this.replace=!0,this.restrict="E",this.scope=!0,this.templateUrl="html/navbar.html",this.controller="navbarController",this.controllerAs="navbar"}return t(n,[{key:"link",value:function(t,e){e.removeClass("hidden")}}]),n}();angular.module("navbar",[]).directive("navbar",function(){return new o}).controller("navbarController",s);var l=function(){function n(){e(this,n),this.restrict="E",this.scope=!0,this.templateUrl="html/updating.html",this.controller="UpdatingController",this.controllerAs="uc"}return t(n,[{key:"link",value:function(t,e){var n=e.parent().parent()[0];n&&"LI"===n.tagName&&!function(){var e=angular.element(n);e.addClass("hidden"),t.$watch("uc.isUpdating",function(t){return t?e.removeClass("hidden"):e.addClass("hidden")})}()}}]),n}(),r=function(){function n(t,a){var i=this;e(this,n),this.ngstomp=t,this.isUpdating=!1,this.$scope=a,this.ngstomp.subscribe("/app/updating",function(t){return i.updateStatus(t)},a).subscribe("/topic/updating",function(t){return i.updateStatus(t)},a)}return n.$inject=["ngstomp","$scope"],t(n,[{key:"updateStatus",value:function(t){this.isUpdating=JSON.parse(t.body)}}]),n}();angular.module("updating",["AngularStompDK"]).directive("updateStatus",function(){return new l}).controller("UpdatingController",r),angular.module("ps.config",["ps.config.route","ps.config.loading","ps.config.restangular","ps.config.ngstomp","ps.config.module"]),angular.module("ps.config.loading",["angular-loading-bar"]).config(["cfpLoadingBarProvider",function(t){t.includeSpinner=!1}]),angular.module("ps.config.module",["ngTouch","ngAnimate","ui.bootstrap","truncate","ngFileUpload"]),angular.module("ps.config.ngstomp",["AngularStompDK"]).config(["ngstompProvider",function(t){return t.url("/ws").credential("login","password")["class"](SockJS)}]),angular.module("ps.config.restangular",["restangular"]).config(["RestangularProvider",function(t){t.setBaseUrl("/api/"),t.addElementTransformer("items",!1,function(t){return t.addRestangularMethod("reset","get","reset"),t.addRestangularMethod("download","get","addtoqueue"),t})}]),angular.module("ps.config.route",["ngRoute","cfp.hotkeys"]).constant("commonKey",[["h","Goto Home",function(t){t.preventDefault(),window.location.href="/items"}],["s","Goto Search",function(t){t.preventDefault(),window.location.href="/item/search"}],["p","Goto Podcast List",function(t){t.preventDefault(),window.location.href="/podcasts"}],["d","Goto Download List",function(t){t.preventDefault(),window.location.href="/download"}]]).config(["$routeProvider",function(t){return t.otherwise({redirectTo:"/items"})}]).config(["$locationProvider",function(t){return t.html5Mode(!0)}]);var c=function(){function n(t,a,i){var s=this;e(this,n),this.DonwloadManager=a,this.$notification=i,this.items=[],this.waitingitems=[],this.numberOfSimDl=0,this.DonwloadManager.getNumberOfSimDl().then(function(t){s.numberOfSimDl=parseInt(t)}),this.DonwloadManager.ws.subscribe("/app/download",function(t){return s.onSubscribeDownload(t)},t).subscribe("/app/waiting",function(t){return s.onSubscribeWaiting(t)},t).subscribe("/topic/download",function(t){return s.onDownloadUpdate(t)},t).subscribe("/topic/waiting",function(t){return s.onWaitingUpdate(t)},t)}return n.$inject=["$scope","DonwloadManager","$notification"],t(n,[{key:"onSubscribeDownload",value:function(t){this.items=JSON.parse(t.body)}},{key:"onSubscribeWaiting",value:function(t){this.waitingitems=JSON.parse(t.body)}},{key:"onDownloadUpdate",value:function(t){var e=JSON.parse(t.body),n=_.find(this.items,{id:e.id});switch(e.status){case"Started":case"Paused":n?_.assign(n,e):this.items.push(e);break;case"Finish":try{this.$notification("Téléchargement terminé",{body:e.title,icon:e.cover.url,delay:5e3})}catch(a){}this.onStoppedFromWS(n);break;case"Stopped":this.onStoppedFromWS(n)}}},{key:"onStoppedFromWS",value:function(t){t&&_.remove(this.items,function(e){return e.id===t.id})}},{key:"onWaitingUpdate",value:function(t){var e=JSON.parse(t.body);_.updateinplace(this.waitingitems,e,function(t,e){return _.findIndex(t,{id:e.id})},!0)}},{key:"getTypeFromStatus",value:function(t){return"Paused"===t.status?"warning":"info"}},{key:"updateNumberOfSimDl",value:function(t){this.DonwloadManager.updateNumberOfSimDl(t)}},{key:"download",value:function(t){this.DonwloadManager.download(t)}},{key:"stopDownload",value:function(t){this.DonwloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DonwloadManager.ws.toggle(t)}},{key:"stopAllDownload",value:function(){this.DonwloadManager.stopAllDownload()}},{key:"pauseAllDownload",value:function(){this.DonwloadManager.pauseAllDownload()}},{key:"restartAllCurrentDownload",value:function(){this.DonwloadManager.restartAllCurrentDownload()}},{key:"removeFromQueue",value:function(t){this.DonwloadManager.removeFromQueue(t)}},{key:"dontDonwload",value:function(t){this.DonwloadManager.dontDonwload(t)}},{key:"moveInWaitingList",value:function(t,e){this.DonwloadManager.moveInWaitingList(t,e)}}]),n}();angular.module("ps.download",["ps.config.route","ps.dataService.donwloadManager","notification"]).config(["$routeProvider","commonKey",function(t,e){return t.when("/download",{templateUrl:"html/download.html",controller:"DownloadCtrl",controllerAs:"dc",hotkeys:e})}]).controller("DownloadCtrl",c);var d=function(){function n(t,a,i,s,o,l){var r=this;e(this,n),this.item=l,this.$location=i,this.item.podcast=o,this.playlistService=s,this.DonwloadManager=a;var c="/topic/podcast/".concat(this.item.podcast.id);this.DonwloadManager.ws.subscribe(c,function(t){var e=JSON.parse(t.body);e.id==r.item.id&&_.assign(r.item,e)},t)}return n.$inject=["$scope","DonwloadManager","$location","playlistService","podcast","item"],t(n,[{key:"stopDownload",value:function(t){this.DonwloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DonwloadManager.ws.toggle(t)}},{key:"remove",value:function(t){var e=this;return t.remove().then(function(){e.playlistService.remove(t),e.$location.path("/podcasts/".concat(e.item.podcast.id))})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(n){_.assign(e.item,n),e.playlistService.remove(t)})}},{key:"toggleInPlaylist",value:function(){this.playlistService.addOrRemove(this.item)}},{key:"isInPlaylist",value:function(){return this.playlistService.contains(this.item)}}]),n}();angular.module("ps.item.details",["ps.dataService.donwloadManager","ps.player"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcasts/:podcastId/item/:itemId",{templateUrl:"html/item-detail.html",controller:"ItemDetailCtrl",controllerAs:"idc",hotkeys:e,resolve:{item:["itemService","$route",function(t,e){return t.findById(e.current.params.podcastId,e.current.params.itemId)}],podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("ItemDetailCtrl",d),angular.module("ps.partial",[]).run(["$templateCache",function(t){t.put("html/authorize-notification.html",'\n'),t.put("html/download.html",'\n\n
\n
\n\n\n
\n\n
\n \n \n Liste d\'attente {{ dc.waitingitems.length }}\n \n \n\n \n \n\n\n
'),t.put("html/item-detail.html",'\n\n\n
\n
\n - Podcasts
\n - {{ idc.item.podcast.title }}
\n - {{ idc.item.title }}
\n
\n\n
\n
\n
\n
\n
\n \n\n
\n\n
\n \n
\n \n \n \n\n \n
\n\n
\n\n \n
\n \n \n \n\n
\n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
{{ idc.item.title }}
\n \n
\n {{ idc.item.description | htmlToPlaintext }}\n
\n \n
\n
\n\n
\n
\n\n'),t.put("html/item-player.html",''),t.put("html/items-search.html",'\n\n \n\n
\n\n
\n
\n
\n \n
\n
\n'),t.put("html/navbar.html",''),t.put("html/player.html",'\n
\n
\n
\n \n\n \n \n {{ currentTime | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n {{ timeLeft | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n\n
'),t.put("html/podcast-creation.html",'\n
\n
Ajouter un Podcast
\n \n
\n\n\n\n\n\n'),
-t.put("html/podcast-detail.html",'\n\n\n\n\n\n'),t.put("html/podcast-details-edition.html",'
\n\n \n \n \n \n \n \n \n \n \n\n'),t.put("html/podcast-details-episodes.html",'
\n\n\n '),t.put("html/podcast-details-stats.html",'
\n\n\n \n
\n'),t.put("html/podcast-details-upload.html",'
\n\n
\n
\n Déposer un ou des fichiers ici\n
\n
\n
\n'),t.put("html/podcasts-list.html",'\n\n'),t.put("html/stats.html",''),t.put("html/updating.html",'\n \n')}]),angular.module("ps.item",["ps.item.details","ps.item.player"]);var u=function j(t,n,a,i){e(this,j),this.item=n,this.item.podcast=t,this.$timeout=a,this.config={autoPlay:!0,sources:[{src:this.item.proxyURL,type:this.item.mimeType}],plugins:{controls:{autoHide:!i.isTouchedDevice(),autoHideTime:2e3},poster:this.item.cover.url}}};u.$inject=["podcast","item","$timeout","deviceDetectorService"],angular.module("ps.item.player",["ngSanitize","ngRoute","device-detection","com.2fdevs.videogular","com.2fdevs.videogular.plugins.poster","com.2fdevs.videogular.plugins.controls","com.2fdevs.videogular.plugins.overlayplay","com.2fdevs.videogular.plugins.buffering"]).config(["$routeProvider",function(t){t.when("/podcasts/:podcastId/item/:itemId/play",{templateUrl:"html/item-player.html",controller:"ItemPlayerController",controllerAs:"ipc",resolve:{item:["itemService","$route",function(t,e){return t.findById(e.current.params.podcastId,e.current.params.itemId)}],podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("ItemPlayerController",u);var p=function(){function n(t,a,i){e(this,n),this.playlistService=t,this.$timeout=a,this.playlist=[],this.state=null,this.API=null,this.currentVideo={},this.config={autoPlay:!0,sources:[],plugins:{controls:{autoHide:!i.isTouchedDevice(),autoHideTime:2e3},poster:""}},this.reloadPlaylist()}return n.$inject=["playlistService","$timeout","deviceDetectorService"],t(n,[{key:"onPlayerReady",value:function(t){this.API=t,("play"==this.API.currentState||this.isCompleted)&&this.API.play(),this.isCompleted=!1,this.setVideo(0)}},{key:"onCompleteVideo",value:function(){var t=this.getIndexOfVideoInPlaylist(this.currentVideo);return this.isCompleted=!0,t+1===this.playlist.length?void(this.currentVideo=this.playlist[0]):void this.setVideo(t+1)}},{key:"reloadPlaylist",value:function(){_.updateinplace(this.playlist,this.playlistService.playlist(),function(t,e){return _.findIndex(t,{id:e.id})})}},{key:"setVideo",value:function(t){this.currentVideo=this.playlist[t],null!==this.currentVideo&&void 0!==this.currentVideo&&(this.API.stop(),this.config.sources=[{src:this.currentVideo.proxyURL,type:this.currentVideo.mimeType}],this.config.plugins.poster=this.currentVideo.cover.url)}},{key:"remove",value:function(t){this.playlistService.remove(t),this.reloadPlaylist(),this.config.sources.length>0&&this.config.sources[0].src===t.proxyURL&&this.setVideo(0)}},{key:"removeAll",value:function(){this.playlistService.removeAll(),this.reloadPlaylist()}},{key:"getIndexOfVideoInPlaylist",value:function(t){return this.playlist.indexOf(t)}}]),n}();angular.module("ps.player",["ngSanitize","ngRoute","device-detection","com.2fdevs.videogular","com.2fdevs.videogular.plugins.poster","com.2fdevs.videogular.plugins.controls","com.2fdevs.videogular.plugins.overlayplay","com.2fdevs.videogular.plugins.buffering","ps.player.playlist"]).config(["$routeProvider",function(t){t.when("/player",{templateUrl:"html/player.html",controller:"PlayerController",controllerAs:"pc"})}]).controller("PlayerController",p);var g=function(){function n(t){e(this,n),this.$localStorage=t,this.$localStorage.playlist=this.$localStorage.playlist||[]}return n.$inject=["$localStorage"],t(n,[{key:"playlist",value:function(){return this.$localStorage.playlist}},{key:"add",value:function(t){this.$localStorage.playlist.push(t)}},{key:"remove",value:function(t){this.$localStorage.playlist=_.remove(this.$localStorage.playlist,function(e){return e.id!==t.id})}},{key:"contains",value:function(t){return angular.isObject(_.find(this.$localStorage.playlist,{id:t.id}))}},{key:"addOrRemove",value:function(t){this.contains(t)?this.remove(t):this.add(t)}},{key:"removeAll",value:function(){this.$localStorage.playlist=[]}}]),n}();angular.module("ps.player.playlist",["ngStorage"]).service("playlistService",g);var h=function(){function n(t,a,i,s,o){e(this,n),this.podcastService=s,this.$location=t,this.tagService=i,this.podcast=angular.extend(this.podcastService.getNewPodcast(),a),this.types=o}return n.$inject=["$location","defaultPodcast","tagService","podcastService","types"],t(n,[{key:"findInfo",value:function(){var t=this;return this.podcastService.findInfo(this.podcast.url).then(function(e){t.podcast.title=e.title,t.podcast.description=e.description,t.podcast.type=e.type,t.podcast.cover.url=e.cover.url})}},{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"changeType",value:function(){this.podcast.type=/beinsports\.fr/i.test(this.podcast.url)?"BeInSports":/canalplus\.fr/i.test(this.podcast.url)?"CanalPlus":/jeuxvideo\.fr/i.test(this.podcast.url)?"JeuxVideoFR":/jeuxvideo\.com/i.test(this.podcast.url)?"JeuxVideoCom":/parleys\.com/i.test(this.podcast.url)?"Parleys":/pluzz\.francetv\.fr/i.test(this.podcast.url)?"Pluzz":/youtube\.com/i.test(this.podcast.url)?"Youtube":this.podcast.url.length>0?"RSS":"Send"}},{key:"save",value:function(){var t=this;this.podcastService.save(this.podcast).then(function(e){return t.$location.path("/podcasts/"+e.id)})}}]),n}();angular.module("ps.podcast.creation",["ps.config.route","ps.dataservice","ngTagsInput"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcast-creation",{templateUrl:"html/podcast-creation.html",controller:"PodcastAddCtrl",controllerAs:"pac",hotkeys:e,resolve:{types:["typeService",function(t){return t.findAll()}]}})}]).constant("defaultPodcast",{hasToBeDeleted:!0,cover:{height:200,width:200}}).controller("PodcastAddCtrl",h);var m=function N(t,n){e(this,N),this.podcasts=t,this.types=n,this.filters={title:"",type:""}};m.$inject=["podcasts","types"],angular.module("ps.podcast.list",["ps.config.route","ps.dataService.podcast","ps.dataService.type"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcasts",{templateUrl:"html/podcasts-list.html",controller:"PodcastsListCtrl",controllerAs:"plc",hotkeys:e,resolve:{podcasts:["podcastService",function(t){return t.findAll()}],types:["typeService",function(t){return t.findAll()}]}})}]).controller("PodcastsListCtrl",m),angular.module("ps.podcast",["ps.podcast.details","ps.podcast.creation","ps.podcast.list"]);var v=function(){function n(t,a){e(this,n),this.$sessionStorage=a,this.$sessionStorage.searchParameters=t}return n.$inject=["DefaultItemSearchParameters","$sessionStorage"],t(n,[{key:"getParameters",value:function(){return this.$sessionStorage.searchParameters}},{key:"page",value:function(t){return angular.isNumber(t)&&(this.$sessionStorage.searchParameters.page=t),this.$sessionStorage.searchParameters.page}},{key:"size",value:function(t){return angular.isNumber(t)&&(this.$sessionStorage.searchParameters.size=t),this.$sessionStorage.searchParameters.size}},{key:"updateSearchParam",value:function(t){this.$sessionStorage.searchParameters.term=t.term,this.$sessionStorage.searchParameters.tags=t.tags,this.$sessionStorage.searchParameters.direction=t.direction,this.$sessionStorage.searchParameters.properties=t.properties}}]),n}(),f=function(){function n(t,a,i,s,o,l,r,c){var d=this;e(this,n),this.$location=i,this.itemService=s,this.tagService=o,this.DownloadManager=l,this.playlistService=r,this.SearchItemCache=a,this.totalItems=Number.MAX_VALUE,this.maxSize=10,this.currentPage=this.SearchItemCache.page()+1,this.searchParameters=this.SearchItemCache.getParameters(),this.DownloadManager.ws.subscribe("/topic/download",function(t){return d.updateItemFromWS(t)},t),t.$on("$routeUpdate",function(){d.currentPage!==d.$location.search().page&&(d.currentPage=d.$location.search().page||1,d.changePage())}),this.attachResponse(c)}return n.$inject=["$scope","SearchItemCache","$location","itemService","tagService","DonwloadManager","playlistService","items"],t(n,[{key:"updateItemFromWS",value:function(t){var e=JSON.parse(t.body),n=_.find(this.items,{id:e.id});n&&_.assign(n,e)}},{key:"changePage",value:function(){var t=this;return this.SearchItemCache.page(this.calculatePage()),this.itemService.search(this.SearchItemCache.getParameters()).then(function(e){return t.attachResponse(e)})}},{key:"attachResponse",value:function(t){this.items=t.content,this.totalPages=t.totalPages,this.totalItems=t.totalElements,this.currentPage=this.SearchItemCache.page(t.number)+1,this.$location.search("page",this.currentPage)}},{key:"swipePage",value:function(t){return this.currentPage=this.SearchItemCache.page()+t+1,this.changePage()}},{key:"remove",value:function(t){var e=this;return t.remove().then(function(){return e.playlistService.remove(t)}).then(function(){return e.changePage()})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(t){var n=_.find(e.items,{id:t.id});return _.assign(n,t),n}).then(function(t){return e.playlistService.remove(t)})}},{key:"stopDownload",value:function(t){this.DownloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){return this.DownloadManager.ws.toggle(t)}},{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"addOrRemove",value:function(t){return this.playlistService.addOrRemove(t)}},{key:"isInPlaylist",value:function(t){return this.playlistService.contains(t)}},{key:"calculatePage",value:function(){return this.currentPage<=1?0:this.currentPage>Math.ceil(this.totalItems/this.SearchItemCache.size())?Math.ceil(this.totalItems/this.SearchItemCache.size())-1:this.currentPage-1}},{key:"resetSearch",value:function(){return this.currentPage=1,this.SearchItemCache.updateSearchParam(this.searchParameters),this.changePage()}}]),n}();angular.module("ps.search.item",["ps.dataService.donwloadManager","ps.dataService.item","ps.dataService.tag","ps.player","ps.config.route","ngTagsInput","ngStorage"]).config(["$routeProvider","commonKey",function(t,e){t.when("/items",{templateUrl:"html/items-search.html",controller:"ItemsSearchCtrl",controllerAs:"isc",reloadOnSearch:!1,hotkeys:[["right","Next page","isc.swipePage(1)"],["left","Previous page","isc.swipePage(-1)"]].concat(e),resolve:{items:["itemService","SearchItemCache",function(t,e){return t.search(e.getParameters())}]}})}]).constant("DefaultItemSearchParameters",{page:0,size:12,term:void 0,tags:void 0,direction:"DESC",properties:"pubdate"}).controller("ItemsSearchCtrl",f).service("SearchItemCache",v),angular.module("ps.search",["ps.search.item"]);var y=function(){function n(t,a){e(this,n),this.statService=t,this.month=1,this.chartSeries=[],this.transform(a),this.chartConfig={options:{chart:{type:"spline"},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{type:"datetime",dateTimeLabelFormats:{month:"%e. %b",year:"%b"},title:{text:"Date"}}},series:this.chartSeries,title:{text:""},credits:{enabled:!1},loading:!1}}return n.$inject=["statService","stats"],t(n,[{key:"transform",value:function(t){var e=this;_.updateinplace(this.chartSeries,[]),angular.forEach(t,function(t){var a={name:t.type};a.data=_(t.values).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value(),e.chartSeries.push(a)})}},{key:"navigate",value:function(t){this.month+=t,this.generateChartData()}},{key:"generateChartData",value:function(){var t=this;return this.statService.statsByType(this.month).then(function(e){return t.transform(e)})}}],[{key:"dateMapper",value:function(){return function(t){return{date:Date.UTC(t.date[0],t.date[1]-1,t.date[2]),numberOfItems:t.numberOfItems}}}},{key:"highChartsMapper",value:function(){return function(t){return[t.date,t.numberOfItems]}}}]),n}();angular.module("ps.stats",["ps.dataService.stat"]).config(["$routeProvider","commonKey",function(t,e){t.when("/stats",{templateUrl:"html/stats.html",controller:"StatsController",controllerAs:"sc",hotkeys:e,resolve:{stats:["statService",function(t){return t.statsByType()}]}})}]).controller("StatsController",y),angular.module("ps.dataservice",["ps.dataService.donwloadManager","ps.dataService.item","ps.dataService.podcast","ps.dataService.tag","ps.dataService.type","ps.dataService.updateService"]);var b=function(){function n(t,a){e(this,n),this.WS_DOWNLOAD_BASE=t,this.ngstomp=a}return t(n,[{key:"connect",value:function(){return this.ngstomp.connect()}},{key:"subscribe",value:function(t,e,n){return this.ngstomp.subscribe(t,e,n)}},{key:"unsubscribe",value:function(t){return this.ngstomp.unsubscribe(t)}},{key:"toggle",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/toogle",t)}},{key:"start",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/start",t)}},{key:"pause",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/pause",t)}},{key:"stop",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/stop",t)}}]),n}(),w=function(){function n(t,a){e(this,n),this.Restangular=t,this.baseTask=this.Restangular.one("task"),this.baseDownloadManager=this.baseTask.one("downloadManager"),this.WS_DOWNLOAD_BASE="/app/download",this.ws=new b(this.WS_DOWNLOAD_BASE,a)}return n.$inject=["Restangular","ngstomp"],t(n,[{key:"download",value:function(t){return this.Restangular.one("item").customGET(t.id+"/addtoqueue")}},{key:"stopDownload",value:function(t){return this.baseDownloadManager.customPOST(t.id,"stopDownload")}},{key:"toggleDownload",value:function(t){return this.baseDownloadManager.customPOST(t.id,"toogleDownload")}},{key:"stopAllDownload",value:function(){return this.baseDownloadManager.customGET("stopAllDownload")}},{key:"pauseAllDownload",value:function(){return this.baseDownloadManager.customGET("pauseAllDownload")}},{key:"restartAllCurrentDownload",value:function(){return this.baseDownloadManager.customGET("restartAllCurrentDownload")}},{key:"removeFromQueue",value:function(t){return this.baseDownloadManager.customDELETE("queue/"+t.id)}},{key:"updateNumberOfSimDl",value:function(t){return this.baseDownloadManager.customPOST(t,"limit")}},{key:"dontDonwload",value:function(t){return this.baseDownloadManager.customDELETE("queue/"+t.id+"/andstop")}},{key:"getDownloading",value:function(){return this.baseTask.all("downloadManager/downloading").getList()}},{key:"getNumberOfSimDl",value:function(){return this.baseDownloadManager.one("limit").get()}},{key:"moveInWaitingList",value:function(t,e){this.baseDownloadManager.customPOST({id:t.id,position:e},"move")}}]),n}();angular.module("ps.dataService.donwloadManager",["restangular","AngularStompDK"]).service("DonwloadManager",w);var S=function(){function n(t){e(this,n),this.Restangular=t,this.childRoute="items"}return n.$inject=["Restangular"],t(n,[{key:"search",value:function(){var t=this,e=void 0===arguments[0]?{page:0,size:12}:arguments[0];return this.Restangular.one("item/search").post(null,e).then(function(e){return e.content=t.restangularizedItems(e.content),e})}},{key:"findById",value:function(t,e){return this.Restangular.one("podcast",t).one(this.childRoute,e).get()}},{key:"getItemForPodcastWithPagination",value:function(t,e){return t.one("items").post(null,e)}},{key:"restangularizePodcastItem",value:function(t,e){return this.Restangular.restangularizeCollection(t,e,this.childRoute)}},{key:"restangularizedItems",value:function(t){var e=this,n=[];return angular.forEach(t,function(t){n.push(e.Restangular.restangularizeElement(e.Restangular.one("podcast",t.podcastId),t,e.childRoute))}),n}},{key:"upload",value:function(t,e){var n=new FormData;return n.append("file",e),t.all(this.childRoute).withHttpConfig({transformRequest:angular.identity}).customPOST(n,"upload",void 0,{"Content-Type":void 0})}}]),n}();angular.module("ps.dataService.item",["restangular"]).service("itemService",S);var P=function(){function n(t){e(this,n),this.Restangular=t,this.route="podcast"}return n.$inject=["Restangular"],t(n,[{key:"findById",value:function(t){return this.Restangular.one(this.route,t).get()}},{key:"findAll",value:function(){return this.Restangular.all(this.route).getList()}},{key:"save",value:function(t){return t.save()}},{key:"getNewPodcast",value:function(){return this.Restangular.one(this.route)}},{key:"patch",value:function(t){return t.patch()}},{key:"deletePodcast",value:function(t){return t.remove()}},{key:"findInfo",value:function(t){return this.Restangular.one(this.route).findInfo(t)}},{key:"statsByPubdate",value:function(t){var e=void 0===arguments[1]?6:arguments[1];return this.Restangular.one(this.route,t).one("stats").all("byPubdate").post(e)}},{key:"statsByByDownloaddate",value:function(t){var e=void 0===arguments[1]?6:arguments[1];return this.Restangular.one(this.route,t).one("stats").all("byDownloaddate").post(e)}}]),n}();angular.module("ps.dataService.podcast",["restangular"]).config(["RestangularProvider",function(t){t.addElementTransformer("podcast",!1,function(t){return t.addRestangularMethod("findInfo","post","fetch",void 0,{"Content-Type":"text/plain"}),t})}]).service("podcastService",P);var k=function(){function n(t){e(this,n),this.Restangular=t,this.base=this.Restangular.one("stats")}return n.$inject=["Restangular"],t(n,[{key:"statsByType",value:function(){var t=void 0===arguments[0]?1:arguments[0];return this.base.all("byType").post(t)}}]),n}();angular.module("ps.dataService.stat",["restangular"]).service("statService",k);var D=function(){function n(t){e(this,n),this.baseAll=t.all("tag")}return n.$inject=["Restangular"],t(n,[{key:"getAll",value:function(){return this.baseAll.get()}},{key:"search",value:function(t){return this.baseAll.post(null,{name:t})}}]),n}();angular.module("ps.dataService.tag",["restangular"]).service("tagService",D);var $=function(){function n(t){e(this,n),this.baseAll=t.all("types")}return n.$inject=["Restangular"],t(n,[{key:"findAll",value:function(){return this.baseAll.getList()}}]),n}();angular.module("ps.dataService.type",["restangular"]).service("typeService",$);var I=function(){function n(t){e(this,n),this.Restangular=t}return n.$inject=["Restangular"],t(n,[{key:"forceUpdatePodcast",value:function(t){return this.Restangular.one("task").customPOST(t,"updateManager/updatePodcast/force")}}]),n}();angular.module("ps.dataService.updateService",["restangular"]).service("UpdateService",I);var x=function q(){e(this,q),this.restrict="E",this.templateUrl="html/podcast-details-edition.html",this.scope={podcast:"="},this.controller="podcastEditionCtrl",this.controllerAs="pec",this.bindToController=!0},T=function(){function n(t,a,i,s){e(this,n),this.$scope=t,this.$location=a,this.tagService=i,this.podcastService=s}return n.$inject=["$scope","$location","tagService","podcastService"],t(n,[{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"save",value:function(){
-var t=this,e=_.cloneDeep(this.podcast);return e.items=null,this.podcastService.patch(e).then(function(e){return _.assign(t.podcast,e)}).then(function(){return t.$scope.$emit("podcastEdition:save")})}},{key:"deletePodcast",value:function(){var t=this;return this.podcastService.deletePodcast(this.podcast).then(function(){return t.$location.path("/podcasts")})}}]),n}();angular.module("ps.podcast.details.edition",["ps.dataService.podcast","ps.dataService.tag","ngTagsInput"]).directive("podcastEdition",function(){return new x}).controller("podcastEditionCtrl",T);var C=function z(){e(this,z),this.restrict="E",this.templateUrl="html/podcast-details-episodes.html",this.scope={podcast:"="},this.controller="podcastItemsListCtrl",this.controllerAs="pic",this.bindToController=!0},A=function(){function n(t,a,i,s,o){var l=this;e(this,n),this.$scope=t,this.DownloadManager=a,this.itemService=s,this.playlistService=o,this.currentPage=1,this.itemPerPage=i,this.loadPage(),this.$scope.$on("podcastItems:refresh",function(){l.currentPage=1,l.loadPage()}),this.DownloadManager.ws.subscribe("/topic/podcast/".concat(this.podcast.id),function(t){return l.onMessageFromWS(t)},t)}return n.$inject=["$scope","DonwloadManager","PodcastItemPerPage","itemService","playlistService"],t(n,[{key:"onMessageFromWS",value:function(t){var e=JSON.parse(t.body),n=_.find(this.podcast.items,{id:e.id});_.assign(n,e)}},{key:"loadPage",value:function(){var t=this;return this.currentPage=this.currentPage<1?1:this.currentPage>Math.ceil(this.totalItems/this.itemPerPage)?Math.ceil(this.totalItems/this.itemPerPage):this.currentPage,this.itemService.getItemForPodcastWithPagination(this.podcast,{size:this.itemPerPage,page:this.currentPage-1,direction:"DESC",properties:"pubdate"}).then(function(e){t.podcast.items=t.itemService.restangularizePodcastItem(t.podcast,e.content),t.podcast.totalItems=e.totalElements})}},{key:"remove",value:function(t){var e=this;t.remove().then(function(){return e.podcast.items=_.reject(e.podcast.items,function(e){return e.id===t.id})}).then(function(){return e.playlistService.remove(t)}).then(function(){return e.loadPage()})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(t){var n=_.find(e.podcast.items,{id:t.id});return _.assign(n,t),n}).then(function(t){return e.playlistService.remove(t)})}},{key:"addOrRemoveInPlaylist",value:function(t){this.playlistService.addOrRemove(t)}},{key:"isInPlaylist",value:function(t){return this.playlistService.contains(t)}},{key:"swipePage",value:function(t){this.currentPage+=t,this.loadPage()}},{key:"stopDownload",value:function(t){this.DownloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DownloadManager.ws.toggle(t)}}]),n}();angular.module("ps.podcast.details.episodes",["ps.player"]).directive("podcastItemsList",function(){return new C}).constant("PodcastItemPerPage",10).controller("podcastItemsListCtrl",A);var R=function(){function n(t,a,i){var s=this;e(this,n),this.$scope=t,this.UpdateService=i,this.podcast=a,this.podcastTabs=[{heading:"Episodes",active:!0},{heading:"Edition",active:!1},{heading:"Upload",disabled:"send"!==this.podcast.type},{heading:"Stats",active:!1}],this.$scope.$on("podcastEdition:save",function(){return s.refreshItems()}),this.$scope.$on("podcastEdition:upload",function(){return s.refreshItems()})}return n.$inject=["$scope","podcast","UpdateService"],t(n,[{key:"refreshItems",value:function(){this.$scope.$broadcast("podcastItems:refresh")}},{key:"refresh",value:function(){var t=this;this.UpdateService.forceUpdatePodcast(this.podcast.id).then(function(){return t.refreshItems()})}},{key:"tabsActive",value:function(t){this.podcastTabs[t].active=!0}}]),n}();angular.module("ps.podcast.details",["ps.config.route","ps.podcast.details","ps.podcast.details.episodes","ps.podcast.details.edition","ps.podcast.details.upload","ps.podcast.details.stats","ps.dataService.updateService"]).config(["$routeProvider","commonKey",function(t,e){return t.when("/podcasts/:podcastId",{templateUrl:"html/podcast-detail.html",controller:"PodcastDetailCtrl",controllerAs:"pdc",hotkeys:e,resolve:{podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("PodcastDetailCtrl",R);var M=function W(){e(this,W),this.restrict="E",this.scope={podcast:"="},this.templateUrl="html/podcast-details-stats.html",this.controller="PodcastDetailsStatsCtrl",this.controllerAs="pdsc",this.bindToController=!0},O=function(){function n(t,a,i){var s=this;e(this,n),this.$q=a,this.podcastService=i,this.month=6,this.chartSeries=[],this.generateChartData(),this.chartConfig={options:{chart:{type:"spline"},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{type:"datetime",dateTimeLabelFormats:{month:"%e. %b",year:"%b"},title:{text:"Date"}}},series:this.chartSeries,title:{text:""},credits:{enabled:!1},loading:!1},t.$on("podcastItems:refresh",function(){return s.generateChartData()})}return n.$inject=["$scope","$q","podcastService"],t(n,[{key:"navigate",value:function(t){return this.month+=t,this.generateChartData()}},{key:"generateChartData",value:function(){var t=this;return n.resetChart(this.chartSeries),this.$q.all([this.podcastService.statsByByDownloaddate(this.podcast.id,this.month),this.podcastService.statsByPubdate(this.podcast.id,this.month)]).then(function(e){var a=_(e[0]).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value(),i=_(e[1]).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value();return t.chartSeries.push({name:"Download Date",data:a}),t.chartSeries.push({name:"Publication Date",data:i}),t.chartSeries})}}],[{key:"resetChart",value:function(t){_.updateinplace(t,[])}},{key:"dateMapper",value:function(){return function(t){return{date:Date.UTC(t.date[0],t.date[1]-1,t.date[2]),numberOfItems:t.numberOfItems}}}},{key:"highChartsMapper",value:function(){return function(t){return[t.date,t.numberOfItems]}}}]),n}();angular.module("ps.podcast.details.stats",["highcharts-ng"]).directive("podcastStats",function(){return new M}).controller("PodcastDetailsStatsCtrl",O);var L=function F(){e(this,F),this.restrcit="E",this.templateUrl="html/podcast-details-upload.html",this.scope={podcast:"="},this.controller="podcastUploadCtrl",this.controllerAs="puc",this.bindToController=!0},U=function(){function n(t,a,i){e(this,n),this.$scope=t,this.itemService=a,this.$notification=i}return n.$inject=["$scope","itemService","$notification"],t(n,[{key:"onFileSelect",value:function(t){var e=this;angular.forEach(t,function(t){e.itemService.upload(e.podcast,t).then(function(t){e.$scope.$emit("podcastEdition:upload");try{e.$notification("Upload effectué",{body:t.title,icon:t.cover.url,delay:5e3})}catch(n){}})})}}]),n}();angular.module("ps.podcast.details.upload",["ps.dataService.item","ngFileUpload","notification"]).directive("podcastUpload",function(){return new L}).controller("podcastUploadCtrl",U)}();
+!function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var e=function(){function t(t,e){for(var n=0;n]+>/gm,"")}}),_.mixin({updateinplace:function(t,e){var n=void 0===arguments[2]?function(t,e){return t.indexOf(e)}:arguments[2],a=void 0===arguments[3]?!1:arguments[3];return _.forEachRight(t.slice(),function(a,i){return-1===n(e,a)&&t.splice(i,1)}),_.forEach(e,function(e){return-1===n(t,e)&&t.push(e)}),a&&_.forEach(e,function(e,a){var i=t.splice(n(t,e),1)[0];t.splice(a,0,i)}),t}});var s=function B(){t(this,B),this.navCollapsed=!0},o=function(){function n(){t(this,n),this.transclude=!0,this.replace=!0,this.restrict="E",this.scope=!0,this.templateUrl="html/navbar.html",this.controller="navbarController",this.controllerAs="navbar"}return e(n,[{key:"link",value:function(t,e){e.removeClass("hidden")}}]),n}();angular.module("navbar",[]).directive("navbar",function(){return new o}).controller("navbarController",s);var l=function(){function n(){t(this,n),this.restrict="E",this.scope=!0,this.templateUrl="html/updating.html",this.controller="UpdatingController",this.controllerAs="uc"}return e(n,[{key:"link",value:function(t,e){var n=e.parent().parent()[0];n&&"LI"===n.tagName&&!function(){var e=angular.element(n);e.addClass("hidden"),t.$watch("uc.isUpdating",function(t){return t?e.removeClass("hidden"):e.addClass("hidden")})}()}}]),n}(),r=function(){function n(e,a){var i=this;t(this,n),this.ngstomp=e,this.isUpdating=!1,this.$scope=a,this.ngstomp.subscribe("/app/updating",function(t){return i.updateStatus(t)},a).subscribe("/topic/updating",function(t){return i.updateStatus(t)},a)}return n.$inject=["ngstomp","$scope"],e(n,[{key:"updateStatus",value:function(t){this.isUpdating=JSON.parse(t.body)}}]),n}();angular.module("updating",["AngularStompDK"]).directive("updateStatus",function(){return new l}).controller("UpdatingController",r),angular.module("ps.config",["ps.config.route","ps.config.loading","ps.config.restangular","ps.config.ngstomp","ps.config.module"]),angular.module("ps.config.loading",["angular-loading-bar"]).config(["cfpLoadingBarProvider",function(t){t.includeSpinner=!1}]),angular.module("ps.config.module",["ngTouch","ngAnimate","ui.bootstrap","truncate","ngFileUpload"]),angular.module("ps.config.ngstomp",["AngularStompDK"]).config(["ngstompProvider",function(t){return t.url("/ws").credential("login","password")["class"](SockJS)}]),angular.module("ps.config.restangular",["restangular"]).config(["RestangularProvider",function(t){t.setBaseUrl("/api/"),t.addElementTransformer("items",!1,function(t){return t.addRestangularMethod("reset","get","reset"),t.addRestangularMethod("download","get","addtoqueue"),t})}]),angular.module("ps.partial",[]).run(["$templateCache",function(t){t.put("html/authorize-notification.html",'\n'),t.put("html/download.html",'\n\n
\n
\n\n\n
\n\n
\n \n \n Liste d\'attente {{ dc.waitingitems.length }}\n \n \n\n \n \n\n\n
'),t.put("html/item-detail.html",'\n\n\n
\n
\n - Podcasts
\n - {{ idc.item.podcast.title }}
\n - {{ idc.item.title }}
\n
\n\n
\n
\n
\n
\n
\n \n\n
\n\n
\n \n
\n \n \n \n\n \n
\n\n
\n\n \n
\n \n \n \n\n
\n \n \n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
{{ idc.item.title }}
\n \n
\n {{ idc.item.description | htmlToPlaintext }}\n
\n \n
\n
\n\n
\n
\n\n'),t.put("html/item-player.html",''),t.put("html/items-search.html",'\n\n \n\n
\n\n
\n
\n
\n \n
\n
\n'),t.put("html/navbar.html",''),t.put("html/player.html",'\n
\n
\n
\n \n\n \n \n {{ currentTime | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n {{ timeLeft | date:\'H:mm:ss\':\'+0000\' }}\n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n\n
'),t.put("html/podcast-creation.html",'\n
\n
Ajouter un Podcast
\n \n
\n\n\n\n\n\n'),t.put("html/podcast-detail.html",'\n\n\n\n\n\n'),t.put("html/podcast-details-edition.html",'
\n\n \n \n \n \n \n \n \n \n \n\n'),
+t.put("html/podcast-details-episodes.html",'
\n\n\n '),t.put("html/podcast-details-stats.html",'
\n\n\n \n
\n'),t.put("html/podcast-details-upload.html",'
\n\n
\n
\n Déposer un ou des fichiers ici\n
\n
\n
\n'),t.put("html/podcasts-list.html",'\n\n'),t.put("html/stats.html",''),t.put("html/updating.html",'\n \n')}]),angular.module("ps.config.route",["ngRoute","cfp.hotkeys"]).constant("commonKey",[["h","Goto Home",function(t){t.preventDefault(),window.location.href="/items"}],["s","Goto Search",function(t){t.preventDefault(),window.location.href="/item/search"}],["p","Goto Podcast List",function(t){t.preventDefault(),window.location.href="/podcasts"}],["d","Goto Download List",function(t){t.preventDefault(),window.location.href="/download"}]]).config(["$routeProvider",function(t){return t.otherwise({redirectTo:"/items"})}]).config(["$locationProvider",function(t){return t.html5Mode(!0)}]);var c=function(){function n(e,a,i){var s=this;t(this,n),this.DonwloadManager=a,this.$notification=i,this.items=[],this.waitingitems=[],this.numberOfSimDl=0,this.DonwloadManager.getNumberOfSimDl().then(function(t){s.numberOfSimDl=parseInt(t)}),this.DonwloadManager.ws.subscribe("/app/download",function(t){return s.onSubscribeDownload(t)},e).subscribe("/app/waiting",function(t){return s.onSubscribeWaiting(t)},e).subscribe("/topic/download",function(t){return s.onDownloadUpdate(t)},e).subscribe("/topic/waiting",function(t){return s.onWaitingUpdate(t)},e)}return n.$inject=["$scope","DonwloadManager","$notification"],e(n,[{key:"onSubscribeDownload",value:function(t){this.items=JSON.parse(t.body)}},{key:"onSubscribeWaiting",value:function(t){this.waitingitems=JSON.parse(t.body)}},{key:"onDownloadUpdate",value:function(t){var e=JSON.parse(t.body),n=_.find(this.items,{id:e.id});switch(e.status){case"Started":case"Paused":n?_.assign(n,e):this.items.push(e);break;case"Finish":try{this.$notification("Téléchargement terminé",{body:e.title,icon:e.cover.url,delay:5e3})}catch(a){}this.onStoppedFromWS(n);break;case"Stopped":this.onStoppedFromWS(n)}}},{key:"onStoppedFromWS",value:function(t){t&&_.remove(this.items,function(e){return e.id===t.id})}},{key:"onWaitingUpdate",value:function(t){var e=JSON.parse(t.body);_.updateinplace(this.waitingitems,e,function(t,e){return _.findIndex(t,{id:e.id})},!0)}},{key:"getTypeFromStatus",value:function(t){return"Paused"===t.status?"warning":"info"}},{key:"updateNumberOfSimDl",value:function(t){this.DonwloadManager.updateNumberOfSimDl(t)}},{key:"download",value:function(t){this.DonwloadManager.download(t)}},{key:"stopDownload",value:function(t){this.DonwloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DonwloadManager.ws.toggle(t)}},{key:"stopAllDownload",value:function(){this.DonwloadManager.stopAllDownload()}},{key:"pauseAllDownload",value:function(){this.DonwloadManager.pauseAllDownload()}},{key:"restartAllCurrentDownload",value:function(){this.DonwloadManager.restartAllCurrentDownload()}},{key:"removeFromQueue",value:function(t){this.DonwloadManager.removeFromQueue(t)}},{key:"dontDonwload",value:function(t){this.DonwloadManager.dontDonwload(t)}},{key:"moveInWaitingList",value:function(t,e){this.DonwloadManager.moveInWaitingList(t,e)}}]),n}();angular.module("ps.download",["ps.config.route","ps.dataService.donwloadManager","notification"]).config(["$routeProvider","commonKey",function(t,e){return t.when("/download",{templateUrl:"html/download.html",controller:"DownloadCtrl",controllerAs:"dc",hotkeys:e})}]).controller("DownloadCtrl",c);var d=function(){function n(e,a,i,s,o,l){var r=this;t(this,n),this.item=l,this.$location=i,this.item.podcast=o,this.playlistService=s,this.DonwloadManager=a;var c="/topic/podcast/".concat(this.item.podcast.id);this.DonwloadManager.ws.subscribe(c,function(t){var e=JSON.parse(t.body);e.id==r.item.id&&_.assign(r.item,e)},e)}return n.$inject=["$scope","DonwloadManager","$location","playlistService","podcast","item"],e(n,[{key:"stopDownload",value:function(t){this.DonwloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DonwloadManager.ws.toggle(t)}},{key:"remove",value:function(t){var e=this;return t.remove().then(function(){e.playlistService.remove(t),e.$location.path("/podcasts/".concat(e.item.podcast.id))})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(n){_.assign(e.item,n),e.playlistService.remove(t)})}},{key:"toggleInPlaylist",value:function(){this.playlistService.addOrRemove(this.item)}},{key:"isInPlaylist",value:function(){return this.playlistService.contains(this.item)}}]),n}();angular.module("ps.item.details",["ps.dataService.donwloadManager","ps.player"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcasts/:podcastId/item/:itemId",{templateUrl:"html/item-detail.html",controller:"ItemDetailCtrl",controllerAs:"idc",hotkeys:e,resolve:{item:["itemService","$route",function(t,e){return t.findById(e.current.params.podcastId,e.current.params.itemId)}],podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("ItemDetailCtrl",d),angular.module("ps.item",["ps.item.details","ps.item.player"]);var u=function j(e,n,a,i){t(this,j),this.item=n,this.item.podcast=e,this.$timeout=a,this.config={autoPlay:!0,sources:[{src:this.item.proxyURL,type:this.item.mimeType}],plugins:{controls:{autoHide:!i.isTouchedDevice(),autoHideTime:2e3},poster:this.item.cover.url}}};u.$inject=["podcast","item","$timeout","deviceDetectorService"],angular.module("ps.item.player",["ngSanitize","ngRoute","device-detection","com.2fdevs.videogular","com.2fdevs.videogular.plugins.poster","com.2fdevs.videogular.plugins.controls","com.2fdevs.videogular.plugins.overlayplay","com.2fdevs.videogular.plugins.buffering"]).config(["$routeProvider",function(t){t.when("/podcasts/:podcastId/item/:itemId/play",{templateUrl:"html/item-player.html",controller:"ItemPlayerController",controllerAs:"ipc",resolve:{item:["itemService","$route",function(t,e){return t.findById(e.current.params.podcastId,e.current.params.itemId)}],podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("ItemPlayerController",u);var p=function(){function n(e,a,i){t(this,n),this.playlistService=e,this.$timeout=a,this.playlist=[],this.state=null,this.API=null,this.currentVideo={},this.config={autoPlay:!0,sources:[],plugins:{controls:{autoHide:!i.isTouchedDevice(),autoHideTime:2e3},poster:""}},this.reloadPlaylist()}return n.$inject=["playlistService","$timeout","deviceDetectorService"],e(n,[{key:"onPlayerReady",value:function(t){this.API=t,("play"==this.API.currentState||this.isCompleted)&&this.API.play(),this.isCompleted=!1,this.setVideo(0)}},{key:"onCompleteVideo",value:function(){var t=this.getIndexOfVideoInPlaylist(this.currentVideo);return this.isCompleted=!0,t+1===this.playlist.length?void(this.currentVideo=this.playlist[0]):void this.setVideo(t+1)}},{key:"reloadPlaylist",value:function(){_.updateinplace(this.playlist,this.playlistService.playlist(),function(t,e){return _.findIndex(t,{id:e.id})})}},{key:"setVideo",value:function(t){this.currentVideo=this.playlist[t],null!==this.currentVideo&&void 0!==this.currentVideo&&(this.API.stop(),this.config.sources=[{src:this.currentVideo.proxyURL,type:this.currentVideo.mimeType}],this.config.plugins.poster=this.currentVideo.cover.url)}},{key:"remove",value:function(t){this.playlistService.remove(t),this.reloadPlaylist(),this.config.sources.length>0&&this.config.sources[0].src===t.proxyURL&&this.setVideo(0)}},{key:"removeAll",value:function(){this.playlistService.removeAll(),this.reloadPlaylist()}},{key:"getIndexOfVideoInPlaylist",value:function(t){return this.playlist.indexOf(t)}}]),n}();angular.module("ps.player",["ngSanitize","ngRoute","device-detection","com.2fdevs.videogular","com.2fdevs.videogular.plugins.poster","com.2fdevs.videogular.plugins.controls","com.2fdevs.videogular.plugins.overlayplay","com.2fdevs.videogular.plugins.buffering","ps.player.playlist"]).config(["$routeProvider",function(t){t.when("/player",{templateUrl:"html/player.html",controller:"PlayerController",controllerAs:"pc"})}]).controller("PlayerController",p);var g=function(){function n(e){t(this,n),this.$localStorage=e,this.$localStorage.playlist=this.$localStorage.playlist||[]}return n.$inject=["$localStorage"],e(n,[{key:"playlist",value:function(){return this.$localStorage.playlist}},{key:"add",value:function(t){this.$localStorage.playlist.push(t)}},{key:"remove",value:function(t){this.$localStorage.playlist=_.remove(this.$localStorage.playlist,function(e){return e.id!==t.id})}},{key:"contains",value:function(t){return angular.isObject(_.find(this.$localStorage.playlist,{id:t.id}))}},{key:"addOrRemove",value:function(t){this.contains(t)?this.remove(t):this.add(t)}},{key:"removeAll",value:function(){this.$localStorage.playlist=[]}}]),n}();angular.module("ps.player.playlist",["ngStorage"]).service("playlistService",g);var h=function(){function n(e,a,i,s,o){t(this,n),this.podcastService=s,this.$location=e,this.tagService=i,this.podcast=angular.extend(this.podcastService.getNewPodcast(),a),this.types=o}return n.$inject=["$location","defaultPodcast","tagService","podcastService","types"],e(n,[{key:"findInfo",value:function(){var t=this;return this.podcastService.findInfo(this.podcast.url).then(function(e){t.podcast.title=e.title,t.podcast.description=e.description,t.podcast.type=e.type,t.podcast.cover.url=e.cover.url})}},{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"changeType",value:function(){this.podcast.type=/beinsports\.fr/i.test(this.podcast.url)?"BeInSports":/canalplus\.fr/i.test(this.podcast.url)?"CanalPlus":/jeuxvideo\.fr/i.test(this.podcast.url)?"JeuxVideoFR":/jeuxvideo\.com/i.test(this.podcast.url)?"JeuxVideoCom":/parleys\.com/i.test(this.podcast.url)?"Parleys":/pluzz\.francetv\.fr/i.test(this.podcast.url)?"Pluzz":/youtube\.com/i.test(this.podcast.url)?"Youtube":this.podcast.url.length>0?"RSS":"Send"}},{key:"save",value:function(){var t=this;this.podcastService.save(this.podcast).then(function(e){return t.$location.path("/podcasts/"+e.id)})}}]),n}();angular.module("ps.podcast.creation",["ps.config.route","ps.dataservice","ngTagsInput"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcast-creation",{templateUrl:"html/podcast-creation.html",controller:"PodcastAddCtrl",controllerAs:"pac",hotkeys:e,resolve:{types:["typeService",function(t){return t.findAll()}]}})}]).constant("defaultPodcast",{hasToBeDeleted:!0,cover:{height:200,width:200}}).controller("PodcastAddCtrl",h);var m=function N(e,n){t(this,N),this.podcasts=e,this.types=n,this.filters={title:"",type:""}};m.$inject=["podcasts","types"],angular.module("ps.podcast.list",["ps.config.route","ps.dataService.podcast","ps.dataService.type"]).config(["$routeProvider","commonKey",function(t,e){t.when("/podcasts",{templateUrl:"html/podcasts-list.html",controller:"PodcastsListCtrl",controllerAs:"plc",hotkeys:e,resolve:{podcasts:["podcastService",function(t){return t.findAll()}],types:["typeService",function(t){return t.findAll()}]}})}]).controller("PodcastsListCtrl",m),angular.module("ps.podcast",["ps.podcast.details","ps.podcast.creation","ps.podcast.list"]);var v=function(){function n(e,a){t(this,n),this.$sessionStorage=a,this.$sessionStorage.searchParameters=e}return n.$inject=["DefaultItemSearchParameters","$sessionStorage"],e(n,[{key:"getParameters",value:function(){return this.$sessionStorage.searchParameters}},{key:"page",value:function(t){return angular.isNumber(t)&&(this.$sessionStorage.searchParameters.page=t),this.$sessionStorage.searchParameters.page}},{key:"size",value:function(t){return angular.isNumber(t)&&(this.$sessionStorage.searchParameters.size=t),this.$sessionStorage.searchParameters.size}},{key:"updateSearchParam",value:function(t){this.$sessionStorage.searchParameters.term=t.term,this.$sessionStorage.searchParameters.tags=t.tags,this.$sessionStorage.searchParameters.direction=t.direction,this.$sessionStorage.searchParameters.properties=t.properties}}]),n}(),f=function(){function n(e,a,i,s,o,l,r,c){var d=this;t(this,n),this.$location=i,this.itemService=s,this.tagService=o,this.DownloadManager=l,this.playlistService=r,this.SearchItemCache=a,this.totalItems=Number.MAX_VALUE,this.maxSize=10,this.currentPage=this.SearchItemCache.page()+1,this.searchParameters=this.SearchItemCache.getParameters(),this.DownloadManager.ws.subscribe("/topic/download",function(t){return d.updateItemFromWS(t)},e),e.$on("$routeUpdate",function(){d.currentPage!==d.$location.search().page&&(d.currentPage=d.$location.search().page||1,d.changePage())}),this.attachResponse(c)}return n.$inject=["$scope","SearchItemCache","$location","itemService","tagService","DonwloadManager","playlistService","items"],e(n,[{key:"updateItemFromWS",value:function(t){var e=JSON.parse(t.body),n=_.find(this.items,{id:e.id});n&&_.assign(n,e)}},{key:"changePage",value:function(){var t=this;return this.SearchItemCache.page(this.calculatePage()),this.itemService.search(this.SearchItemCache.getParameters()).then(function(e){return t.attachResponse(e)})}},{key:"attachResponse",value:function(t){this.items=t.content,this.totalPages=t.totalPages,this.totalItems=t.totalElements,this.currentPage=this.SearchItemCache.page(t.number)+1,this.$location.search("page",this.currentPage)}},{key:"swipePage",value:function(t){return this.currentPage=this.SearchItemCache.page()+t+1,this.changePage()}},{key:"remove",value:function(t){var e=this;return t.remove().then(function(){return e.playlistService.remove(t)}).then(function(){return e.changePage()})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(t){var n=_.find(e.items,{id:t.id});return _.assign(n,t),n}).then(function(t){return e.playlistService.remove(t)})}},{key:"stopDownload",value:function(t){this.DownloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){return this.DownloadManager.ws.toggle(t)}},{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"addOrRemove",value:function(t){return this.playlistService.addOrRemove(t)}},{key:"isInPlaylist",value:function(t){return this.playlistService.contains(t)}},{key:"calculatePage",value:function(){return this.currentPage<=1?0:this.currentPage>Math.ceil(this.totalItems/this.SearchItemCache.size())?Math.ceil(this.totalItems/this.SearchItemCache.size())-1:this.currentPage-1}},{key:"resetSearch",value:function(){return this.currentPage=1,this.SearchItemCache.updateSearchParam(this.searchParameters),this.changePage()}}]),n}();angular.module("ps.search.item",["ps.dataService.donwloadManager","ps.dataService.item","ps.dataService.tag","ps.player","ps.config.route","ngTagsInput","ngStorage"]).config(["$routeProvider","commonKey",function(t,e){t.when("/items",{templateUrl:"html/items-search.html",controller:"ItemsSearchCtrl",controllerAs:"isc",reloadOnSearch:!1,hotkeys:[["right","Next page","isc.swipePage(1)"],["left","Previous page","isc.swipePage(-1)"]].concat(e),resolve:{items:["itemService","SearchItemCache",function(t,e){return t.search(e.getParameters())}]}})}]).constant("DefaultItemSearchParameters",{page:0,size:12,term:void 0,tags:void 0,direction:"DESC",properties:"pubdate"}).controller("ItemsSearchCtrl",f).service("SearchItemCache",v),angular.module("ps.search",["ps.search.item"]);var y=function(){function n(e,a){t(this,n),this.statService=e,this.month=1,this.chartSeries=[],this.transform(a),this.chartConfig={options:{chart:{type:"spline"},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{type:"datetime",dateTimeLabelFormats:{month:"%e. %b",year:"%b"},title:{text:"Date"}}},series:this.chartSeries,title:{text:""},credits:{enabled:!1},loading:!1}}return n.$inject=["statService","stats"],e(n,[{key:"transform",value:function(t){var e=this;_.updateinplace(this.chartSeries,[]),angular.forEach(t,function(t){var a={name:t.type};a.data=_(t.values).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value(),e.chartSeries.push(a)})}},{key:"navigate",value:function(t){this.month+=t,this.generateChartData()}},{key:"generateChartData",value:function(){var t=this;return this.statService.statsByType(this.month).then(function(e){return t.transform(e)})}}],[{key:"dateMapper",value:function(){return function(t){return{date:Date.UTC(t.date[0],t.date[1]-1,t.date[2]),numberOfItems:t.numberOfItems}}}},{key:"highChartsMapper",value:function(){return function(t){return[t.date,t.numberOfItems]}}}]),n}();angular.module("ps.stats",["ps.dataService.stat"]).config(["$routeProvider","commonKey",function(t,e){t.when("/stats",{templateUrl:"html/stats.html",controller:"StatsController",controllerAs:"sc",hotkeys:e,resolve:{stats:["statService",function(t){return t.statsByType()}]}})}]).controller("StatsController",y),angular.module("ps.dataservice",["ps.dataService.donwloadManager","ps.dataService.item","ps.dataService.podcast","ps.dataService.tag","ps.dataService.type","ps.dataService.updateService"]);var b=function(){function n(e,a){t(this,n),this.WS_DOWNLOAD_BASE=e,this.ngstomp=a}return e(n,[{key:"connect",value:function(){return this.ngstomp.connect()}},{key:"subscribe",value:function(t,e,n){return this.ngstomp.subscribe(t,e,n)}},{key:"unsubscribe",value:function(t){return this.ngstomp.unsubscribe(t)}},{key:"toggle",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/toogle",t)}},{key:"start",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/start",t)}},{key:"pause",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/pause",t)}},{key:"stop",value:function(t){return this.ngstomp.send(this.WS_DOWNLOAD_BASE+"/stop",t)}}]),n}(),w=function(){function n(e,a){t(this,n),this.Restangular=e,this.baseTask=this.Restangular.one("task"),this.baseDownloadManager=this.baseTask.one("downloadManager"),this.WS_DOWNLOAD_BASE="/app/download",this.ws=new b(this.WS_DOWNLOAD_BASE,a)}return n.$inject=["Restangular","ngstomp"],e(n,[{key:"download",value:function(t){return this.Restangular.one("item").customGET(t.id+"/addtoqueue")}},{key:"stopDownload",value:function(t){return this.baseDownloadManager.customPOST(t.id,"stopDownload")}},{key:"toggleDownload",value:function(t){return this.baseDownloadManager.customPOST(t.id,"toogleDownload")}},{key:"stopAllDownload",value:function(){return this.baseDownloadManager.customGET("stopAllDownload")}},{key:"pauseAllDownload",value:function(){return this.baseDownloadManager.customGET("pauseAllDownload")}},{key:"restartAllCurrentDownload",value:function(){return this.baseDownloadManager.customGET("restartAllCurrentDownload")}},{key:"removeFromQueue",value:function(t){return this.baseDownloadManager.customDELETE("queue/"+t.id)}},{key:"updateNumberOfSimDl",value:function(t){return this.baseDownloadManager.customPOST(t,"limit")}},{key:"dontDonwload",value:function(t){return this.baseDownloadManager.customDELETE("queue/"+t.id+"/andstop")}},{key:"getDownloading",value:function(){return this.baseTask.all("downloadManager/downloading").getList()}},{key:"getNumberOfSimDl",value:function(){return this.baseDownloadManager.one("limit").get()}},{key:"moveInWaitingList",value:function(t,e){this.baseDownloadManager.customPOST({id:t.id,position:e},"move")}}]),n}();angular.module("ps.dataService.donwloadManager",["restangular","AngularStompDK"]).service("DonwloadManager",w);var S=function(){function n(e){t(this,n),this.Restangular=e,this.childRoute="items"}return n.$inject=["Restangular"],e(n,[{key:"search",value:function(){var t=this,e=void 0===arguments[0]?{page:0,size:12}:arguments[0];return this.Restangular.one("item/search").post(null,e).then(function(e){return e.content=t.restangularizedItems(e.content),e})}},{key:"findById",value:function(t,e){return this.Restangular.one("podcast",t).one(this.childRoute,e).get()}},{key:"getItemForPodcastWithPagination",value:function(t,e){return t.one("items").post(null,e)}},{key:"restangularizePodcastItem",value:function(t,e){return this.Restangular.restangularizeCollection(t,e,this.childRoute)}},{key:"restangularizedItems",value:function(t){var e=this,n=[];return angular.forEach(t,function(t){n.push(e.Restangular.restangularizeElement(e.Restangular.one("podcast",t.podcastId),t,e.childRoute))}),n}},{key:"upload",value:function(t,e){var n=new FormData;return n.append("file",e),t.all(this.childRoute).withHttpConfig({transformRequest:angular.identity}).customPOST(n,"upload",void 0,{"Content-Type":void 0})}}]),n}();angular.module("ps.dataService.item",["restangular"]).service("itemService",S);var P=function(){function n(e){t(this,n),this.Restangular=e,this.route="podcast"}return n.$inject=["Restangular"],e(n,[{key:"findById",value:function(t){return this.Restangular.one(this.route,t).get()}},{key:"findAll",value:function(){return this.Restangular.all(this.route).getList()}},{key:"save",value:function(t){return t.save()}},{key:"getNewPodcast",value:function(){return this.Restangular.one(this.route)}},{key:"patch",value:function(t){return t.patch()}},{key:"deletePodcast",value:function(t){return t.remove()}},{key:"findInfo",value:function(t){return this.Restangular.one(this.route).findInfo(t)}},{key:"statsByPubdate",value:function(t){var e=void 0===arguments[1]?6:arguments[1];return this.Restangular.one(this.route,t).one("stats").all("byPubdate").post(e)}},{key:"statsByByDownloaddate",value:function(t){var e=void 0===arguments[1]?6:arguments[1];return this.Restangular.one(this.route,t).one("stats").all("byDownloaddate").post(e)}}]),n}();angular.module("ps.dataService.podcast",["restangular"]).config(["RestangularProvider",function(t){t.addElementTransformer("podcast",!1,function(t){return t.addRestangularMethod("findInfo","post","fetch",void 0,{"Content-Type":"text/plain"}),t})}]).service("podcastService",P);var k=function(){function n(e){t(this,n),this.Restangular=e,this.base=this.Restangular.one("stats")}return n.$inject=["Restangular"],e(n,[{key:"statsByType",value:function(){var t=void 0===arguments[0]?1:arguments[0];return this.base.all("byType").post(t)}}]),n}();angular.module("ps.dataService.stat",["restangular"]).service("statService",k);var D=function(){function n(e){t(this,n),this.baseAll=e.all("tag")}return n.$inject=["Restangular"],e(n,[{key:"getAll",value:function(){return this.baseAll.get()}},{key:"search",value:function(t){return this.baseAll.post(null,{name:t})}}]),n}();angular.module("ps.dataService.tag",["restangular"]).service("tagService",D);var $=function(){function n(e){t(this,n),this.baseAll=e.all("types")}return n.$inject=["Restangular"],e(n,[{key:"findAll",value:function(){return this.baseAll.getList()}}]),n}();angular.module("ps.dataService.type",["restangular"]).service("typeService",$);var I=function(){function n(e){t(this,n),this.Restangular=e}return n.$inject=["Restangular"],e(n,[{key:"forceUpdatePodcast",value:function(t){return this.Restangular.one("task").customPOST(t,"updateManager/updatePodcast/force")}}]),n}();angular.module("ps.dataService.updateService",["restangular"]).service("UpdateService",I);var x=function q(){t(this,q),this.restrict="E",this.templateUrl="html/podcast-details-edition.html",this.scope={podcast:"="},this.controller="podcastEditionCtrl",this.controllerAs="pec",this.bindToController=!0},T=function(){function n(e,a,i,s){t(this,n),this.$scope=e,this.$location=a,this.tagService=i,this.podcastService=s}return n.$inject=["$scope","$location","tagService","podcastService"],e(n,[{key:"loadTags",value:function(t){return this.tagService.search(t)}},{key:"save",value:function(){var t=this,e=_.cloneDeep(this.podcast);return e.items=null,this.podcastService.patch(e).then(function(e){return _.assign(t.podcast,e)}).then(function(){return t.$scope.$emit("podcastEdition:save")})}},{key:"deletePodcast",value:function(){var t=this;return this.podcastService.deletePodcast(this.podcast).then(function(){return t.$location.path("/podcasts")})}}]),n}();angular.module("ps.podcast.details.edition",["ps.dataService.podcast","ps.dataService.tag","ngTagsInput"]).directive("podcastEdition",function(){return new x}).controller("podcastEditionCtrl",T);var C=function z(){t(this,z),this.restrict="E",this.templateUrl="html/podcast-details-episodes.html",this.scope={podcast:"="},this.controller="podcastItemsListCtrl",this.controllerAs="pic",this.bindToController=!0},A=function(){function n(e,a,i,s,o){var l=this;t(this,n),this.$scope=e,this.DownloadManager=a,this.itemService=s,this.playlistService=o,this.currentPage=1,this.itemPerPage=i,this.loadPage(),this.$scope.$on("podcastItems:refresh",function(){l.currentPage=1,l.loadPage()}),this.DownloadManager.ws.subscribe("/topic/podcast/".concat(this.podcast.id),function(t){return l.onMessageFromWS(t)},e)}return n.$inject=["$scope","DonwloadManager","PodcastItemPerPage","itemService","playlistService"],e(n,[{key:"onMessageFromWS",value:function(t){var e=JSON.parse(t.body),n=_.find(this.podcast.items,{id:e.id
+});_.assign(n,e)}},{key:"loadPage",value:function(){var t=this;return this.currentPage=this.currentPage<1?1:this.currentPage>Math.ceil(this.totalItems/this.itemPerPage)?Math.ceil(this.totalItems/this.itemPerPage):this.currentPage,this.itemService.getItemForPodcastWithPagination(this.podcast,{size:this.itemPerPage,page:this.currentPage-1,direction:"DESC",properties:"pubdate"}).then(function(e){t.podcast.items=t.itemService.restangularizePodcastItem(t.podcast,e.content),t.podcast.totalItems=e.totalElements})}},{key:"remove",value:function(t){var e=this;t.remove().then(function(){return e.podcast.items=_.reject(e.podcast.items,function(e){return e.id===t.id})}).then(function(){return e.playlistService.remove(t)}).then(function(){return e.loadPage()})}},{key:"reset",value:function(t){var e=this;return t.reset().then(function(t){var n=_.find(e.podcast.items,{id:t.id});return _.assign(n,t),n}).then(function(t){return e.playlistService.remove(t)})}},{key:"addOrRemoveInPlaylist",value:function(t){this.playlistService.addOrRemove(t)}},{key:"isInPlaylist",value:function(t){return this.playlistService.contains(t)}},{key:"swipePage",value:function(t){this.currentPage+=t,this.loadPage()}},{key:"stopDownload",value:function(t){this.DownloadManager.ws.stop(t)}},{key:"toggleDownload",value:function(t){this.DownloadManager.ws.toggle(t)}}]),n}();angular.module("ps.podcast.details.episodes",["ps.player"]).directive("podcastItemsList",function(){return new C}).constant("PodcastItemPerPage",10).controller("podcastItemsListCtrl",A);var R=function(){function n(e,a,i){var s=this;t(this,n),this.$scope=e,this.UpdateService=i,this.podcast=a,this.podcastTabs=[{heading:"Episodes",active:!0},{heading:"Edition",active:!1},{heading:"Upload",disabled:"send"!==this.podcast.type},{heading:"Stats",active:!1}],this.$scope.$on("podcastEdition:save",function(){return s.refreshItems()}),this.$scope.$on("podcastEdition:upload",function(){return s.refreshItems()})}return n.$inject=["$scope","podcast","UpdateService"],e(n,[{key:"refreshItems",value:function(){this.$scope.$broadcast("podcastItems:refresh")}},{key:"refresh",value:function(){var t=this;this.UpdateService.forceUpdatePodcast(this.podcast.id).then(function(){return t.refreshItems()})}},{key:"tabsActive",value:function(t){this.podcastTabs[t].active=!0}}]),n}();angular.module("ps.podcast.details",["ps.config.route","ps.podcast.details","ps.podcast.details.episodes","ps.podcast.details.edition","ps.podcast.details.upload","ps.podcast.details.stats","ps.dataService.updateService"]).config(["$routeProvider","commonKey",function(t,e){return t.when("/podcasts/:podcastId",{templateUrl:"html/podcast-detail.html",controller:"PodcastDetailCtrl",controllerAs:"pdc",hotkeys:e,resolve:{podcast:["podcastService","$route",function(t,e){return t.findById(e.current.params.podcastId)}]}})}]).controller("PodcastDetailCtrl",R);var M=function W(){t(this,W),this.restrict="E",this.scope={podcast:"="},this.templateUrl="html/podcast-details-stats.html",this.controller="PodcastDetailsStatsCtrl",this.controllerAs="pdsc",this.bindToController=!0},O=function(){function n(e,a,i){var s=this;t(this,n),this.$q=a,this.podcastService=i,this.month=6,this.chartSeries=[],this.generateChartData(),this.chartConfig={options:{chart:{type:"spline"},plotOptions:{spline:{marker:{enabled:!0}}},xAxis:{type:"datetime",dateTimeLabelFormats:{month:"%e. %b",year:"%b"},title:{text:"Date"}}},series:this.chartSeries,title:{text:""},credits:{enabled:!1},loading:!1},e.$on("podcastItems:refresh",function(){return s.generateChartData()})}return n.$inject=["$scope","$q","podcastService"],e(n,[{key:"navigate",value:function(t){return this.month+=t,this.generateChartData()}},{key:"generateChartData",value:function(){var t=this;return n.resetChart(this.chartSeries),this.$q.all([this.podcastService.statsByByDownloaddate(this.podcast.id,this.month),this.podcastService.statsByPubdate(this.podcast.id,this.month)]).then(function(e){var a=_(e[0]).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value(),i=_(e[1]).map(n.dateMapper()).sortBy("date").map(n.highChartsMapper()).value();return t.chartSeries.push({name:"Download Date",data:a}),t.chartSeries.push({name:"Publication Date",data:i}),t.chartSeries})}}],[{key:"resetChart",value:function(t){_.updateinplace(t,[])}},{key:"dateMapper",value:function(){return function(t){return{date:Date.UTC(t.date[0],t.date[1]-1,t.date[2]),numberOfItems:t.numberOfItems}}}},{key:"highChartsMapper",value:function(){return function(t){return[t.date,t.numberOfItems]}}}]),n}();angular.module("ps.podcast.details.stats",["highcharts-ng"]).directive("podcastStats",function(){return new M}).controller("PodcastDetailsStatsCtrl",O);var L=function F(){t(this,F),this.restrcit="E",this.templateUrl="html/podcast-details-upload.html",this.scope={podcast:"="},this.controller="podcastUploadCtrl",this.controllerAs="puc",this.bindToController=!0},U=function(){function n(e,a,i){t(this,n),this.$scope=e,this.itemService=a,this.$notification=i}return n.$inject=["$scope","itemService","$notification"],e(n,[{key:"onFileSelect",value:function(t){var e=this;angular.forEach(t,function(t){e.itemService.upload(e.podcast,t).then(function(t){e.$scope.$emit("podcastEdition:upload");try{e.$notification("Upload effectué",{body:t.title,icon:t.cover.url,delay:5e3})}catch(n){}})})}}]),n}();angular.module("ps.podcast.details.upload",["ps.dataService.item","ngFileUpload","notification"]).directive("podcastUpload",function(){return new L}).controller("podcastUploadCtrl",U)}();
//# sourceMappingURL=podcastserver.min.js.map
\ No newline at end of file
diff --git a/src/main/resources/static/app/js/podcastserver.min.js.map b/src/main/resources/static/app/js/podcastserver.min.js.map
index e9336021a..96f4cd18b 100644
--- a/src/main/resources/static/app/js/podcastserver.min.js.map
+++ b/src/main/resources/static/app/js/podcastserver.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["podcastserver.js"],"names":["_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","_classCallCheck","instance","TypeError","angular","module","authorizeNotificationDirective","this","replace","restrict","scope","templateUrl","controllerAs","controller","authorizeNotificationController","$window","$notification","state","hasToBeShown","$inject","value","_this","requestPermission","then","Notification","permission","directive","deviceDetectorService","service","filter","text","String","_","mixin","updateinplace","localArray","remoteArray","comparisonFunction","undefined","arguments","inArray","elem","indexOf","withOrder","forEachRight","slice","splice","forEach","push","elementToMove","navbarController","navCollapsed","navbarDirective","transclude","element","removeClass","UpdatingDirective","liParent","parent","tagName","liElement","addClass","$watch","newValue","UpdatingController","ngstomp","$scope","_this2","isUpdating","subscribe","message","updateStatus","JSON","parse","body","config","cfpLoadingBarProvider","includeSpinner","ngstompProvider","url","credential","SockJS","RestangularProvider","setBaseUrl","addElementTransformer","item","addRestangularMethod","constant","event","preventDefault","window","location","href","$routeProvider","otherwise","redirectTo","$locationProvider","html5Mode","DownloadCtrl","DonwloadManager","_this3","items","waitingitems","numberOfSimDl","getNumberOfSimDl","parseInt","ws","onSubscribeDownload","onSubscribeWaiting","onDownloadUpdate","onWaitingUpdate","elemToUpdate","find","id","status","assign","title","icon","cover","delay","e","onStoppedFromWS","remove","remoteWaitingItems","findIndex","number","updateNumberOfSimDl","download","stop","toggle","stopAllDownload","pauseAllDownload","restartAllCurrentDownload","removeFromQueue","dontDonwload","position","moveInWaitingList","commonKey","when","hotkeys","ItemDetailCtrl","$location","playlistService","podcast","_this4","webSockedUrl","concat","itemFromWS","_this5","path","_this6","reset","itemReseted","addOrRemove","contains","resolve","itemService","$route","findById","current","params","podcastId","itemId","podcastService","run","$templateCache","put","ItemPlayerController","$timeout","autoPlay","sources","src","proxyURL","type","mimeType","plugins","controls","autoHide","isTouchedDevice","autoHideTime","poster","PlayerController","playlist","API","currentVideo","reloadPlaylist","currentState","isCompleted","play","setVideo","indexOfVideo","getIndexOfVideoInPlaylist","index","removeAll","PlaylistService","$localStorage","isObject","add","PodcastCreationController","defaultPodcast","tagService","types","extend","getNewPodcast","_this7","findInfo","podcastFetched","description","query","search","test","_this8","save","typeService","findAll","hasToBeDeleted","height","width","PodcastsListCtrl","podcasts","filters","SearchItemCache","DefaultItemSearchParameters","$sessionStorage","searchParameters","pageNumber","isNumber","page","sizeNumber","size","searchParam","term","tags","direction","properties","ItemSearchCtrl","_this9","DownloadManager","totalItems","Number","MAX_VALUE","maxSize","currentPage","getParameters","updateItemFromWS","$on","changePage","attachResponse","wsMessage","_this10","calculatePage","itemsResponse","content","totalPages","totalElements","val","_this11","_this12","itemInList","Math","ceil","updateSearchParam","reloadOnSearch","StatsController","statService","stats","month","chartSeries","transform","chartConfig","options","chart","plotOptions","spline","marker","enabled","xAxis","dateTimeLabelFormats","year","series","credits","loading","_this13","name","data","values","map","dateMapper","sortBy","highChartsMapper","offset","generateChartData","_this14","statsByType","date","Date","UTC","numberOfItems","wsDownloadManager","urlBase","WS_DOWNLOAD_BASE","connect","callback","unsubscribe","send","Restangular","baseTask","one","baseDownloadManager","customGET","customPOST","customDELETE","all","getList","get","childRoute","_this15","post","responseFromServer","restangularizedItems","pageParemeters","restangularizeCollection","itemList","_this16","restangularList","restangularizeElement","file","formData","FormData","append","withHttpConfig","transformRequest","identity","Content-Type","route","patch","numberOfMonth","base","baseAll","UpdateService","idPodcast","podcastEditionDirective","bindToController","podcastEditionCtrl","_this17","podcastToUpdate","cloneDeep","patchedPodcast","$emit","_this18","deletePodcast","podcastItemsListDirective","podcastItemsListCtrl","PodcastItemPerPage","_this19","itemPerPage","loadPage","onMessageFromWS","_this20","getItemForPodcastWithPagination","restangularizePodcastItem","_this21","reject","_this22","itemToRemove","PodcastDetailCtrl","_this23","podcastTabs","heading","active","disabled","refreshItems","$broadcast","_this24","forceUpdatePodcast","num","podcastStatsDirective","PodcastDetailsStatsCtrl","$q","_this25","_this26","resetChart","statsByByDownloaddate","statsByPubdate","arrayResult","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oBAnFvCgF,IAwFNrX,SAAQC,OAAO,4BAA8B,kBACxCqB,UAAU,eAAgB,WAoP3B,MApPiC,IAAI8V,KACpC3W,WAAW,0BAA2B4W,EAsP3C,IApPMU,GAES,QAFTA,KAqPFlY,EAAgBM,KArPd4X,GAGE5X,KAAK6X,SAAW,IAChB7X,KAAKI,YAAc,mCACnBJ,KAAKG,OACDqI,QAAU,KAEdxI,KAAKM,WAAa,oBAClBN,KAAKK,aAAe,MACpBL,KAAK+U,kBAAmB,GAI1B+C,EAAiB,WAER,QAFTA,GAEUnU,EAAQ0F,EAAa5I,GAmP7Bf,EAAgBM,KArPlB8X,GAGE9X,KAAK2D,OAASA,EACd3D,KAAKqJ,YAAcA,EACnBrJ,KAAKS,cAAgBA,EA2QzB,MAqHIqX,GAAkBlX,SAAW,SAAU,cAAe,iBAzI1DnC,EA5PEqZ,IA6PEzY,IAAK,eACLwB,MAtPQ,SAACkX,GAuPL,GAAIC,GAAUhY,IAtPlBH,SAAQ2C,QAAQuV,EAAQ,SAAChE,GACrBiE,EAAK3O,YAAY4O,OAAOD,EAAKxP,QAASuL,GACjC/S,KAAK,SAAC8D,GACHkT,EAAKrU,OAAO0R,MAAM,wBAClB,KACI2C,EAAKvX,cAAc,mBACf0D,KAAMW,EAAK+B,MACXC,KAAMhC,EAAKiC,MAAMvC,IACjBwC,MAAO,MAEb,MAAOC,aAnBvB6Q,IA0BNjY,SAAQC,OAAO,6BACX,sBACA,eACA,iBAECqB,UAAU,gBAAiB,WAqP5B,MArPkC,IAAIyW,KACrCtX,WAAW,oBAAqBwX","file":"podcastserver.min.js","sourcesContent":["angular.module('podcastApp', [\n 'ps.search',\n 'ps.podcast',\n 'ps.item',\n 'ps.download',\n 'ps.player',\n 'ps.stats',\n 'ps.common',\n 'ps.dataservice',\n 'ps.config',\n 'ps.partial'\n]);\n\nclass authorizeNotificationDirective {\n constructor() {\n this.replace = true;\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/authorize-notification.html';\n this.controllerAs = 'an';\n this.controller = 'authorizeNotificationController';\n }\n}\n\nclass authorizeNotificationController {\n constructor($window, $notification) {\n this.$window = $window;\n this.$notification = $notification;\n this.state = this.hasToBeShown();\n }\n\n manuallyactivate() {\n this.$notification\n .requestPermission()\n .then(() => { this.state = this.hasToBeShown();});\n }\n\n hasToBeShown() {\n return (('Notification' in this.$window) && this.$window.Notification.permission != 'granted');\n }\n}\n\nangular.module('authorize-notification', ['notification'])\n .directive('authorizeNotification', () => new authorizeNotificationDirective())\n .controller('authorizeNotificationController', authorizeNotificationController);\n\nangular.module('ps.common', [\n 'ps.filters',\n 'navbar',\n 'authorize-notification',\n 'device-detection',\n 'updating'\n]);\nclass deviceDetectorService {\n constructor($window) {\n this.$window = $window;\n }\n\n isTouchedDevice() {\n return 'ontouchstart' in this.$window;\n }\n}\n\nangular.module('device-detection', [])\n .service('deviceDetectorService', deviceDetectorService);\nangular.module('ps.filters', [])\n .filter('htmlToPlaintext', function () {\n return function(text) {\n return String(text || \"\").replace(/<[^>]+>/gm, '');\n };\n }\n);\n/**\n * Created by kevin on 14/08/2014.\n */\n\n_.mixin({\n // Update in place, does not preserve order\n updateinplace : function(localArray, remoteArray, comparisonFunction = (inArray, elem) => inArray.indexOf(elem), withOrder = false) {\n\n // Remove from localArray what is not in the remote array :\n _.forEachRight(localArray.slice(), (elem, key) => (comparisonFunction(remoteArray, elem) === -1) && localArray.splice(key, 1));\n\n // Add to localArray what is new in the remote array :\n _.forEach(remoteArray, (elem) => (comparisonFunction(localArray, elem) === -1) && localArray.push(elem));\n\n if (withOrder) {\n _.forEach(remoteArray, (elem, key) => {\n var elementToMove = localArray.splice(comparisonFunction(localArray, elem), 1)[0];\n localArray.splice(key, 0, elementToMove);\n });\n }\n \n return localArray;\n }\n});\n\nclass navbarController {\n constructor() {\n this.navCollapsed = true;\n }\n}\n\nclass navbarDirective {\n constructor() {\n this.transclude = true;\n this.replace = true;\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/navbar.html';\n this.controller = 'navbarController';\n this.controllerAs = 'navbar';\n }\n\n link(scope, element) {\n element.removeClass('hidden');\n }\n}\n\nangular.module('navbar', [])\n .directive('navbar', () => new navbarDirective())\n .controller('navbarController', navbarController);\n\nclass UpdatingDirective {\n constructor() {\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/updating.html';\n this.controller = 'UpdatingController';\n this.controllerAs = 'uc';\n }\n\n link(scope, element) {\n\n let liParent = element.parent().parent()[0];\n\n if (liParent && liParent.tagName === 'LI') {\n let liElement = angular.element(liParent);\n liElement.addClass('hidden');\n scope.$watch(\n 'uc.isUpdating',\n (newValue) => (newValue) ? liElement.removeClass('hidden') : liElement.addClass('hidden')\n );\n }\n }\n}\n\nclass UpdatingController {\n constructor(ngstomp, $scope) {\n this.ngstomp = ngstomp;\n this.isUpdating = false;\n this.$scope = $scope;\n\n this.ngstomp\n .subscribe('/app/updating', (message) => this.updateStatus(message), $scope)\n .subscribe('/topic/updating', (message) => this.updateStatus(message), $scope);\n }\n\n updateStatus(message) {\n this.isUpdating = JSON.parse(message.body);\n }\n}\n\nangular.module('updating', ['AngularStompDK'])\n .directive('updateStatus', () => new UpdatingDirective())\n .controller('UpdatingController', UpdatingController);\n\nangular.module('ps.config', [\n 'ps.config.route',\n 'ps.config.loading',\n 'ps.config.restangular',\n 'ps.config.ngstomp',\n 'ps.config.module'\n]);\nangular\n .module('ps.config.loading', [ 'angular-loading-bar' ])\n .config((cfpLoadingBarProvider) => { cfpLoadingBarProvider.includeSpinner = false; } );\nangular.module('ps.config.module', [\n 'ngTouch',\n 'ngAnimate',\n 'ui.bootstrap',\n 'truncate',\n 'ngFileUpload'\n]);\nangular\n .module('ps.config.ngstomp', ['AngularStompDK'])\n .config((ngstompProvider) => ngstompProvider.url('/ws').credential('login', 'password').class(SockJS));\nangular\n .module('ps.config.restangular', ['restangular'])\n .config((RestangularProvider) => {\n RestangularProvider.setBaseUrl('/api/');\n RestangularProvider.addElementTransformer('items', false, (item) => {\n item.addRestangularMethod('reset', 'get', 'reset');\n item.addRestangularMethod('download', 'get', 'addtoqueue');\n return item;\n });\n });\nangular\n .module('ps.config.route', ['ngRoute','cfp.hotkeys'])\n .constant('commonKey', [\n ['h', 'Goto Home', (event) => {\n event.preventDefault();\n window.location.href = '/items';\n }],\n ['s', 'Goto Search', (event) => {\n event.preventDefault();\n window.location.href = '/item/search';\n }],\n ['p', 'Goto Podcast List', (event) => {\n event.preventDefault();\n window.location.href = '/podcasts';\n }],\n ['d', 'Goto Download List', (event) => {\n event.preventDefault();\n window.location.href = '/download';\n }]\n ])\n .config($routeProvider => $routeProvider.otherwise({redirectTo: '/items'}))\n .config($locationProvider => $locationProvider.html5Mode(true));\n\nclass DownloadCtrl {\n\n constructor($scope, DonwloadManager, $notification) {\n this.DonwloadManager = DonwloadManager;\n this.$notification = $notification;\n this.items =[];\n this.waitingitems = [];\n this.numberOfSimDl = 0;\n\n this.DonwloadManager.getNumberOfSimDl().then((value) => {\n this.numberOfSimDl = parseInt(value);\n });\n\n /** Websocket Connection */\n this.DonwloadManager.ws\n .subscribe(\"/app/download\", (message) => this.onSubscribeDownload(message), $scope)\n .subscribe(\"/app/waiting\", (message) => this.onSubscribeWaiting(message), $scope)\n .subscribe(\"/topic/download\", (message) => this.onDownloadUpdate(message), $scope)\n .subscribe(\"/topic/waiting\", (message) => this.onWaitingUpdate(message), $scope);\n }\n\n onSubscribeDownload(message) {\n this.items = JSON.parse(message.body);\n }\n onSubscribeWaiting(message) {\n this.waitingitems = JSON.parse(message.body);\n }\n onDownloadUpdate(message) {\n let item = JSON.parse(message.body);\n let elemToUpdate = _.find(this.items, { 'id': item.id });\n switch (item.status) {\n case 'Started' :\n case 'Paused' :\n if (elemToUpdate)\n _.assign(elemToUpdate, item);\n else\n this.items.push(item);\n break;\n case 'Finish' :\n try {\n this.$notification('Téléchargement terminé', {\n body: item.title,\n icon: item.cover.url,\n delay: 5000\n });\n } catch (e) {\n\n }\n this.onStoppedFromWS(elemToUpdate);\n break;\n case 'Stopped' :\n this.onStoppedFromWS(elemToUpdate);\n break;\n }\n }\n\n onStoppedFromWS(elemToUpdate) {\n if (elemToUpdate) {\n _.remove(this.items, function (item) {\n return item.id === elemToUpdate.id;\n });\n }\n }\n\n onWaitingUpdate(message) {\n let remoteWaitingItems = JSON.parse(message.body);\n _.updateinplace(this.waitingitems, remoteWaitingItems, (inArray, elem) => _.findIndex(inArray, { 'id': elem.id }), true);\n }\n\n getTypeFromStatus(item) {\n if (item.status === \"Paused\")\n return \"warning\";\n return \"info\";\n }\n updateNumberOfSimDl(number) {\n this.DonwloadManager.updateNumberOfSimDl(number);\n }\n\n /** Spécifique aux éléments de la liste : **/\n download(item){\n this.DonwloadManager.download(item);\n }\n stopDownload(item){\n this.DonwloadManager.ws.stop(item);\n }\n toggleDownload(item){\n this.DonwloadManager.ws.toggle(item);\n }\n\n /** Global **/\n stopAllDownload(){\n this.DonwloadManager.stopAllDownload();\n }\n pauseAllDownload(){\n this.DonwloadManager.pauseAllDownload();\n }\n restartAllCurrentDownload(){\n this.DonwloadManager.restartAllCurrentDownload();\n }\n removeFromQueue(item){\n this.DonwloadManager.removeFromQueue(item);\n }\n dontDonwload(item){\n this.DonwloadManager.dontDonwload(item);\n }\n moveInWaitingList(item, position){\n this.DonwloadManager.moveInWaitingList(item, position);\n }\n\n}\n\nangular.module('ps.download', [\n 'ps.config.route',\n 'ps.dataService.donwloadManager',\n 'notification'\n])\n .config(($routeProvider, commonKey) =>\n $routeProvider.\n when('/download', {\n templateUrl: 'html/download.html',\n controller: 'DownloadCtrl',\n controllerAs: 'dc',\n hotkeys: commonKey\n })\n )\n .controller('DownloadCtrl', DownloadCtrl);\nclass ItemDetailCtrl {\n\n constructor($scope, DonwloadManager, $location, playlistService, podcast, item){\n this.item = item;\n this.$location = $location;\n this.item.podcast = podcast;\n this.playlistService = playlistService;\n this.DonwloadManager = DonwloadManager;\n\n //** WebSocket Inscription **//\n let webSockedUrl = \"/topic/podcast/\".concat(this.item.podcast.id);\n\n this.DonwloadManager\n .ws\n .subscribe(webSockedUrl, (message) => {\n let itemFromWS = JSON.parse(message.body);\n if (itemFromWS.id == this.item.id) {\n _.assign(this.item, itemFromWS);\n }\n }, $scope);\n\n }\n\n stopDownload(item) {\n this.DonwloadManager.ws.stop(item);\n }\n\n toggleDownload(item) {\n this.DonwloadManager.ws.toggle(item);\n }\n\n remove(item) {\n return item.remove()\n .then(() => {\n this.playlistService.remove(item);\n this.$location.path('/podcasts/'.concat(this.item.podcast.id));\n });\n }\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n _.assign(this.item, itemReseted);\n this.playlistService.remove(item);\n });\n }\n\n toggleInPlaylist() {\n this.playlistService.addOrRemove(this.item);\n }\n\n isInPlaylist() {\n return this.playlistService.contains(this.item);\n }\n}\n\nangular.module('ps.item.details', [\n 'ps.dataService.donwloadManager',\n 'ps.player'\n]).config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/podcasts/:podcastId/item/:itemId', {\n templateUrl: 'html/item-detail.html',\n controller: 'ItemDetailCtrl',\n controllerAs: 'idc',\n hotkeys: commonKey,\n resolve : {\n item : function (itemService, $route) {\n return itemService.findById($route.current.params.podcastId, $route.current.params.itemId);\n },\n podcast : function (podcastService, $route) {\n return podcastService.findById($route.current.params.podcastId);\n }\n }\n });\n})\n .controller('ItemDetailCtrl', ItemDetailCtrl);\nangular.module(\"ps.partial\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"html/authorize-notification.html\",\"\\n\");\n$templateCache.put(\"html/download.html\",\"\\n\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n \\n
\\n
\\n
\\n\\n\\n
\\n\\n
0\\\">\\n \\n \\n Liste d\\'attente {{ dc.waitingitems.length }}\\n \\n \\n\\n \\n \\n\\n\\n
\");\n$templateCache.put(\"html/item-detail.html\",\"\\n\\n\\n
\\n
\\n - Podcasts
\\n - {{ idc.item.podcast.title }}
\\n - {{ idc.item.title }}
\\n
\\n\\n
\\n
\\n\\n
\\n
\\n
\\n
{{ idc.item.title }}
\\n \\n
\\n {{ idc.item.description | htmlToPlaintext }}\\n
\\n \\n
\\n
\\n\\n
\\n
\\n\\n\");\n$templateCache.put(\"html/item-player.html\",\"\");\n$templateCache.put(\"html/items-search.html\",\"\\n\\n \\n\\n
\\n\\n
\\n
1\\\" items-per-page=\\\"12\\\" max-size=\\\"10\\\" boundary-links=\\\"true\\\" total-items=\\\"isc.totalItems\\\" ng-model=\\\"isc.currentPage\\\" ng-change=\\\"isc.changePage()\\\" class=\\\"pagination pagination-centered\\\" previous-text=\\\"‹\\\" next-text=\\\"›\\\" first-text=\\\"«\\\" last-text=\\\"»\\\">\\n
\\n
\\n
\\n
1\\\">\\n \\n
\\n
\\n\");\n$templateCache.put(\"html/navbar.html\",\"\");\n$templateCache.put(\"html/player.html\",\"\\n
\\n
\\n
\\n \\n\\n \\n \\n {{ currentTime | date:\\'H:mm:ss\\':\\'+0000\\' }}\\n \\n \\n \\n {{ timeLeft | date:\\'H:mm:ss\\':\\'+0000\\' }}\\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n
\\n
\\n
\\n
Rafraichir
\\n
Vider
\\n
\\n
\\n \\n
\\n\\n
\");\n$templateCache.put(\"html/podcast-creation.html\",\"\\n
\\n
Ajouter un Podcast
\\n \\n
\\n\\n\\n\\n\\n\\n\");\n$templateCache.put(\"html/podcast-detail.html\",\"\\n\\n\\n\\n\\n\\n\");\n$templateCache.put(\"html/podcast-details-edition.html\",\"
\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\");\n$templateCache.put(\"html/podcast-details-episodes.html\",\"
\\n\\n
\\n\\n
pic.itemPerPage\\\" class=\\\"text-center\\\">\\n \\n
\\n
\\n\\n \");\n$templateCache.put(\"html/podcast-details-stats.html\",\"
\\n\\n\\n \\n
\\n\");\n$templateCache.put(\"html/podcast-details-upload.html\",\"
\\n\\n
\\n
\\n Déposer un ou des fichiers ici\\n
\\n
\\n
\\n\");\n$templateCache.put(\"html/podcasts-list.html\",\"\\n\\n\");\n$templateCache.put(\"html/stats.html\",\"\");\n$templateCache.put(\"html/updating.html\",\"\\n \\n\");}]);\n/**\n * Created by kevin on 01/11/14.\n */\n\nangular.module('ps.item', [\n 'ps.item.details',\n 'ps.item.player'\n]);\nclass ItemPlayerController {\n\n constructor(podcast, item, $timeout, deviceDetectorService) {\n this.item = item;\n this.item.podcast = podcast;\n this.$timeout = $timeout;\n\n this.config = {\n autoPlay: true,\n sources: [\n { src : this.item.proxyURL, type : this.item.mimeType }\n ],\n plugins: {\n controls: {\n autoHide: !deviceDetectorService.isTouchedDevice(),\n autoHideTime: 2000\n },\n poster: this.item.cover.url\n }\n };\n }\n}\n\nangular.module('ps.item.player', [\n 'ngSanitize',\n 'ngRoute',\n 'device-detection',\n 'com.2fdevs.videogular',\n 'com.2fdevs.videogular.plugins.poster',\n 'com.2fdevs.videogular.plugins.controls',\n 'com.2fdevs.videogular.plugins.overlayplay',\n 'com.2fdevs.videogular.plugins.buffering'\n])\n .config(($routeProvider) => {\n $routeProvider.\n when('/podcasts/:podcastId/item/:itemId/play', {\n templateUrl: 'html/item-player.html',\n controller: 'ItemPlayerController',\n controllerAs: 'ipc',\n resolve : {\n item : (itemService, $route) => itemService.findById($route.current.params.podcastId, $route.current.params.itemId),\n podcast : (podcastService, $route) => podcastService.findById($route.current.params.podcastId)\n }\n });\n })\n .controller('ItemPlayerController', ItemPlayerController);\n\nclass PlayerController {\n constructor(playlistService, $timeout, deviceDetectorService) {\n this.playlistService = playlistService;\n this.$timeout = $timeout;\n\n this.playlist = [];\n this.state = null;\n this.API = null;\n this.currentVideo = {};\n this.config = {\n autoPlay : true,\n sources: [],\n plugins: {\n controls: {\n autoHide : !deviceDetectorService.isTouchedDevice(),\n autoHideTime: 2000\n },\n poster: ''\n }\n };\n this.reloadPlaylist();\n }\n\n onPlayerReady(API) {\n this.API = API;\n\n if (this.API.currentState == 'play' || this.isCompleted)\n this.API.play();\n\n this.isCompleted = false;\n this.setVideo(0);\n }\n\n onCompleteVideo() {\n var indexOfVideo = this.getIndexOfVideoInPlaylist(this.currentVideo);\n this.isCompleted = true;\n\n if (indexOfVideo+1 === this.playlist.length) {\n this.currentVideo = this.playlist[0];\n return;\n }\n\n this.setVideo(indexOfVideo+1);\n }\n\n reloadPlaylist() {\n _.updateinplace(this.playlist, this.playlistService.playlist(), function(inArray, elem) { return _.findIndex(inArray, { 'id': elem.id });});\n }\n\n\n\n setVideo(index) {\n this.currentVideo = this.playlist[index];\n\n if (this.currentVideo !== null && this.currentVideo !== undefined) {\n this.API.stop();\n this.config.sources = [{src : this.currentVideo.proxyURL, type : this.currentVideo.mimeType }];\n this.config.plugins.poster = this.currentVideo.cover.url;\n }\n }\n\n remove(item) {\n this.playlistService.remove(item);\n this.reloadPlaylist();\n if (this.config.sources.length > 0 && this.config.sources[0].src === item.proxyURL) {\n this.setVideo(0);\n }\n }\n\n removeAll() {\n this.playlistService.removeAll();\n this.reloadPlaylist();\n }\n\n getIndexOfVideoInPlaylist(item) {\n return this.playlist.indexOf(item);\n }\n}\n\nangular.module('ps.player', [\n 'ngSanitize',\n 'ngRoute',\n 'device-detection',\n 'com.2fdevs.videogular',\n 'com.2fdevs.videogular.plugins.poster',\n 'com.2fdevs.videogular.plugins.controls',\n 'com.2fdevs.videogular.plugins.overlayplay',\n 'com.2fdevs.videogular.plugins.buffering',\n 'ps.player.playlist'\n])\n .config(($routeProvider) => {\n $routeProvider.\n when('/player', {\n templateUrl: 'html/player.html',\n controller: 'PlayerController',\n controllerAs: 'pc'\n });\n })\n .controller('PlayerController', PlayerController);\nclass PlaylistService {\n\n constructor($localStorage) {\n this.$localStorage = $localStorage;\n this.$localStorage.playlist = this.$localStorage.playlist || [];\n }\n\n playlist() {\n return this.$localStorage.playlist;\n }\n add(item) {\n this.$localStorage.playlist.push(item);\n }\n remove (item) {\n this.$localStorage.playlist = _.remove(this.$localStorage.playlist, function(elem) { return elem.id !== item.id; });\n }\n contains(item) {\n return angular.isObject(_.find(this.$localStorage.playlist, {id : item.id}));\n }\n addOrRemove (item) {\n (this.contains(item)) ? this.remove(item) : this.add(item);\n }\n removeAll () {\n this.$localStorage.playlist = [];\n }\n}\n\nangular.module('ps.player.playlist', [\n 'ngStorage'\n]).service('playlistService', PlaylistService);\n\nclass PodcastCreationController {\n\n constructor($location, defaultPodcast, tagService, podcastService, types) {\n this.podcastService = podcastService;\n this.$location = $location;\n this.tagService = tagService;\n this.podcast = angular.extend(this.podcastService.getNewPodcast(), defaultPodcast );\n this.types = types;\n }\n\n findInfo() {\n return this.podcastService.findInfo(this.podcast.url)\n .then((podcastFetched) => {\n this.podcast.title = podcastFetched.title;\n this.podcast.description = podcastFetched.description;\n this.podcast.type = podcastFetched.type;\n this.podcast.cover.url = podcastFetched.cover.url;\n });\n }\n\n loadTags(query) {\n return this.tagService.search(query);\n }\n\n changeType() {\n if (/beinsports\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"BeInSports\";\n } else if (/canalplus\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"CanalPlus\";\n } else if (/jeuxvideo\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"JeuxVideoFR\";\n } else if (/jeuxvideo\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"JeuxVideoCom\";\n } else if (/parleys\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"Parleys\";\n } else if (/pluzz\\.francetv\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"Pluzz\";\n } else if (/youtube\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"Youtube\";\n } else if (this.podcast.url.length > 0) {\n this.podcast.type = \"RSS\";\n } else {\n this.podcast.type = \"Send\";\n }\n }\n\n save() {\n this.podcastService.save(this.podcast)\n .then((podcast) => this.$location.path('/podcasts/' + podcast.id));\n }\n\n}\n\nangular.module('ps.podcast.creation', [\n 'ps.config.route',\n 'ps.dataservice',\n 'ngTagsInput'\n])\n .config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/podcast-creation', {\n templateUrl: 'html/podcast-creation.html',\n controller: 'PodcastAddCtrl',\n controllerAs: 'pac',\n hotkeys: commonKey,\n resolve : {\n types : typeService => typeService.findAll()\n }\n });\n })\n .constant('defaultPodcast', { hasToBeDeleted : true, cover : { height: 200, width: 200 } })\n .controller('PodcastAddCtrl', PodcastCreationController);\nclass PodcastsListCtrl {\n constructor(podcasts, types) {\n this.podcasts = podcasts;\n this.types = types;\n this.filters = {\n title : '',\n type : ''\n };\n }\n}\n\nangular.module('ps.podcast.list', [\n 'ps.config.route',\n 'ps.dataService.podcast',\n 'ps.dataService.type'\n])\n .config(($routeProvider, commonKey) => {\n $routeProvider.\n when('/podcasts', {\n templateUrl: 'html/podcasts-list.html',\n controller: 'PodcastsListCtrl',\n controllerAs: 'plc',\n hotkeys: commonKey,\n resolve: {\n podcasts: (podcastService) => podcastService.findAll(),\n types: typeService => typeService.findAll()\n }\n });\n })\n .controller('PodcastsListCtrl', PodcastsListCtrl);\n/**\n * Created by kevin on 01/11/14.\n */\n\nangular.module('ps.podcast', [\n 'ps.podcast.details',\n 'ps.podcast.creation',\n 'ps.podcast.list'\n]);\nclass SearchItemCache {\n constructor(DefaultItemSearchParameters, $sessionStorage) {\n this.$sessionStorage = $sessionStorage;\n this.$sessionStorage.searchParameters = DefaultItemSearchParameters;\n }\n\n getParameters() {\n return this.$sessionStorage.searchParameters;\n }\n\n page(pageNumber) {\n if (angular.isNumber(pageNumber)) {\n this.$sessionStorage.searchParameters.page = pageNumber;\n }\n\n return this.$sessionStorage.searchParameters.page;\n }\n\n size(sizeNumber) {\n if (angular.isNumber(sizeNumber)) {\n this.$sessionStorage.searchParameters.size = sizeNumber;\n }\n\n return this.$sessionStorage.searchParameters.size;\n }\n\n updateSearchParam(searchParam) {\n this.$sessionStorage.searchParameters.term = searchParam.term;\n this.$sessionStorage.searchParameters.tags = searchParam.tags;\n this.$sessionStorage.searchParameters.direction = searchParam.direction;\n this.$sessionStorage.searchParameters.properties = searchParam.properties;\n }\n}\n\nclass ItemSearchCtrl {\n\n constructor($scope, SearchItemCache, $location, itemService, tagService, DonwloadManager, playlistService, items) {\n /* DI */\n this.$location = $location;\n this.itemService = itemService;\n this.tagService = tagService;\n this.DownloadManager = DonwloadManager;\n this.playlistService = playlistService;\n this.SearchItemCache = SearchItemCache;\n\n /* Constructor Init */\n this.totalItems = Number.MAX_VALUE;\n this.maxSize = 10;\n this.currentPage = this.SearchItemCache.page()+1;\n this.searchParameters = this.SearchItemCache.getParameters();\n\n //** WebSocket Subscription **//\n this.DownloadManager\n .ws\n .subscribe(\"/topic/download\", (message) => this.updateItemFromWS(message), $scope);\n\n $scope.$on('$routeUpdate', () => {\n if (this.currentPage !== this.$location.search().page) {\n this.currentPage = this.$location.search().page || 1;\n this.changePage();\n }\n });\n\n /*this.changePage();*/\n this.attachResponse(items);\n }\n\n updateItemFromWS(wsMessage) {\n let item = JSON.parse(wsMessage.body);\n\n var elemToUpdate = _.find(this.items, { 'id': item.id });\n if (elemToUpdate)\n _.assign(elemToUpdate, item);\n }\n\n changePage() {\n this.SearchItemCache.page(this.calculatePage());\n return this.itemService\n .search(this.SearchItemCache.getParameters())\n .then((itemsResponse) => this.attachResponse(itemsResponse));\n }\n\n attachResponse(itemsResponse) {\n this.items = itemsResponse.content;\n this.totalPages = itemsResponse.totalPages;\n this.totalItems = itemsResponse.totalElements;\n this.currentPage = this.SearchItemCache.page(itemsResponse.number)+1;\n this.$location.search(\"page\", this.currentPage);\n }\n\n swipePage(val) {\n this.currentPage = this.SearchItemCache.page() + val + 1;\n return this.changePage();\n }\n\n //** Item Operation **//\n remove(item) {\n return item.remove()\n .then(() => this.playlistService.remove(item))\n .then(() => this.changePage());\n }\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n var itemInList = _.find(this.items, { 'id': itemReseted.id });\n _.assign(itemInList, itemReseted);\n return itemInList;\n })\n .then((itemInList) => this.playlistService.remove(itemInList));\n }\n\n stopDownload(item) {\n this.DownloadManager.ws.stop(item);\n }\n\n toggleDownload(item){\n return this.DownloadManager.ws.toggle(item);\n }\n\n loadTags(query){\n return this.tagService.search(query);\n }\n\n //** Playlist Manager **//\n addOrRemove(item) {\n return this.playlistService.addOrRemove(item);\n }\n\n isInPlaylist(item) {\n return this.playlistService.contains(item);\n }\n\n calculatePage() {\n if (this.currentPage <= 1) {\n return 0;\n } else if (this.currentPage > Math.ceil(this.totalItems / this.SearchItemCache.size())) {\n return Math.ceil(this.totalItems / this.SearchItemCache.size()) - 1;\n } else {\n return this.currentPage - 1;\n }\n }\n\n resetSearch() {\n this.currentPage = 1;\n this.SearchItemCache.updateSearchParam(this.searchParameters);\n return this.changePage();\n }\n}\n\nangular.module('ps.search.item', [\n 'ps.dataService.donwloadManager',\n 'ps.dataService.item',\n 'ps.dataService.tag',\n 'ps.player',\n 'ps.config.route',\n 'ngTagsInput',\n 'ngStorage'\n])\n .config(($routeProvider, commonKey) => {\n $routeProvider.\n when('/items', {\n templateUrl: 'html/items-search.html',\n controller: 'ItemsSearchCtrl',\n controllerAs: 'isc',\n reloadOnSearch: false,\n hotkeys: [\n ['right', 'Next page', 'isc.swipePage(1)'],\n ['left', 'Previous page', 'isc.swipePage(-1)']\n ].concat(commonKey),\n resolve : { items : (itemService, SearchItemCache) => itemService.search(SearchItemCache.getParameters()) }\n });\n })\n .constant('DefaultItemSearchParameters', {\n page : 0,\n size : 12,\n term : undefined,\n tags : undefined,\n direction : 'DESC',\n properties : 'pubdate'\n })\n .controller('ItemsSearchCtrl', ItemSearchCtrl)\n .service(\"SearchItemCache\", SearchItemCache);\nangular.module('ps.search', [\n 'ps.search.item'\n]);\n\n\nclass StatsController {\n\n constructor(statService, stats) {\n this.statService = statService;\n this.month = 1;\n\n this.chartSeries = [];\n this.transform(stats);\n\n this.chartConfig = {\n options: {\n chart: {\n type: 'spline'\n },\n plotOptions: {\n spline: {\n marker: {\n enabled: true\n }\n }\n },\n xAxis: {\n type: 'datetime',\n dateTimeLabelFormats: { // don't display the dummy year\n month: '%e. %b',\n year: '%b'\n },\n title: {\n text: 'Date'\n }\n }\n },\n series: this.chartSeries,\n title : {\n text : ''\n },\n credits: {\n enabled: false\n },\n loading: false\n };\n }\n\n transform(stats) {\n _.updateinplace(this.chartSeries, []);\n\n angular.forEach(stats, (value) => {\n let element = { name : value.type };\n element.data = _(value.values)\n .map(StatsController.dateMapper())\n .sortBy(\"date\")\n .map(StatsController.highChartsMapper())\n .value();\n this.chartSeries.push(element);\n });\n }\n\n static dateMapper() {\n return (value) => { return { date : Date.UTC(value.date[0], value.date[1]-1, value.date[2]), numberOfItems : value.numberOfItems }; };\n }\n\n static highChartsMapper() {\n return (value) => [value.date, value.numberOfItems];\n }\n\n navigate(offset) {\n this.month += offset;\n this.generateChartData();\n }\n\n generateChartData() {\n /*_.updateinplace(this.chartSeries, []);*/\n\n return this.statService\n .statsByType(this.month)\n .then(statsByType => this.transform(statsByType));\n }\n}\n\nangular.module('ps.stats', [\n 'ps.dataService.stat'\n])\n .config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/stats', {\n templateUrl: 'html/stats.html',\n controller: 'StatsController',\n controllerAs: 'sc',\n hotkeys: commonKey,\n resolve : {\n stats : statService => statService.statsByType()\n }\n });\n })\n .controller('StatsController', StatsController);\n/**\n * Created by kevin on 02/11/14.\n */\n\nangular.module('ps.dataservice', [\n 'ps.dataService.donwloadManager',\n 'ps.dataService.item',\n 'ps.dataService.podcast',\n 'ps.dataService.tag',\n 'ps.dataService.type',\n 'ps.dataService.updateService'\n]);\n\nclass wsDownloadManager {\n\n /*@ngNoInject*/\n constructor(urlBase, ngstomp) {\n this.WS_DOWNLOAD_BASE = urlBase;\n this.ngstomp = ngstomp;\n }\n\n connect() { return this.ngstomp.connect();}\n subscribe(url, callback, scope) {return this.ngstomp.subscribe(url, callback, scope);}\n unsubscribe(url) { return this.ngstomp.unsubscribe(url); }\n toggle(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/toogle', item); }\n start(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/start', item); }\n pause(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/pause', item); }\n stop(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/stop', item); }\n}\n\nclass DownloadManager {\n\n constructor(Restangular, ngstomp) {\n this.Restangular = Restangular;\n this.baseTask = this.Restangular.one(\"task\");\n this.baseDownloadManager = this.baseTask.one('downloadManager');\n this.WS_DOWNLOAD_BASE = '/app/download';\n\n this.ws = new wsDownloadManager(this.WS_DOWNLOAD_BASE, ngstomp);\n }\n\n download(item) {\n return this.Restangular.one(\"item\").customGET(item.id + \"/addtoqueue\");\n }\n stopDownload (item) {\n return this.baseDownloadManager.customPOST(item.id, \"stopDownload\");\n }\n toggleDownload (item) {\n return this.baseDownloadManager.customPOST(item.id, \"toogleDownload\");\n }\n stopAllDownload () {\n return this.baseDownloadManager.customGET(\"stopAllDownload\");\n }\n pauseAllDownload () {\n return this.baseDownloadManager.customGET(\"pauseAllDownload\");\n }\n restartAllCurrentDownload () {\n return this.baseDownloadManager.customGET(\"restartAllCurrentDownload\");\n }\n removeFromQueue (item) {\n return this.baseDownloadManager.customDELETE(\"queue/\" + item.id);\n }\n updateNumberOfSimDl (number) {\n return this.baseDownloadManager.customPOST(number, \"limit\");\n }\n dontDonwload (item) {\n return this.baseDownloadManager.customDELETE(\"queue/\" + item.id + \"/andstop\");\n }\n getDownloading () {\n return this.baseTask.all(\"downloadManager/downloading\").getList();\n }\n getNumberOfSimDl () {\n return this.baseDownloadManager.one(\"limit\").get();\n }\n moveInWaitingList (item, position) {\n this.baseDownloadManager.customPOST({id : item.id, position : position } , 'move');\n }\n\n}\n\nangular.module('ps.dataService.donwloadManager', [ 'restangular', 'AngularStompDK']) .service('DonwloadManager', DownloadManager);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass itemService {\n constructor(Restangular) {\n this.Restangular = Restangular;\n this.childRoute = \"items\";\n }\n\n search(searchParameters = { page : 0, size : 12} ) {\n return this.Restangular.one(\"item/search\")\n .post(null, searchParameters)\n .then((responseFromServer) => {\n responseFromServer.content = this.restangularizedItems(responseFromServer.content);\n return responseFromServer;\n });\n }\n\n findById(podcastId, itemId) {\n return this.Restangular.one(\"podcast\", podcastId).one(this.childRoute, itemId).get();\n }\n\n getItemForPodcastWithPagination(podcast, pageParemeters) {\n return podcast.one(\"items\").post(null, pageParemeters);\n }\n\n restangularizePodcastItem (podcast, items) {\n return this.Restangular.restangularizeCollection(podcast, items, this.childRoute);\n }\n\n restangularizedItems(itemList) {\n var restangularList = [];\n \n angular.forEach(itemList, (value) => {\n restangularList.push(this.Restangular.restangularizeElement(this.Restangular.one('podcast', value.podcastId), value, this.childRoute));\n });\n return restangularList;\n }\n\n upload(podcast, file) {\n var formData = new FormData();\n formData.append('file', file);\n return podcast.all(this.childRoute)\n .withHttpConfig({transformRequest: angular.identity})\n .customPOST(formData, 'upload', undefined, {'Content-Type': undefined});\n }\n}\n\nangular.module('ps.dataService.item', ['restangular']).service('itemService', itemService);\n\n/**\n * Created by kevin on 02/11/14.\n */\n\nclass podcastService {\n \n constructor(Restangular) {\n this.Restangular = Restangular;\n this.route = 'podcast';\n }\n\n findById(podcastId) {\n return this.Restangular.one(this.route, podcastId).get();\n }\n\n findAll() {\n return this.Restangular.all(this.route).getList();\n }\n\n save(podcast) {\n return podcast.save();\n }\n\n getNewPodcast() {\n return this.Restangular.one(this.route);\n }\n\n patch(item) {\n return item.patch();\n }\n\n deletePodcast(item) {\n return item.remove();\n }\n\n findInfo(url) {\n return this.Restangular.one(this.route).findInfo(url);\n }\n\n statsByPubdate(id, numberOfMonth = 6) {\n return this.Restangular.one(this.route, id).one('stats').all('byPubdate').post(numberOfMonth);\n }\n\n statsByByDownloaddate(id, numberOfMonth = 6) {\n return this.Restangular.one(this.route, id).one('stats').all('byDownloaddate').post(numberOfMonth);\n }\n \n}\n\nangular.module('ps.dataService.podcast', ['restangular'])\n .config((RestangularProvider) => {\n RestangularProvider.addElementTransformer('podcast', false, (podcast) => {\n podcast.addRestangularMethod('findInfo', 'post', 'fetch', undefined, {'Content-Type': 'text/plain'});\n return podcast;\n });\n })\n .service('podcastService', podcastService);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass statService {\n\n constructor(Restangular) {\n this.Restangular = Restangular;\n this.base = this.Restangular.one('stats');\n }\n\n statsByType(numberOfMonth = 1) {\n return this.base.all('byType').post(numberOfMonth);\n }\n}\n\nangular.module('ps.dataService.stat', ['restangular']).service('statService', statService);\n\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass tagService {\n \n constructor(Restangular) {\n this.baseAll = Restangular.all('tag'); \n }\n\n getAll() {\n return this.baseAll.get();\n }\n\n search(query) {\n return this.baseAll.post(null, {name : query});\n }\n \n}\n\nangular.module('ps.dataService.tag', ['restangular'])\n .service('tagService', tagService);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass typeService {\n\n constructor(Restangular) {\n this.baseAll = Restangular.all('types');\n }\n\n findAll() {\n return this.baseAll.getList();\n }\n}\n\nangular.module('ps.dataService.type', ['restangular'])\n .service('typeService', typeService);\n\nclass UpdateService {\n constructor(Restangular) {\n this.Restangular = Restangular;\n }\n\n forceUpdatePodcast(idPodcast) {\n return this.Restangular.one(\"task\").customPOST(idPodcast, \"updateManager/updatePodcast/force\");\n }\n} \n\nangular.module('ps.dataService.updateService', ['restangular']).service('UpdateService', UpdateService);\n\nclass podcastEditionDirective {\n constructor() {\n this.restrict = 'E';\n this.templateUrl = 'html/podcast-details-edition.html';\n this.scope = { podcast : '=' };\n this.controller = 'podcastEditionCtrl';\n this.controllerAs = 'pec';\n this.bindToController = true;\n }\n}\n\nclass podcastEditionCtrl {\n constructor($scope, $location, tagService, podcastService) {\n this.$scope = $scope;\n this.$location = $location;\n this.tagService = tagService;\n this.podcastService = podcastService;\n }\n\n loadTags(query) {\n return this.tagService.search(query);\n }\n\n save() {\n var podcastToUpdate = _.cloneDeep(this.podcast);\n podcastToUpdate.items = null;\n\n return this.podcastService\n .patch(podcastToUpdate)\n .then((patchedPodcast) => _.assign(this.podcast, patchedPodcast))\n .then(() => this.$scope.$emit('podcastEdition:save'));\n }\n\n deletePodcast() {\n return this.podcastService\n .deletePodcast(this.podcast)\n .then(() => this.$location.path('/podcasts'));\n }\n}\n\nangular.module('ps.podcast.details.edition', [\n 'ps.dataService.podcast',\n 'ps.dataService.tag',\n 'ngTagsInput'\n])\n .directive('podcastEdition', () => new podcastEditionDirective())\n .controller('podcastEditionCtrl', podcastEditionCtrl);\n\nclass podcastItemsListDirective{\n constructor() {\n this.restrict= 'E';\n this.templateUrl = 'html/podcast-details-episodes.html';\n this.scope = { podcast : '=' };\n this.controller = 'podcastItemsListCtrl';\n this.controllerAs = 'pic';\n this.bindToController = true;\n }\n}\n\nclass podcastItemsListCtrl {\n\n constructor($scope, DonwloadManager, PodcastItemPerPage, itemService, playlistService ) {\n /* DI */\n this.$scope = $scope;\n this.DownloadManager = DonwloadManager;\n this.itemService = itemService;\n this.playlistService = playlistService;\n\n this.currentPage = 1;\n this.itemPerPage = PodcastItemPerPage;\n this.loadPage();\n\n this.$scope.$on(\"podcastItems:refresh\", () => {\n this.currentPage = 1;\n this.loadPage();\n });\n\n this.DownloadManager\n .ws\n .subscribe( \"/topic/podcast/\".concat(this.podcast.id),\n (message) => this.onMessageFromWS(message),\n $scope);\n }\n\n onMessageFromWS(message) {\n var item = JSON.parse(message.body);\n var elemToUpdate = _.find(this.podcast.items, { 'id': item.id });\n _.assign(elemToUpdate, item);\n }\n\n loadPage() {\n this.currentPage = (this.currentPage < 1) ? 1 : (this.currentPage > Math.ceil(this.totalItems / this.itemPerPage)) ? Math.ceil(this.totalItems / this.itemPerPage) : this.currentPage;\n return this.itemService\n .getItemForPodcastWithPagination(this.podcast, {size: this.itemPerPage, page : this.currentPage - 1, direction : 'DESC', properties : 'pubdate'})\n .then((itemsResponse) => {\n this.podcast.items = this.itemService.restangularizePodcastItem(this.podcast, itemsResponse.content);\n this.podcast.totalItems = itemsResponse.totalElements;\n });\n }\n\n remove(item) {\n item.remove()\n .then(() => this.podcast.items = _.reject(this.podcast.items, (elem) => {return (elem.id === item.id); }))\n .then(() => this.playlistService.remove(item))\n .then(() => this.loadPage());\n }\n\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n var itemInList = _.find(this.podcast.items, { 'id': itemReseted.id });\n _.assign(itemInList, itemReseted);\n return itemInList;\n })\n .then((itemToRemove) => this.playlistService.remove(itemToRemove));\n }\n\n addOrRemoveInPlaylist(item) {\n this.playlistService.addOrRemove(item);\n }\n\n isInPlaylist(item) {\n return this.playlistService.contains(item);\n }\n\n swipePage(val) {\n this.currentPage += val;\n this.loadPage();\n }\n\n stopDownload(item) {\n this.DownloadManager.ws.stop(item);\n }\n toggleDownload(item) {\n this.DownloadManager.ws.toggle(item);\n }\n}\nangular.module('ps.podcast.details.episodes', [\n 'ps.player'\n])\n .directive('podcastItemsList', () => new podcastItemsListDirective())\n .constant('PodcastItemPerPage', 10)\n .controller('podcastItemsListCtrl', podcastItemsListCtrl);\n\nclass PodcastDetailCtrl {\n\n constructor($scope, podcast, UpdateService){\n this.$scope = $scope;\n this.UpdateService = UpdateService;\n this.podcast = podcast;\n\n this.podcastTabs= [\n { heading : 'Episodes', active : true},\n { heading : 'Edition', active : false},\n { heading : 'Upload', disabled : this.podcast.type !== 'send'},\n { heading : 'Stats', active : false}\n ];\n this.$scope.$on(\"podcastEdition:save\", () => this.refreshItems());\n this.$scope.$on(\"podcastEdition:upload\", () => this.refreshItems());\n }\n\n refreshItems() {\n this.$scope.$broadcast('podcastItems:refresh');\n }\n\n refresh() {\n this.UpdateService\n .forceUpdatePodcast(this.podcast.id)\n .then(() => this.refreshItems());\n }\n\n tabsActive(num) {\n this.podcastTabs[num].active = true;\n }\n\n}\n\nangular.module('ps.podcast.details', [\n 'ps.config.route',\n 'ps.podcast.details',\n 'ps.podcast.details.episodes',\n 'ps.podcast.details.edition',\n 'ps.podcast.details.upload',\n 'ps.podcast.details.stats',\n 'ps.dataService.updateService'\n]).config(($routeProvider, commonKey) =>\n $routeProvider.\n when('/podcasts/:podcastId', {\n templateUrl: 'html/podcast-detail.html',\n controller: 'PodcastDetailCtrl',\n controllerAs: 'pdc',\n /*hotkeys: [\n ['r', 'Refresh', 'pdc.refreshItems()'],\n ['f', 'Force Refresh', 'pdc.refresh()'],\n ['l', 'List of Items', 'pdc.tabsActive(0)'],\n ['m', 'Modification of Podcast', 'pdc.tabsActive(1)']\n ].concat(commonKey),*/\n hotkeys : commonKey,\n resolve : { podcast : (podcastService, $route) => podcastService.findById($route.current.params.podcastId) }\n })\n)\n .controller('PodcastDetailCtrl', PodcastDetailCtrl);\nclass podcastStatsDirective {\n constructor() {\n this.restrict = 'E';\n this.scope = { podcast : '='};\n this.templateUrl = 'html/podcast-details-stats.html';\n this.controller = 'PodcastDetailsStatsCtrl';\n this.controllerAs = 'pdsc';\n this.bindToController = true;\n }\n}\n\nclass PodcastDetailsStatsCtrl {\n\n constructor($scope, $q, podcastService) {\n this.$q = $q;\n this.podcastService = podcastService;\n this.month = 6;\n\n this.chartSeries = [];\n this.generateChartData();\n this.chartConfig = {\n options: {\n chart: {\n type: 'spline'\n },\n plotOptions: {\n spline: {\n marker: {\n enabled: true\n }\n }\n },\n xAxis: {\n type: 'datetime',\n dateTimeLabelFormats: { // don't display the dummy year\n month: '%e. %b',\n year: '%b'\n },\n title: {\n text: 'Date'\n }\n }\n },\n series: this.chartSeries,\n title : {\n text : ''\n },\n credits: {\n enabled: false\n },\n loading: false\n };\n\n $scope.$on(\"podcastItems:refresh\", () => this.generateChartData());\n }\n\n navigate(offset) {\n this.month += offset;\n return this.generateChartData();\n }\n\n generateChartData() {\n PodcastDetailsStatsCtrl.resetChart(this.chartSeries);\n\n return this.$q.all([\n this.podcastService.statsByByDownloaddate(this.podcast.id, this.month),\n this.podcastService.statsByPubdate(this.podcast.id, this.month)\n ]).then((arrayResult) => {\n let downloadData = _(arrayResult[0])\n .map(PodcastDetailsStatsCtrl.dateMapper())\n .sortBy(\"date\")\n .map(PodcastDetailsStatsCtrl.highChartsMapper())\n .value(),\n publicationData = _(arrayResult[1])\n .map(PodcastDetailsStatsCtrl.dateMapper())\n .sortBy(\"date\")\n .map(PodcastDetailsStatsCtrl.highChartsMapper())\n .value();\n\n this.chartSeries.push({\"name\": \"Download Date\", \"data\": downloadData});\n this.chartSeries.push({\"name\": \"Publication Date\", \"data\": publicationData});\n return this.chartSeries;\n });\n }\n\n static resetChart(chartSeries) {\n _.updateinplace(chartSeries, []);\n }\n\n static dateMapper() {\n return (value) => { return { date : Date.UTC(value.date[0], value.date[1]-1, value.date[2]), numberOfItems : value.numberOfItems }; };\n }\n\n static highChartsMapper() {\n return (value) => [value.date, value.numberOfItems];\n }\n}\n\n\nangular.module('ps.podcast.details.stats', [ 'highcharts-ng' ])\n .directive('podcastStats', () => new podcastStatsDirective())\n .controller('PodcastDetailsStatsCtrl', PodcastDetailsStatsCtrl);\n\nclass podcastUploadDirective {\n\n constructor() {\n this.restrcit = 'E';\n this.templateUrl = 'html/podcast-details-upload.html';\n this.scope = {\n podcast : '='\n };\n this.controller = 'podcastUploadCtrl';\n this.controllerAs = 'puc';\n this.bindToController = true;\n }\n}\n\nclass podcastUploadCtrl{\n\n constructor($scope, itemService, $notification) {\n this.$scope = $scope;\n this.itemService = itemService;\n this.$notification = $notification;\n }\n\n onFileSelect($files) {\n angular.forEach($files, (file) => {\n this.itemService.upload(this.podcast, file)\n .then((item) => {\n this.$scope.$emit(\"podcastEdition:upload\");\n try {\n this.$notification('Upload effectué', {\n body: item.title,\n icon: item.cover.url,\n delay: 5000\n });\n } catch (e) {}\n });\n });\n }\n}\n\n\nangular.module('ps.podcast.details.upload', [\n 'ps.dataService.item',\n 'ngFileUpload',\n 'notification'\n])\n .directive('podcastUpload', () => new podcastUploadDirective())\n .controller('podcastUploadCtrl', podcastUploadCtrl);\n"],"sourceRoot":"/source/"}
\ No newline at end of file
+{"version":3,"sources":["podcastserver.js"],"names":["_classCallCheck","instance","Constructor","TypeError","_createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","angular","module","authorizeNotificationDirective","this","replace","restrict","scope","templateUrl","controllerAs","controller","authorizeNotificationController","$window","$notification","state","hasToBeShown","$inject","value","_this","requestPermission","then","Notification","permission","directive","deviceDetectorService","service","filter","text","String","_","mixin","updateinplace","localArray","remoteArray","comparisonFunction","undefined","arguments","inArray","elem","indexOf","withOrder","forEachRight","slice","splice","forEach","push","elementToMove","navbarController","navCollapsed","navbarDirective","transclude","element","removeClass","UpdatingDirective","liParent","parent","tagName","liElement","addClass","$watch","newValue","UpdatingController","ngstomp","$scope","_this2","isUpdating","subscribe","message","updateStatus","JSON","parse","body","config","cfpLoadingBarProvider","includeSpinner","ngstompProvider","url","credential","SockJS","RestangularProvider","setBaseUrl","addElementTransformer","item","addRestangularMethod","run","$templateCache","put","constant","event","preventDefault","window","location","href","$routeProvider","otherwise","redirectTo","$locationProvider","html5Mode","DownloadCtrl","DonwloadManager","_this3","items","waitingitems","numberOfSimDl","getNumberOfSimDl","parseInt","ws","onSubscribeDownload","onSubscribeWaiting","onDownloadUpdate","onWaitingUpdate","elemToUpdate","find","id","status","assign","title","icon","cover","delay","e","onStoppedFromWS","remove","remoteWaitingItems","findIndex","number","updateNumberOfSimDl","download","stop","toggle","stopAllDownload","pauseAllDownload","restartAllCurrentDownload","removeFromQueue","dontDonwload","position","moveInWaitingList","commonKey","when","hotkeys","ItemDetailCtrl","$location","playlistService","podcast","_this4","webSockedUrl","concat","itemFromWS","_this5","path","_this6","reset","itemReseted","addOrRemove","contains","resolve","itemService","$route","findById","current","params","podcastId","itemId","podcastService","ItemPlayerController","$timeout","autoPlay","sources","src","proxyURL","type","mimeType","plugins","controls","autoHide","isTouchedDevice","autoHideTime","poster","PlayerController","playlist","API","currentVideo","reloadPlaylist","currentState","isCompleted","play","setVideo","indexOfVideo","getIndexOfVideoInPlaylist","index","removeAll","PlaylistService","$localStorage","isObject","add","PodcastCreationController","defaultPodcast","tagService","types","extend","getNewPodcast","_this7","findInfo","podcastFetched","description","query","search","test","_this8","save","typeService","findAll","hasToBeDeleted","height","width","PodcastsListCtrl","podcasts","filters","SearchItemCache","DefaultItemSearchParameters","$sessionStorage","searchParameters","pageNumber","isNumber","page","sizeNumber","size","searchParam","term","tags","direction","properties","ItemSearchCtrl","_this9","DownloadManager","totalItems","Number","MAX_VALUE","maxSize","currentPage","getParameters","updateItemFromWS","$on","changePage","attachResponse","wsMessage","_this10","calculatePage","itemsResponse","content","totalPages","totalElements","val","_this11","_this12","itemInList","Math","ceil","updateSearchParam","reloadOnSearch","StatsController","statService","stats","month","chartSeries","transform","chartConfig","options","chart","plotOptions","spline","marker","enabled","xAxis","dateTimeLabelFormats","year","series","credits","loading","_this13","name","data","values","map","dateMapper","sortBy","highChartsMapper","offset","generateChartData","_this14","statsByType","date","Date","UTC","numberOfItems","wsDownloadManager","urlBase","WS_DOWNLOAD_BASE","connect","callback","unsubscribe","send","Restangular","baseTask","one","baseDownloadManager","customGET","customPOST","customDELETE","all","getList","get","childRoute","_this15","post","responseFromServer","restangularizedItems","pageParemeters","restangularizeCollection","itemList","_this16","restangularList","restangularizeElement","file","formData","FormData","append","withHttpConfig","transformRequest","identity","Content-Type","route","patch","numberOfMonth","base","baseAll","UpdateService","idPodcast","podcastEditionDirective","bindToController","podcastEditionCtrl","_this17","podcastToUpdate","cloneDeep","patchedPodcast","$emit","_this18","deletePodcast","podcastItemsListDirective","podcastItemsListCtrl","PodcastItemPerPage","_this19","itemPerPage","loadPage","onMessageFromWS","_this20","getItemForPodcastWithPagination","restangularizePodcastItem","_this21","reject","_this22","itemToRemove","PodcastDetailCtrl","_this23","podcastTabs","heading","active","disabled","refreshItems","$broadcast","_this24","forceUpdatePodcast","num","podcastStatsDirective","PodcastDetailsStatsCtrl","$q","_this25","_this26","resetChart","statsByByDownloaddate","statsByPubdate","arrayResult","downloadData","publicationData","podcastUploadDirective","restrcit","podcastUploadCtrl","$files","_this27","upload"],"mappings":"CAAC,WAAD,YAIA,SAASA,GAAgBC,EAAUC,GAAe,KAAMD,YAAoBC,IAAgB,KAAM,IAAIC,WAAU,qCAFhH,GAAIC,GAAgB,WAAc,QAASC,GAAiBC,EAAQC,GAAS,IAAK,GAAIC,GAAI,EAAGA,EAAID,EAAME,OAAQD,IAAK,CAAE,GAAIE,GAAaH,EAAMC,EAAIE,GAAWC,WAAaD,EAAWC,aAAc,EAAOD,EAAWE,cAAe,EAAU,SAAWF,KAAYA,EAAWG,UAAW,GAAMC,OAAOC,eAAeT,EAAQI,EAAWM,IAAKN,IAAiB,MAAO,UAAUR,EAAae,EAAYC,GAAiJ,MAA9HD,IAAYZ,EAAiBH,EAAYiB,UAAWF,GAAiBC,GAAab,EAAiBH,EAAagB,GAAqBhB,KAFjiBkB,SAAQC,OAAO,cACX,YACA,aACA,UACA,cACA,YACA,WACA,YACA,iBACA,YACA,cAFJ,IAKMC,GACS,QADTA,KAJFtB,EAAgBuB,KAIdD,GAEEC,KAAKC,SAAU,EACfD,KAAKE,SAAW,IAChBF,KAAKG,OAAQ,EACbH,KAAKI,YAAc,mCACnBJ,KAAKK,aAAe,KACpBL,KAAKM,WAAa,mCAIpBC,EAA+B,WACtB,QADTA,GACUC,EAASC,GAJjBhC,EAAgBuB,KAGlBO,GAEEP,KAAKQ,QAAUA,EACfR,KAAKS,cAAgBA,EACrBT,KAAKU,MAAQV,KAAKW,eAgBtB,MAUIJ,GAAgCK,SAAW,UAAW,iBA1B1D/B,EAJE0B,IAKEd,IAAK,mBACLoB,MACY,WAAR,GAAIC,GAAQd,IAChBA,MAAKS,cACAM,oBACAC,KAAK,WAAQF,EAAKJ,MAAQI,EAAKH,oBAIpClB,IAAK,eACLoB,MAFQ,WACR,MAAS,gBAAkBb,MAAKQ,SAAoD,WAAxCR,KAAKQ,QAAQS,aAAaC,eAdxEX,IAkBN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,WACnB,MAAO,UAACA,GAgPA,OAhPWA,EAAMkR,KAAMlR,EAAMqR,oBAnFvCgF,IAwFNrX,SAAQC,OAAO,4BAA8B,kBACxCqB,UAAU,eAAgB,WAmP3B,MAnPiC,IAAI8V,KACpC3W,WAAW,0BAA2B4W,EAqP3C,IAnPMU,GAES,QAFTA,KAoPFnZ,EAAgBuB,KApPd4X,GAGE5X,KAAK6X,SAAW,IAChB7X,KAAKI,YAAc,mCACnBJ,KAAKG,OACDwI,QAAU,KAEd3I,KAAKM,WAAa,oBAClBN,KAAKK,aAAe,MACpBL,KAAK+U,kBAAmB,GAI1B+C,EAAiB,WAER,QAFTA,GAEUnU,EAAQ6F,EAAa/I,GAkP7BhC,EAAgBuB,KApPlB8X,GAGE9X,KAAK2D,OAASA,EACd3D,KAAKwJ,YAAcA,EACnBxJ,KAAKS,cAAgBA,EA0QzB,MAqHIqX,GAAkBlX,SAAW,SAAU,cAAe,iBAzI1D/B,EA3PEiZ,IA4PErY,IAAK,eACLoB,MArPQ,SAACkX,GAsPL,GAAIC,GAAUhY,IArPlBH,SAAQ2C,QAAQuV,EAAQ,SAAChE,GACrBiE,EAAKxO,YAAYyO,OAAOD,EAAKrP,QAASoL,GACjC/S,KAAK,SAAC8D,GACHkT,EAAKrU,OAAO0R,MAAM,wBAClB,KACI2C,EAAKvX,cAAc,mBACf0D,KAAMW,EAAKkC,MACXC,KAAMnC,EAAKoC,MAAM1C,IACjB2C,MAAO,MAEb,MAAOC,aAnBvB0Q,IA0BNjY,SAAQC,OAAO,6BACX,sBACA,eACA,iBAECqB,UAAU,gBAAiB,WAoP5B,MApPkC,IAAIyW,KACrCtX,WAAW,oBAAqBwX","file":"podcastserver.min.js","sourcesContent":["angular.module('podcastApp', [\n 'ps.search',\n 'ps.podcast',\n 'ps.item',\n 'ps.download',\n 'ps.player',\n 'ps.stats',\n 'ps.common',\n 'ps.dataservice',\n 'ps.config',\n 'ps.partial'\n]);\n\nclass authorizeNotificationDirective {\n constructor() {\n this.replace = true;\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/authorize-notification.html';\n this.controllerAs = 'an';\n this.controller = 'authorizeNotificationController';\n }\n}\n\nclass authorizeNotificationController {\n constructor($window, $notification) {\n this.$window = $window;\n this.$notification = $notification;\n this.state = this.hasToBeShown();\n }\n\n manuallyactivate() {\n this.$notification\n .requestPermission()\n .then(() => { this.state = this.hasToBeShown();});\n }\n\n hasToBeShown() {\n return (('Notification' in this.$window) && this.$window.Notification.permission != 'granted');\n }\n}\n\nangular.module('authorize-notification', ['notification'])\n .directive('authorizeNotification', () => new authorizeNotificationDirective())\n .controller('authorizeNotificationController', authorizeNotificationController);\n\nangular.module('ps.common', [\n 'ps.filters',\n 'navbar',\n 'authorize-notification',\n 'device-detection',\n 'updating'\n]);\nclass deviceDetectorService {\n constructor($window) {\n this.$window = $window;\n }\n\n isTouchedDevice() {\n return 'ontouchstart' in this.$window;\n }\n}\n\nangular.module('device-detection', [])\n .service('deviceDetectorService', deviceDetectorService);\nangular.module('ps.filters', [])\n .filter('htmlToPlaintext', function () {\n return function(text) {\n return String(text || \"\").replace(/<[^>]+>/gm, '');\n };\n }\n);\n/**\n * Created by kevin on 14/08/2014.\n */\n\n_.mixin({\n // Update in place, does not preserve order\n updateinplace : function(localArray, remoteArray, comparisonFunction = (inArray, elem) => inArray.indexOf(elem), withOrder = false) {\n\n // Remove from localArray what is not in the remote array :\n _.forEachRight(localArray.slice(), (elem, key) => (comparisonFunction(remoteArray, elem) === -1) && localArray.splice(key, 1));\n\n // Add to localArray what is new in the remote array :\n _.forEach(remoteArray, (elem) => (comparisonFunction(localArray, elem) === -1) && localArray.push(elem));\n\n if (withOrder) {\n _.forEach(remoteArray, (elem, key) => {\n var elementToMove = localArray.splice(comparisonFunction(localArray, elem), 1)[0];\n localArray.splice(key, 0, elementToMove);\n });\n }\n \n return localArray;\n }\n});\n\nclass navbarController {\n constructor() {\n this.navCollapsed = true;\n }\n}\n\nclass navbarDirective {\n constructor() {\n this.transclude = true;\n this.replace = true;\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/navbar.html';\n this.controller = 'navbarController';\n this.controllerAs = 'navbar';\n }\n\n link(scope, element) {\n element.removeClass('hidden');\n }\n}\n\nangular.module('navbar', [])\n .directive('navbar', () => new navbarDirective())\n .controller('navbarController', navbarController);\n\nclass UpdatingDirective {\n constructor() {\n this.restrict = 'E';\n this.scope = true;\n this.templateUrl = 'html/updating.html';\n this.controller = 'UpdatingController';\n this.controllerAs = 'uc';\n }\n\n link(scope, element) {\n\n let liParent = element.parent().parent()[0];\n\n if (liParent && liParent.tagName === 'LI') {\n let liElement = angular.element(liParent);\n liElement.addClass('hidden');\n scope.$watch(\n 'uc.isUpdating',\n (newValue) => (newValue) ? liElement.removeClass('hidden') : liElement.addClass('hidden')\n );\n }\n }\n}\n\nclass UpdatingController {\n constructor(ngstomp, $scope) {\n this.ngstomp = ngstomp;\n this.isUpdating = false;\n this.$scope = $scope;\n\n this.ngstomp\n .subscribe('/app/updating', (message) => this.updateStatus(message), $scope)\n .subscribe('/topic/updating', (message) => this.updateStatus(message), $scope);\n }\n\n updateStatus(message) {\n this.isUpdating = JSON.parse(message.body);\n }\n}\n\nangular.module('updating', ['AngularStompDK'])\n .directive('updateStatus', () => new UpdatingDirective())\n .controller('UpdatingController', UpdatingController);\n\nangular.module('ps.config', [\n 'ps.config.route',\n 'ps.config.loading',\n 'ps.config.restangular',\n 'ps.config.ngstomp',\n 'ps.config.module'\n]);\nangular\n .module('ps.config.loading', [ 'angular-loading-bar' ])\n .config((cfpLoadingBarProvider) => { cfpLoadingBarProvider.includeSpinner = false; } );\nangular.module('ps.config.module', [\n 'ngTouch',\n 'ngAnimate',\n 'ui.bootstrap',\n 'truncate',\n 'ngFileUpload'\n]);\nangular\n .module('ps.config.ngstomp', ['AngularStompDK'])\n .config((ngstompProvider) => ngstompProvider.url('/ws').credential('login', 'password').class(SockJS));\nangular\n .module('ps.config.restangular', ['restangular'])\n .config((RestangularProvider) => {\n RestangularProvider.setBaseUrl('/api/');\n RestangularProvider.addElementTransformer('items', false, (item) => {\n item.addRestangularMethod('reset', 'get', 'reset');\n item.addRestangularMethod('download', 'get', 'addtoqueue');\n return item;\n });\n });\nangular.module(\"ps.partial\", []).run([\"$templateCache\", function($templateCache) {$templateCache.put(\"html/authorize-notification.html\",\"\\n\");\n$templateCache.put(\"html/download.html\",\"\\n\\n
\\n
\\n
\\n
\\n \\n
\\n
\\n
\\n \\n \\n \\n
\\n
\\n
\\n\\n\\n
\\n\\n
0\\\">\\n \\n \\n Liste d\\'attente {{ dc.waitingitems.length }}\\n \\n \\n\\n \\n \\n\\n\\n
\");\n$templateCache.put(\"html/item-detail.html\",\"\\n\\n\\n
\\n
\\n - Podcasts
\\n - {{ idc.item.podcast.title }}
\\n - {{ idc.item.title }}
\\n
\\n\\n
\\n
\\n\\n
\\n
\\n
\\n
{{ idc.item.title }}
\\n \\n
\\n {{ idc.item.description | htmlToPlaintext }}\\n
\\n \\n
\\n
\\n\\n
\\n
\\n\\n\");\n$templateCache.put(\"html/item-player.html\",\"\");\n$templateCache.put(\"html/items-search.html\",\"\\n\\n \\n\\n
\\n\\n
\\n
1\\\" items-per-page=\\\"12\\\" max-size=\\\"10\\\" boundary-links=\\\"true\\\" total-items=\\\"isc.totalItems\\\" ng-model=\\\"isc.currentPage\\\" ng-change=\\\"isc.changePage()\\\" class=\\\"pagination pagination-centered\\\" previous-text=\\\"‹\\\" next-text=\\\"›\\\" first-text=\\\"«\\\" last-text=\\\"»\\\">\\n
\\n
\\n
\\n
1\\\">\\n \\n
\\n
\\n\");\n$templateCache.put(\"html/navbar.html\",\"\");\n$templateCache.put(\"html/player.html\",\"\\n
\\n
\\n
\\n \\n\\n \\n \\n {{ currentTime | date:\\'H:mm:ss\\':\\'+0000\\' }}\\n \\n \\n \\n {{ timeLeft | date:\\'H:mm:ss\\':\\'+0000\\' }}\\n \\n \\n \\n \\n \\n \\n \\n\\n \\n\\n \\n \\n
\\n
\\n
\\n
Rafraichir
\\n
Vider
\\n
\\n
\\n \\n
\\n\\n
\");\n$templateCache.put(\"html/podcast-creation.html\",\"\\n
\\n
Ajouter un Podcast
\\n \\n
\\n\\n\\n\\n\\n\\n\");\n$templateCache.put(\"html/podcast-detail.html\",\"\\n\\n\\n\\n\\n\\n\");\n$templateCache.put(\"html/podcast-details-edition.html\",\"
\\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n\");\n$templateCache.put(\"html/podcast-details-episodes.html\",\"
\\n\\n
\\n\\n
pic.itemPerPage\\\" class=\\\"text-center\\\">\\n \\n
\\n
\\n\\n \");\n$templateCache.put(\"html/podcast-details-stats.html\",\"
\\n\\n\\n \\n
\\n\");\n$templateCache.put(\"html/podcast-details-upload.html\",\"
\\n\\n
\\n
\\n Déposer un ou des fichiers ici\\n
\\n
\\n
\\n\");\n$templateCache.put(\"html/podcasts-list.html\",\"\\n\\n\");\n$templateCache.put(\"html/stats.html\",\"\");\n$templateCache.put(\"html/updating.html\",\"\\n \\n\");}]);\nangular\n .module('ps.config.route', ['ngRoute','cfp.hotkeys'])\n .constant('commonKey', [\n ['h', 'Goto Home', (event) => {\n event.preventDefault();\n window.location.href = '/items';\n }],\n ['s', 'Goto Search', (event) => {\n event.preventDefault();\n window.location.href = '/item/search';\n }],\n ['p', 'Goto Podcast List', (event) => {\n event.preventDefault();\n window.location.href = '/podcasts';\n }],\n ['d', 'Goto Download List', (event) => {\n event.preventDefault();\n window.location.href = '/download';\n }]\n ])\n .config($routeProvider => $routeProvider.otherwise({redirectTo: '/items'}))\n .config($locationProvider => $locationProvider.html5Mode(true));\n\nclass DownloadCtrl {\n\n constructor($scope, DonwloadManager, $notification) {\n this.DonwloadManager = DonwloadManager;\n this.$notification = $notification;\n this.items =[];\n this.waitingitems = [];\n this.numberOfSimDl = 0;\n\n this.DonwloadManager.getNumberOfSimDl().then((value) => {\n this.numberOfSimDl = parseInt(value);\n });\n\n /** Websocket Connection */\n this.DonwloadManager.ws\n .subscribe(\"/app/download\", (message) => this.onSubscribeDownload(message), $scope)\n .subscribe(\"/app/waiting\", (message) => this.onSubscribeWaiting(message), $scope)\n .subscribe(\"/topic/download\", (message) => this.onDownloadUpdate(message), $scope)\n .subscribe(\"/topic/waiting\", (message) => this.onWaitingUpdate(message), $scope);\n }\n\n onSubscribeDownload(message) {\n this.items = JSON.parse(message.body);\n }\n onSubscribeWaiting(message) {\n this.waitingitems = JSON.parse(message.body);\n }\n onDownloadUpdate(message) {\n let item = JSON.parse(message.body);\n let elemToUpdate = _.find(this.items, { 'id': item.id });\n switch (item.status) {\n case 'Started' :\n case 'Paused' :\n if (elemToUpdate)\n _.assign(elemToUpdate, item);\n else\n this.items.push(item);\n break;\n case 'Finish' :\n try {\n this.$notification('Téléchargement terminé', {\n body: item.title,\n icon: item.cover.url,\n delay: 5000\n });\n } catch (e) {\n\n }\n this.onStoppedFromWS(elemToUpdate);\n break;\n case 'Stopped' :\n this.onStoppedFromWS(elemToUpdate);\n break;\n }\n }\n\n onStoppedFromWS(elemToUpdate) {\n if (elemToUpdate) {\n _.remove(this.items, function (item) {\n return item.id === elemToUpdate.id;\n });\n }\n }\n\n onWaitingUpdate(message) {\n let remoteWaitingItems = JSON.parse(message.body);\n _.updateinplace(this.waitingitems, remoteWaitingItems, (inArray, elem) => _.findIndex(inArray, { 'id': elem.id }), true);\n }\n\n getTypeFromStatus(item) {\n if (item.status === \"Paused\")\n return \"warning\";\n return \"info\";\n }\n updateNumberOfSimDl(number) {\n this.DonwloadManager.updateNumberOfSimDl(number);\n }\n\n /** Spécifique aux éléments de la liste : **/\n download(item){\n this.DonwloadManager.download(item);\n }\n stopDownload(item){\n this.DonwloadManager.ws.stop(item);\n }\n toggleDownload(item){\n this.DonwloadManager.ws.toggle(item);\n }\n\n /** Global **/\n stopAllDownload(){\n this.DonwloadManager.stopAllDownload();\n }\n pauseAllDownload(){\n this.DonwloadManager.pauseAllDownload();\n }\n restartAllCurrentDownload(){\n this.DonwloadManager.restartAllCurrentDownload();\n }\n removeFromQueue(item){\n this.DonwloadManager.removeFromQueue(item);\n }\n dontDonwload(item){\n this.DonwloadManager.dontDonwload(item);\n }\n moveInWaitingList(item, position){\n this.DonwloadManager.moveInWaitingList(item, position);\n }\n\n}\n\nangular.module('ps.download', [\n 'ps.config.route',\n 'ps.dataService.donwloadManager',\n 'notification'\n])\n .config(($routeProvider, commonKey) =>\n $routeProvider.\n when('/download', {\n templateUrl: 'html/download.html',\n controller: 'DownloadCtrl',\n controllerAs: 'dc',\n hotkeys: commonKey\n })\n )\n .controller('DownloadCtrl', DownloadCtrl);\nclass ItemDetailCtrl {\n\n constructor($scope, DonwloadManager, $location, playlistService, podcast, item){\n this.item = item;\n this.$location = $location;\n this.item.podcast = podcast;\n this.playlistService = playlistService;\n this.DonwloadManager = DonwloadManager;\n\n //** WebSocket Inscription **//\n let webSockedUrl = \"/topic/podcast/\".concat(this.item.podcast.id);\n\n this.DonwloadManager\n .ws\n .subscribe(webSockedUrl, (message) => {\n let itemFromWS = JSON.parse(message.body);\n if (itemFromWS.id == this.item.id) {\n _.assign(this.item, itemFromWS);\n }\n }, $scope);\n\n }\n\n stopDownload(item) {\n this.DonwloadManager.ws.stop(item);\n }\n\n toggleDownload(item) {\n this.DonwloadManager.ws.toggle(item);\n }\n\n remove(item) {\n return item.remove()\n .then(() => {\n this.playlistService.remove(item);\n this.$location.path('/podcasts/'.concat(this.item.podcast.id));\n });\n }\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n _.assign(this.item, itemReseted);\n this.playlistService.remove(item);\n });\n }\n\n toggleInPlaylist() {\n this.playlistService.addOrRemove(this.item);\n }\n\n isInPlaylist() {\n return this.playlistService.contains(this.item);\n }\n}\n\nangular.module('ps.item.details', [\n 'ps.dataService.donwloadManager',\n 'ps.player'\n]).config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/podcasts/:podcastId/item/:itemId', {\n templateUrl: 'html/item-detail.html',\n controller: 'ItemDetailCtrl',\n controllerAs: 'idc',\n hotkeys: commonKey,\n resolve : {\n item : function (itemService, $route) {\n return itemService.findById($route.current.params.podcastId, $route.current.params.itemId);\n },\n podcast : function (podcastService, $route) {\n return podcastService.findById($route.current.params.podcastId);\n }\n }\n });\n})\n .controller('ItemDetailCtrl', ItemDetailCtrl);\n/**\n * Created by kevin on 01/11/14.\n */\n\nangular.module('ps.item', [\n 'ps.item.details',\n 'ps.item.player'\n]);\nclass ItemPlayerController {\n\n constructor(podcast, item, $timeout, deviceDetectorService) {\n this.item = item;\n this.item.podcast = podcast;\n this.$timeout = $timeout;\n\n this.config = {\n autoPlay: true,\n sources: [\n { src : this.item.proxyURL, type : this.item.mimeType }\n ],\n plugins: {\n controls: {\n autoHide: !deviceDetectorService.isTouchedDevice(),\n autoHideTime: 2000\n },\n poster: this.item.cover.url\n }\n };\n }\n}\n\nangular.module('ps.item.player', [\n 'ngSanitize',\n 'ngRoute',\n 'device-detection',\n 'com.2fdevs.videogular',\n 'com.2fdevs.videogular.plugins.poster',\n 'com.2fdevs.videogular.plugins.controls',\n 'com.2fdevs.videogular.plugins.overlayplay',\n 'com.2fdevs.videogular.plugins.buffering'\n])\n .config(($routeProvider) => {\n $routeProvider.\n when('/podcasts/:podcastId/item/:itemId/play', {\n templateUrl: 'html/item-player.html',\n controller: 'ItemPlayerController',\n controllerAs: 'ipc',\n resolve : {\n item : (itemService, $route) => itemService.findById($route.current.params.podcastId, $route.current.params.itemId),\n podcast : (podcastService, $route) => podcastService.findById($route.current.params.podcastId)\n }\n });\n })\n .controller('ItemPlayerController', ItemPlayerController);\n\nclass PlayerController {\n constructor(playlistService, $timeout, deviceDetectorService) {\n this.playlistService = playlistService;\n this.$timeout = $timeout;\n\n this.playlist = [];\n this.state = null;\n this.API = null;\n this.currentVideo = {};\n this.config = {\n autoPlay : true,\n sources: [],\n plugins: {\n controls: {\n autoHide : !deviceDetectorService.isTouchedDevice(),\n autoHideTime: 2000\n },\n poster: ''\n }\n };\n this.reloadPlaylist();\n }\n\n onPlayerReady(API) {\n this.API = API;\n\n if (this.API.currentState == 'play' || this.isCompleted)\n this.API.play();\n\n this.isCompleted = false;\n this.setVideo(0);\n }\n\n onCompleteVideo() {\n var indexOfVideo = this.getIndexOfVideoInPlaylist(this.currentVideo);\n this.isCompleted = true;\n\n if (indexOfVideo+1 === this.playlist.length) {\n this.currentVideo = this.playlist[0];\n return;\n }\n\n this.setVideo(indexOfVideo+1);\n }\n\n reloadPlaylist() {\n _.updateinplace(this.playlist, this.playlistService.playlist(), function(inArray, elem) { return _.findIndex(inArray, { 'id': elem.id });});\n }\n\n\n\n setVideo(index) {\n this.currentVideo = this.playlist[index];\n\n if (this.currentVideo !== null && this.currentVideo !== undefined) {\n this.API.stop();\n this.config.sources = [{src : this.currentVideo.proxyURL, type : this.currentVideo.mimeType }];\n this.config.plugins.poster = this.currentVideo.cover.url;\n }\n }\n\n remove(item) {\n this.playlistService.remove(item);\n this.reloadPlaylist();\n if (this.config.sources.length > 0 && this.config.sources[0].src === item.proxyURL) {\n this.setVideo(0);\n }\n }\n\n removeAll() {\n this.playlistService.removeAll();\n this.reloadPlaylist();\n }\n\n getIndexOfVideoInPlaylist(item) {\n return this.playlist.indexOf(item);\n }\n}\n\nangular.module('ps.player', [\n 'ngSanitize',\n 'ngRoute',\n 'device-detection',\n 'com.2fdevs.videogular',\n 'com.2fdevs.videogular.plugins.poster',\n 'com.2fdevs.videogular.plugins.controls',\n 'com.2fdevs.videogular.plugins.overlayplay',\n 'com.2fdevs.videogular.plugins.buffering',\n 'ps.player.playlist'\n])\n .config(($routeProvider) => {\n $routeProvider.\n when('/player', {\n templateUrl: 'html/player.html',\n controller: 'PlayerController',\n controllerAs: 'pc'\n });\n })\n .controller('PlayerController', PlayerController);\nclass PlaylistService {\n\n constructor($localStorage) {\n this.$localStorage = $localStorage;\n this.$localStorage.playlist = this.$localStorage.playlist || [];\n }\n\n playlist() {\n return this.$localStorage.playlist;\n }\n add(item) {\n this.$localStorage.playlist.push(item);\n }\n remove (item) {\n this.$localStorage.playlist = _.remove(this.$localStorage.playlist, function(elem) { return elem.id !== item.id; });\n }\n contains(item) {\n return angular.isObject(_.find(this.$localStorage.playlist, {id : item.id}));\n }\n addOrRemove (item) {\n (this.contains(item)) ? this.remove(item) : this.add(item);\n }\n removeAll () {\n this.$localStorage.playlist = [];\n }\n}\n\nangular.module('ps.player.playlist', [\n 'ngStorage'\n]).service('playlistService', PlaylistService);\n\nclass PodcastCreationController {\n\n constructor($location, defaultPodcast, tagService, podcastService, types) {\n this.podcastService = podcastService;\n this.$location = $location;\n this.tagService = tagService;\n this.podcast = angular.extend(this.podcastService.getNewPodcast(), defaultPodcast );\n this.types = types;\n }\n\n findInfo() {\n return this.podcastService.findInfo(this.podcast.url)\n .then((podcastFetched) => {\n this.podcast.title = podcastFetched.title;\n this.podcast.description = podcastFetched.description;\n this.podcast.type = podcastFetched.type;\n this.podcast.cover.url = podcastFetched.cover.url;\n });\n }\n\n loadTags(query) {\n return this.tagService.search(query);\n }\n\n changeType() {\n if (/beinsports\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"BeInSports\";\n } else if (/canalplus\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"CanalPlus\";\n } else if (/jeuxvideo\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"JeuxVideoFR\";\n } else if (/jeuxvideo\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"JeuxVideoCom\";\n } else if (/parleys\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"Parleys\";\n } else if (/pluzz\\.francetv\\.fr/i.test(this.podcast.url)) {\n this.podcast.type = \"Pluzz\";\n } else if (/youtube\\.com/i.test(this.podcast.url)) {\n this.podcast.type = \"Youtube\";\n } else if (this.podcast.url.length > 0) {\n this.podcast.type = \"RSS\";\n } else {\n this.podcast.type = \"Send\";\n }\n }\n\n save() {\n this.podcastService.save(this.podcast)\n .then((podcast) => this.$location.path('/podcasts/' + podcast.id));\n }\n\n}\n\nangular.module('ps.podcast.creation', [\n 'ps.config.route',\n 'ps.dataservice',\n 'ngTagsInput'\n])\n .config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/podcast-creation', {\n templateUrl: 'html/podcast-creation.html',\n controller: 'PodcastAddCtrl',\n controllerAs: 'pac',\n hotkeys: commonKey,\n resolve : {\n types : typeService => typeService.findAll()\n }\n });\n })\n .constant('defaultPodcast', { hasToBeDeleted : true, cover : { height: 200, width: 200 } })\n .controller('PodcastAddCtrl', PodcastCreationController);\nclass PodcastsListCtrl {\n constructor(podcasts, types) {\n this.podcasts = podcasts;\n this.types = types;\n this.filters = {\n title : '',\n type : ''\n };\n }\n}\n\nangular.module('ps.podcast.list', [\n 'ps.config.route',\n 'ps.dataService.podcast',\n 'ps.dataService.type'\n])\n .config(($routeProvider, commonKey) => {\n $routeProvider.\n when('/podcasts', {\n templateUrl: 'html/podcasts-list.html',\n controller: 'PodcastsListCtrl',\n controllerAs: 'plc',\n hotkeys: commonKey,\n resolve: {\n podcasts: (podcastService) => podcastService.findAll(),\n types: typeService => typeService.findAll()\n }\n });\n })\n .controller('PodcastsListCtrl', PodcastsListCtrl);\n/**\n * Created by kevin on 01/11/14.\n */\n\nangular.module('ps.podcast', [\n 'ps.podcast.details',\n 'ps.podcast.creation',\n 'ps.podcast.list'\n]);\nclass SearchItemCache {\n constructor(DefaultItemSearchParameters, $sessionStorage) {\n this.$sessionStorage = $sessionStorage;\n this.$sessionStorage.searchParameters = DefaultItemSearchParameters;\n }\n\n getParameters() {\n return this.$sessionStorage.searchParameters;\n }\n\n page(pageNumber) {\n if (angular.isNumber(pageNumber)) {\n this.$sessionStorage.searchParameters.page = pageNumber;\n }\n\n return this.$sessionStorage.searchParameters.page;\n }\n\n size(sizeNumber) {\n if (angular.isNumber(sizeNumber)) {\n this.$sessionStorage.searchParameters.size = sizeNumber;\n }\n\n return this.$sessionStorage.searchParameters.size;\n }\n\n updateSearchParam(searchParam) {\n this.$sessionStorage.searchParameters.term = searchParam.term;\n this.$sessionStorage.searchParameters.tags = searchParam.tags;\n this.$sessionStorage.searchParameters.direction = searchParam.direction;\n this.$sessionStorage.searchParameters.properties = searchParam.properties;\n }\n}\n\nclass ItemSearchCtrl {\n\n constructor($scope, SearchItemCache, $location, itemService, tagService, DonwloadManager, playlistService, items) {\n /* DI */\n this.$location = $location;\n this.itemService = itemService;\n this.tagService = tagService;\n this.DownloadManager = DonwloadManager;\n this.playlistService = playlistService;\n this.SearchItemCache = SearchItemCache;\n\n /* Constructor Init */\n this.totalItems = Number.MAX_VALUE;\n this.maxSize = 10;\n this.currentPage = this.SearchItemCache.page()+1;\n this.searchParameters = this.SearchItemCache.getParameters();\n\n //** WebSocket Subscription **//\n this.DownloadManager\n .ws\n .subscribe(\"/topic/download\", (message) => this.updateItemFromWS(message), $scope);\n\n $scope.$on('$routeUpdate', () => {\n if (this.currentPage !== this.$location.search().page) {\n this.currentPage = this.$location.search().page || 1;\n this.changePage();\n }\n });\n\n /*this.changePage();*/\n this.attachResponse(items);\n }\n\n updateItemFromWS(wsMessage) {\n let item = JSON.parse(wsMessage.body);\n\n var elemToUpdate = _.find(this.items, { 'id': item.id });\n if (elemToUpdate)\n _.assign(elemToUpdate, item);\n }\n\n changePage() {\n this.SearchItemCache.page(this.calculatePage());\n return this.itemService\n .search(this.SearchItemCache.getParameters())\n .then((itemsResponse) => this.attachResponse(itemsResponse));\n }\n\n attachResponse(itemsResponse) {\n this.items = itemsResponse.content;\n this.totalPages = itemsResponse.totalPages;\n this.totalItems = itemsResponse.totalElements;\n this.currentPage = this.SearchItemCache.page(itemsResponse.number)+1;\n this.$location.search(\"page\", this.currentPage);\n }\n\n swipePage(val) {\n this.currentPage = this.SearchItemCache.page() + val + 1;\n return this.changePage();\n }\n\n //** Item Operation **//\n remove(item) {\n return item.remove()\n .then(() => this.playlistService.remove(item))\n .then(() => this.changePage());\n }\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n var itemInList = _.find(this.items, { 'id': itemReseted.id });\n _.assign(itemInList, itemReseted);\n return itemInList;\n })\n .then((itemInList) => this.playlistService.remove(itemInList));\n }\n\n stopDownload(item) {\n this.DownloadManager.ws.stop(item);\n }\n\n toggleDownload(item){\n return this.DownloadManager.ws.toggle(item);\n }\n\n loadTags(query){\n return this.tagService.search(query);\n }\n\n //** Playlist Manager **//\n addOrRemove(item) {\n return this.playlistService.addOrRemove(item);\n }\n\n isInPlaylist(item) {\n return this.playlistService.contains(item);\n }\n\n calculatePage() {\n if (this.currentPage <= 1) {\n return 0;\n } else if (this.currentPage > Math.ceil(this.totalItems / this.SearchItemCache.size())) {\n return Math.ceil(this.totalItems / this.SearchItemCache.size()) - 1;\n } else {\n return this.currentPage - 1;\n }\n }\n\n resetSearch() {\n this.currentPage = 1;\n this.SearchItemCache.updateSearchParam(this.searchParameters);\n return this.changePage();\n }\n}\n\nangular.module('ps.search.item', [\n 'ps.dataService.donwloadManager',\n 'ps.dataService.item',\n 'ps.dataService.tag',\n 'ps.player',\n 'ps.config.route',\n 'ngTagsInput',\n 'ngStorage'\n])\n .config(($routeProvider, commonKey) => {\n $routeProvider.\n when('/items', {\n templateUrl: 'html/items-search.html',\n controller: 'ItemsSearchCtrl',\n controllerAs: 'isc',\n reloadOnSearch: false,\n hotkeys: [\n ['right', 'Next page', 'isc.swipePage(1)'],\n ['left', 'Previous page', 'isc.swipePage(-1)']\n ].concat(commonKey),\n resolve : { items : (itemService, SearchItemCache) => itemService.search(SearchItemCache.getParameters()) }\n });\n })\n .constant('DefaultItemSearchParameters', {\n page : 0,\n size : 12,\n term : undefined,\n tags : undefined,\n direction : 'DESC',\n properties : 'pubdate'\n })\n .controller('ItemsSearchCtrl', ItemSearchCtrl)\n .service(\"SearchItemCache\", SearchItemCache);\nangular.module('ps.search', [\n 'ps.search.item'\n]);\n\n\nclass StatsController {\n\n constructor(statService, stats) {\n this.statService = statService;\n this.month = 1;\n\n this.chartSeries = [];\n this.transform(stats);\n\n this.chartConfig = {\n options: {\n chart: {\n type: 'spline'\n },\n plotOptions: {\n spline: {\n marker: {\n enabled: true\n }\n }\n },\n xAxis: {\n type: 'datetime',\n dateTimeLabelFormats: { // don't display the dummy year\n month: '%e. %b',\n year: '%b'\n },\n title: {\n text: 'Date'\n }\n }\n },\n series: this.chartSeries,\n title : {\n text : ''\n },\n credits: {\n enabled: false\n },\n loading: false\n };\n }\n\n transform(stats) {\n _.updateinplace(this.chartSeries, []);\n\n angular.forEach(stats, (value) => {\n let element = { name : value.type };\n element.data = _(value.values)\n .map(StatsController.dateMapper())\n .sortBy(\"date\")\n .map(StatsController.highChartsMapper())\n .value();\n this.chartSeries.push(element);\n });\n }\n\n static dateMapper() {\n return (value) => { return { date : Date.UTC(value.date[0], value.date[1]-1, value.date[2]), numberOfItems : value.numberOfItems }; };\n }\n\n static highChartsMapper() {\n return (value) => [value.date, value.numberOfItems];\n }\n\n navigate(offset) {\n this.month += offset;\n this.generateChartData();\n }\n\n generateChartData() {\n /*_.updateinplace(this.chartSeries, []);*/\n\n return this.statService\n .statsByType(this.month)\n .then(statsByType => this.transform(statsByType));\n }\n}\n\nangular.module('ps.stats', [\n 'ps.dataService.stat'\n])\n .config(function($routeProvider, commonKey) {\n $routeProvider.\n when('/stats', {\n templateUrl: 'html/stats.html',\n controller: 'StatsController',\n controllerAs: 'sc',\n hotkeys: commonKey,\n resolve : {\n stats : statService => statService.statsByType()\n }\n });\n })\n .controller('StatsController', StatsController);\n/**\n * Created by kevin on 02/11/14.\n */\n\nangular.module('ps.dataservice', [\n 'ps.dataService.donwloadManager',\n 'ps.dataService.item',\n 'ps.dataService.podcast',\n 'ps.dataService.tag',\n 'ps.dataService.type',\n 'ps.dataService.updateService'\n]);\n\nclass wsDownloadManager {\n\n /*@ngNoInject*/\n constructor(urlBase, ngstomp) {\n this.WS_DOWNLOAD_BASE = urlBase;\n this.ngstomp = ngstomp;\n }\n\n connect() { return this.ngstomp.connect();}\n subscribe(url, callback, scope) {return this.ngstomp.subscribe(url, callback, scope);}\n unsubscribe(url) { return this.ngstomp.unsubscribe(url); }\n toggle(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/toogle', item); }\n start(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/start', item); }\n pause(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/pause', item); }\n stop(item) { return this.ngstomp.send(this.WS_DOWNLOAD_BASE + '/stop', item); }\n}\n\nclass DownloadManager {\n\n constructor(Restangular, ngstomp) {\n this.Restangular = Restangular;\n this.baseTask = this.Restangular.one(\"task\");\n this.baseDownloadManager = this.baseTask.one('downloadManager');\n this.WS_DOWNLOAD_BASE = '/app/download';\n\n this.ws = new wsDownloadManager(this.WS_DOWNLOAD_BASE, ngstomp);\n }\n\n download(item) {\n return this.Restangular.one(\"item\").customGET(item.id + \"/addtoqueue\");\n }\n stopDownload (item) {\n return this.baseDownloadManager.customPOST(item.id, \"stopDownload\");\n }\n toggleDownload (item) {\n return this.baseDownloadManager.customPOST(item.id, \"toogleDownload\");\n }\n stopAllDownload () {\n return this.baseDownloadManager.customGET(\"stopAllDownload\");\n }\n pauseAllDownload () {\n return this.baseDownloadManager.customGET(\"pauseAllDownload\");\n }\n restartAllCurrentDownload () {\n return this.baseDownloadManager.customGET(\"restartAllCurrentDownload\");\n }\n removeFromQueue (item) {\n return this.baseDownloadManager.customDELETE(\"queue/\" + item.id);\n }\n updateNumberOfSimDl (number) {\n return this.baseDownloadManager.customPOST(number, \"limit\");\n }\n dontDonwload (item) {\n return this.baseDownloadManager.customDELETE(\"queue/\" + item.id + \"/andstop\");\n }\n getDownloading () {\n return this.baseTask.all(\"downloadManager/downloading\").getList();\n }\n getNumberOfSimDl () {\n return this.baseDownloadManager.one(\"limit\").get();\n }\n moveInWaitingList (item, position) {\n this.baseDownloadManager.customPOST({id : item.id, position : position } , 'move');\n }\n\n}\n\nangular.module('ps.dataService.donwloadManager', [ 'restangular', 'AngularStompDK']) .service('DonwloadManager', DownloadManager);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass itemService {\n constructor(Restangular) {\n this.Restangular = Restangular;\n this.childRoute = \"items\";\n }\n\n search(searchParameters = { page : 0, size : 12} ) {\n return this.Restangular.one(\"item/search\")\n .post(null, searchParameters)\n .then((responseFromServer) => {\n responseFromServer.content = this.restangularizedItems(responseFromServer.content);\n return responseFromServer;\n });\n }\n\n findById(podcastId, itemId) {\n return this.Restangular.one(\"podcast\", podcastId).one(this.childRoute, itemId).get();\n }\n\n getItemForPodcastWithPagination(podcast, pageParemeters) {\n return podcast.one(\"items\").post(null, pageParemeters);\n }\n\n restangularizePodcastItem (podcast, items) {\n return this.Restangular.restangularizeCollection(podcast, items, this.childRoute);\n }\n\n restangularizedItems(itemList) {\n var restangularList = [];\n \n angular.forEach(itemList, (value) => {\n restangularList.push(this.Restangular.restangularizeElement(this.Restangular.one('podcast', value.podcastId), value, this.childRoute));\n });\n return restangularList;\n }\n\n upload(podcast, file) {\n var formData = new FormData();\n formData.append('file', file);\n return podcast.all(this.childRoute)\n .withHttpConfig({transformRequest: angular.identity})\n .customPOST(formData, 'upload', undefined, {'Content-Type': undefined});\n }\n}\n\nangular.module('ps.dataService.item', ['restangular']).service('itemService', itemService);\n\n/**\n * Created by kevin on 02/11/14.\n */\n\nclass podcastService {\n \n constructor(Restangular) {\n this.Restangular = Restangular;\n this.route = 'podcast';\n }\n\n findById(podcastId) {\n return this.Restangular.one(this.route, podcastId).get();\n }\n\n findAll() {\n return this.Restangular.all(this.route).getList();\n }\n\n save(podcast) {\n return podcast.save();\n }\n\n getNewPodcast() {\n return this.Restangular.one(this.route);\n }\n\n patch(item) {\n return item.patch();\n }\n\n deletePodcast(item) {\n return item.remove();\n }\n\n findInfo(url) {\n return this.Restangular.one(this.route).findInfo(url);\n }\n\n statsByPubdate(id, numberOfMonth = 6) {\n return this.Restangular.one(this.route, id).one('stats').all('byPubdate').post(numberOfMonth);\n }\n\n statsByByDownloaddate(id, numberOfMonth = 6) {\n return this.Restangular.one(this.route, id).one('stats').all('byDownloaddate').post(numberOfMonth);\n }\n \n}\n\nangular.module('ps.dataService.podcast', ['restangular'])\n .config((RestangularProvider) => {\n RestangularProvider.addElementTransformer('podcast', false, (podcast) => {\n podcast.addRestangularMethod('findInfo', 'post', 'fetch', undefined, {'Content-Type': 'text/plain'});\n return podcast;\n });\n })\n .service('podcastService', podcastService);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass statService {\n\n constructor(Restangular) {\n this.Restangular = Restangular;\n this.base = this.Restangular.one('stats');\n }\n\n statsByType(numberOfMonth = 1) {\n return this.base.all('byType').post(numberOfMonth);\n }\n}\n\nangular.module('ps.dataService.stat', ['restangular']).service('statService', statService);\n\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass tagService {\n \n constructor(Restangular) {\n this.baseAll = Restangular.all('tag'); \n }\n\n getAll() {\n return this.baseAll.get();\n }\n\n search(query) {\n return this.baseAll.post(null, {name : query});\n }\n \n}\n\nangular.module('ps.dataService.tag', ['restangular'])\n .service('tagService', tagService);\n/**\n * Created by kevin on 01/11/14.\n */\n\nclass typeService {\n\n constructor(Restangular) {\n this.baseAll = Restangular.all('types');\n }\n\n findAll() {\n return this.baseAll.getList();\n }\n}\n\nangular.module('ps.dataService.type', ['restangular'])\n .service('typeService', typeService);\n\nclass UpdateService {\n constructor(Restangular) {\n this.Restangular = Restangular;\n }\n\n forceUpdatePodcast(idPodcast) {\n return this.Restangular.one(\"task\").customPOST(idPodcast, \"updateManager/updatePodcast/force\");\n }\n} \n\nangular.module('ps.dataService.updateService', ['restangular']).service('UpdateService', UpdateService);\n\nclass podcastEditionDirective {\n constructor() {\n this.restrict = 'E';\n this.templateUrl = 'html/podcast-details-edition.html';\n this.scope = { podcast : '=' };\n this.controller = 'podcastEditionCtrl';\n this.controllerAs = 'pec';\n this.bindToController = true;\n }\n}\n\nclass podcastEditionCtrl {\n constructor($scope, $location, tagService, podcastService) {\n this.$scope = $scope;\n this.$location = $location;\n this.tagService = tagService;\n this.podcastService = podcastService;\n }\n\n loadTags(query) {\n return this.tagService.search(query);\n }\n\n save() {\n var podcastToUpdate = _.cloneDeep(this.podcast);\n podcastToUpdate.items = null;\n\n return this.podcastService\n .patch(podcastToUpdate)\n .then((patchedPodcast) => _.assign(this.podcast, patchedPodcast))\n .then(() => this.$scope.$emit('podcastEdition:save'));\n }\n\n deletePodcast() {\n return this.podcastService\n .deletePodcast(this.podcast)\n .then(() => this.$location.path('/podcasts'));\n }\n}\n\nangular.module('ps.podcast.details.edition', [\n 'ps.dataService.podcast',\n 'ps.dataService.tag',\n 'ngTagsInput'\n])\n .directive('podcastEdition', () => new podcastEditionDirective())\n .controller('podcastEditionCtrl', podcastEditionCtrl);\n\nclass podcastItemsListDirective{\n constructor() {\n this.restrict= 'E';\n this.templateUrl = 'html/podcast-details-episodes.html';\n this.scope = { podcast : '=' };\n this.controller = 'podcastItemsListCtrl';\n this.controllerAs = 'pic';\n this.bindToController = true;\n }\n}\n\nclass podcastItemsListCtrl {\n\n constructor($scope, DonwloadManager, PodcastItemPerPage, itemService, playlistService ) {\n /* DI */\n this.$scope = $scope;\n this.DownloadManager = DonwloadManager;\n this.itemService = itemService;\n this.playlistService = playlistService;\n\n this.currentPage = 1;\n this.itemPerPage = PodcastItemPerPage;\n this.loadPage();\n\n this.$scope.$on(\"podcastItems:refresh\", () => {\n this.currentPage = 1;\n this.loadPage();\n });\n\n this.DownloadManager\n .ws\n .subscribe( \"/topic/podcast/\".concat(this.podcast.id),\n (message) => this.onMessageFromWS(message),\n $scope);\n }\n\n onMessageFromWS(message) {\n var item = JSON.parse(message.body);\n var elemToUpdate = _.find(this.podcast.items, { 'id': item.id });\n _.assign(elemToUpdate, item);\n }\n\n loadPage() {\n this.currentPage = (this.currentPage < 1) ? 1 : (this.currentPage > Math.ceil(this.totalItems / this.itemPerPage)) ? Math.ceil(this.totalItems / this.itemPerPage) : this.currentPage;\n return this.itemService\n .getItemForPodcastWithPagination(this.podcast, {size: this.itemPerPage, page : this.currentPage - 1, direction : 'DESC', properties : 'pubdate'})\n .then((itemsResponse) => {\n this.podcast.items = this.itemService.restangularizePodcastItem(this.podcast, itemsResponse.content);\n this.podcast.totalItems = itemsResponse.totalElements;\n });\n }\n\n remove(item) {\n item.remove()\n .then(() => this.podcast.items = _.reject(this.podcast.items, (elem) => {return (elem.id === item.id); }))\n .then(() => this.playlistService.remove(item))\n .then(() => this.loadPage());\n }\n\n\n reset(item) {\n return item.reset()\n .then((itemReseted) => {\n var itemInList = _.find(this.podcast.items, { 'id': itemReseted.id });\n _.assign(itemInList, itemReseted);\n return itemInList;\n })\n .then((itemToRemove) => this.playlistService.remove(itemToRemove));\n }\n\n addOrRemoveInPlaylist(item) {\n this.playlistService.addOrRemove(item);\n }\n\n isInPlaylist(item) {\n return this.playlistService.contains(item);\n }\n\n swipePage(val) {\n this.currentPage += val;\n this.loadPage();\n }\n\n stopDownload(item) {\n this.DownloadManager.ws.stop(item);\n }\n toggleDownload(item) {\n this.DownloadManager.ws.toggle(item);\n }\n}\nangular.module('ps.podcast.details.episodes', [\n 'ps.player'\n])\n .directive('podcastItemsList', () => new podcastItemsListDirective())\n .constant('PodcastItemPerPage', 10)\n .controller('podcastItemsListCtrl', podcastItemsListCtrl);\n\nclass PodcastDetailCtrl {\n\n constructor($scope, podcast, UpdateService){\n this.$scope = $scope;\n this.UpdateService = UpdateService;\n this.podcast = podcast;\n\n this.podcastTabs= [\n { heading : 'Episodes', active : true},\n { heading : 'Edition', active : false},\n { heading : 'Upload', disabled : this.podcast.type !== 'send'},\n { heading : 'Stats', active : false}\n ];\n this.$scope.$on(\"podcastEdition:save\", () => this.refreshItems());\n this.$scope.$on(\"podcastEdition:upload\", () => this.refreshItems());\n }\n\n refreshItems() {\n this.$scope.$broadcast('podcastItems:refresh');\n }\n\n refresh() {\n this.UpdateService\n .forceUpdatePodcast(this.podcast.id)\n .then(() => this.refreshItems());\n }\n\n tabsActive(num) {\n this.podcastTabs[num].active = true;\n }\n\n}\n\nangular.module('ps.podcast.details', [\n 'ps.config.route',\n 'ps.podcast.details',\n 'ps.podcast.details.episodes',\n 'ps.podcast.details.edition',\n 'ps.podcast.details.upload',\n 'ps.podcast.details.stats',\n 'ps.dataService.updateService'\n]).config(($routeProvider, commonKey) =>\n $routeProvider.\n when('/podcasts/:podcastId', {\n templateUrl: 'html/podcast-detail.html',\n controller: 'PodcastDetailCtrl',\n controllerAs: 'pdc',\n /*hotkeys: [\n ['r', 'Refresh', 'pdc.refreshItems()'],\n ['f', 'Force Refresh', 'pdc.refresh()'],\n ['l', 'List of Items', 'pdc.tabsActive(0)'],\n ['m', 'Modification of Podcast', 'pdc.tabsActive(1)']\n ].concat(commonKey),*/\n hotkeys : commonKey,\n resolve : { podcast : (podcastService, $route) => podcastService.findById($route.current.params.podcastId) }\n })\n)\n .controller('PodcastDetailCtrl', PodcastDetailCtrl);\nclass podcastStatsDirective {\n constructor() {\n this.restrict = 'E';\n this.scope = { podcast : '='};\n this.templateUrl = 'html/podcast-details-stats.html';\n this.controller = 'PodcastDetailsStatsCtrl';\n this.controllerAs = 'pdsc';\n this.bindToController = true;\n }\n}\n\nclass PodcastDetailsStatsCtrl {\n\n constructor($scope, $q, podcastService) {\n this.$q = $q;\n this.podcastService = podcastService;\n this.month = 6;\n\n this.chartSeries = [];\n this.generateChartData();\n this.chartConfig = {\n options: {\n chart: {\n type: 'spline'\n },\n plotOptions: {\n spline: {\n marker: {\n enabled: true\n }\n }\n },\n xAxis: {\n type: 'datetime',\n dateTimeLabelFormats: { // don't display the dummy year\n month: '%e. %b',\n year: '%b'\n },\n title: {\n text: 'Date'\n }\n }\n },\n series: this.chartSeries,\n title : {\n text : ''\n },\n credits: {\n enabled: false\n },\n loading: false\n };\n\n $scope.$on(\"podcastItems:refresh\", () => this.generateChartData());\n }\n\n navigate(offset) {\n this.month += offset;\n return this.generateChartData();\n }\n\n generateChartData() {\n PodcastDetailsStatsCtrl.resetChart(this.chartSeries);\n\n return this.$q.all([\n this.podcastService.statsByByDownloaddate(this.podcast.id, this.month),\n this.podcastService.statsByPubdate(this.podcast.id, this.month)\n ]).then((arrayResult) => {\n let downloadData = _(arrayResult[0])\n .map(PodcastDetailsStatsCtrl.dateMapper())\n .sortBy(\"date\")\n .map(PodcastDetailsStatsCtrl.highChartsMapper())\n .value(),\n publicationData = _(arrayResult[1])\n .map(PodcastDetailsStatsCtrl.dateMapper())\n .sortBy(\"date\")\n .map(PodcastDetailsStatsCtrl.highChartsMapper())\n .value();\n\n this.chartSeries.push({\"name\": \"Download Date\", \"data\": downloadData});\n this.chartSeries.push({\"name\": \"Publication Date\", \"data\": publicationData});\n return this.chartSeries;\n });\n }\n\n static resetChart(chartSeries) {\n _.updateinplace(chartSeries, []);\n }\n\n static dateMapper() {\n return (value) => { return { date : Date.UTC(value.date[0], value.date[1]-1, value.date[2]), numberOfItems : value.numberOfItems }; };\n }\n\n static highChartsMapper() {\n return (value) => [value.date, value.numberOfItems];\n }\n}\n\n\nangular.module('ps.podcast.details.stats', [ 'highcharts-ng' ])\n .directive('podcastStats', () => new podcastStatsDirective())\n .controller('PodcastDetailsStatsCtrl', PodcastDetailsStatsCtrl);\n\nclass podcastUploadDirective {\n\n constructor() {\n this.restrcit = 'E';\n this.templateUrl = 'html/podcast-details-upload.html';\n this.scope = {\n podcast : '='\n };\n this.controller = 'podcastUploadCtrl';\n this.controllerAs = 'puc';\n this.bindToController = true;\n }\n}\n\nclass podcastUploadCtrl{\n\n constructor($scope, itemService, $notification) {\n this.$scope = $scope;\n this.itemService = itemService;\n this.$notification = $notification;\n }\n\n onFileSelect($files) {\n angular.forEach($files, (file) => {\n this.itemService.upload(this.podcast, file)\n .then((item) => {\n this.$scope.$emit(\"podcastEdition:upload\");\n try {\n this.$notification('Upload effectué', {\n body: item.title,\n icon: item.cover.url,\n delay: 5000\n });\n } catch (e) {}\n });\n });\n }\n}\n\n\nangular.module('ps.podcast.details.upload', [\n 'ps.dataService.item',\n 'ngFileUpload',\n 'notification'\n])\n .directive('podcastUpload', () => new podcastUploadDirective())\n .controller('podcastUploadCtrl', podcastUploadCtrl);\n"],"sourceRoot":"/source/"}
\ No newline at end of file
diff --git a/src/main/resources/static/app/less/items-search.less b/src/main/resources/static/app/less/items-search.less
index 321c0c78c..5ca04ba3d 100644
--- a/src/main/resources/static/app/less/items-search.less
+++ b/src/main/resources/static/app/less/items-search.less
@@ -27,12 +27,8 @@
border-top-right-radius: 5px;
max-height: 219px;
width: 100%;
- background-size: 100%;
- @media screen and (max-width: @screen-xs-max) {
- background-size: 120%;
- }
+ background-size: cover;
background-repeat: no-repeat;
- //-webkit-filter: blur(3px);
background-position : center center;
padding-left: 0 !important;
padding-right: 0 !important;