Skip to content

Commit

Permalink
Merge pull request #12 from Tom-Hirschberger/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Tom-Hirschberger authored Feb 11, 2021
2 parents 699c86e + 21bec42 commit 797612f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions MMM-MplayerRadio.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,9 @@ Module.register('MMM-MplayerRadio', {
if(self.config.showStations){
let stationsWrapper = document.createElement("div")
stationsWrapper.className = "stationsWrapper"
if(self.config.showStations || (self.getNumberOfStationsInCurrentProfile() < ((self.config.stationsBeforeAndAfter * 2)+1))){
if (self.config.scrollableStations){
if(self.config.showStations){
console.log("RADIO: Number of stations in this profile: "+self.getNumberOfStationsInCurrentProfile())
if (self.config.scrollableStations || (self.getNumberOfStationsInCurrentProfile() < ((self.config.stationsBeforeAndAfter * 2)+1))){
for (let curId = 0; curId < self.config.stations.length; curId ++){
if(
(typeof self.config.stations[curId].profiles === 'undefined') ||
Expand Down Expand Up @@ -293,6 +294,7 @@ Module.register('MMM-MplayerRadio', {
},

getNumberOfStationsInCurrentProfile: function(){
const self = this
if (self.currentProfile === ''){
return self.config.stations.length
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MMM-MplayerRadio",
"version": "0.0.5",
"version": "0.0.6",
"description": "",
"main": "MMM-MplayerRadio.js",
"dependencies": {
Expand Down

0 comments on commit 797612f

Please sign in to comment.