diff --git a/static/img/beg.jpg b/static/img/beg.jpg new file mode 100644 index 0000000..98a66a8 Binary files /dev/null and b/static/img/beg.jpg differ diff --git a/static/js/app/lib/utils.coffee b/static/js/app/lib/utils.coffee index 6ed84fc..b4ef04d 100644 --- a/static/js/app/lib/utils.coffee +++ b/static/js/app/lib/utils.coffee @@ -17,7 +17,7 @@ define ['jquery', 'bootstrap', 'toastr'], ($, bootstrap, toastr) -> if document.cookie.indexOf("sessionId") $.getJSON "/ajax/session_play_count", (data) => console.log "utils: got playcount" - @modal "dlg/PlayCountLoginAlert" if (data.play_count isnt 0) and (data.play_count % 5) is 0 + @modal "dlg/PlayCountLoginAlert" if (data.play_count isnt 0) and (data.play_count % com.podnoms.settings.nag_count) is 0 true showError: (title, message) => diff --git a/static/js/app/lib/utils.js b/static/js/app/lib/utils.js index a88dbd1..4933f18 100644 --- a/static/js/app/lib/utils.js +++ b/static/js/app/lib/utils.js @@ -27,7 +27,7 @@ if (document.cookie.indexOf("sessionId")) { $.getJSON("/ajax/session_play_count", function(data) { console.log("utils: got playcount"); - if ((data.play_count !== 0) && (data.play_count % 5) === 0) { + if ((data.play_count !== 0) && (data.play_count % com.podnoms.settings.nag_count) === 0) { return _this.modal("dlg/PlayCountLoginAlert"); } }); diff --git a/templates/javascript/settings.js b/templates/javascript/settings.js index 1f7b9da..47fdf81 100644 --- a/templates/javascript/settings.js +++ b/templates/javascript/settings.js @@ -9,6 +9,7 @@ com.podnoms.settings = { liveStreamRoot: 'http://{{ LIVE_STREAM_URL }}:{{ LIVE_STREAM_PORT }}/{{ LIVE_STREAM_MOUNT }}', streamInfoUrl: 'http://{{ LIVE_STREAM_INFO_URL }}', volume: '{{ DEFAULT_AUDIO_VOLUME }}', + nag_count: {{ NAG_COUNT }}, smDebugMode: {{ SM_DEBUG_MODE }}, isDebug: {{ IS_DEBUG }}, drawTimelineOnMix: false, diff --git a/templates/views/dlg/PlayCountLoginAlert.html b/templates/views/dlg/PlayCountLoginAlert.html index 1a0b022..d7d65ed 100644 --- a/templates/views/dlg/PlayCountLoginAlert.html +++ b/templates/views/dlg/PlayCountLoginAlert.html @@ -6,9 +6,20 @@
+