volumio / Volumio2-UI

Volumio2 Web Based User Interface
http://volumio.org
168 stars 164 forks source link

Fix next / prev functions while playing webradio (1/2) #711

Closed TonyVpck closed 4 years ago

TonyVpck commented 4 years ago

This PR fix next / prev functions while playing webradio !

I tested the modifications suggested in this post below and the next / prev functions work correctly! https://github.com/volumio/Volumio2/issues/1122

To fix the problem a first modification is necessary in Volumio2-UI/src/app/services/player.service.js

@@ -69,15 +69,11 @@ class PlayerService {
  }

  prev() {
   - if (this.state.trackType !== 'webradio') {
      this.socketService.emit('prev');
   - }
  }

  next() {
   - if (this.state.trackType !== 'webradio') {
      this.socketService.emit('next');
   - }
  }

@@ -89,16 +85,12 @@ class PlayerService {
  }

  shuffle() {
   - if (this.state.trackType !== 'webradio') {
      this.$log.debug(!this.state.random);
      this.socketService.emit('setRandom', {value: !this.state.random});
   - }
  }

  repeatAlbum(repeat,repeatSingle) {
   - if (this.state.trackType !== 'webradio') {
      this.socketService.emit('setRepeat', {value: repeat, repeatSingle: repeatSingle});
   - }
  }

Changes must be coupled with another from main volumio2 in Volumio2/app/statemachine.js

PR link : [volumio/Volumio2/pull/1880]

hoping it will be useful !

volumio commented 4 years ago

Thanks, give us some time as this change on the BE is tricky. Thanks for your PR

TonyVpck commented 4 years ago

Thank you for your answer, I hope that the contribution will be useful and functional, I remain available to see the evolutions of the tests! good evening

volumio commented 4 years ago

Thanks to your BE fixes, it works fine and its now integrated!

TonyVpck commented 4 years ago

Very happy to contribute to this nice project. I enjoy that everything works ! Thank you for intergration !