-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow updating source settings via rest
- Loading branch information
Showing
17 changed files
with
237 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
plugin/src/main/java/com/github/topi314/lavasrc/plugin/LavaSrcRest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.github.topi314.lavasrc.plugin; | ||
|
||
import com.github.topi314.lavasrc.protocol.Config; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.io.IOException; | ||
|
||
@RestController | ||
public class LavaSrcRest { | ||
|
||
private final LavaSrcPlugin plugin; | ||
|
||
public LavaSrcRest(LavaSrcPlugin plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
@PostMapping("/v4/lavasrc/reload") | ||
@PatchMapping("/v4/lavasrc/reload") | ||
@PutMapping("/v4/lavasrc/reload") | ||
public void setConfig(Config config) throws IOException { | ||
plugin.updateConfig(config); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...i314/lavasrc/plugin/AppleMusicConfig.java → ...vasrc/plugin/config/AppleMusicConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../topi314/lavasrc/plugin/DeezerConfig.java → ...4/lavasrc/plugin/config/DeezerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 54 additions & 54 deletions
108
...i314/lavasrc/plugin/FloweryTTSConfig.java → ...vasrc/plugin/config/FloweryTTSConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
package com.github.topi314.lavasrc.plugin; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
@ConfigurationProperties(prefix = "plugins.lavasrc.flowerytts") | ||
@Component | ||
public class FloweryTTSConfig { | ||
|
||
private String voice = null; | ||
private boolean translate; | ||
private int silence; | ||
private float speed = 1.0F; | ||
private String audioFormat = "mp3"; | ||
|
||
public String getVoice() { | ||
return this.voice; | ||
} | ||
|
||
public void setVoice(String voice) { | ||
this.voice = voice; | ||
} | ||
|
||
public boolean getTranslate() { | ||
return this.translate; | ||
} | ||
|
||
public void setTranslate(boolean translate) { | ||
this.translate = translate; | ||
} | ||
|
||
public int getSilence() { | ||
return this.silence; | ||
} | ||
|
||
public void setSilence(int silence) { | ||
this.silence = silence; | ||
} | ||
|
||
public float getSpeed() { | ||
return this.speed; | ||
} | ||
|
||
public void setSpeed(float speed) { | ||
this.speed = speed; | ||
} | ||
|
||
public String getAudioFormat() { | ||
return this.audioFormat; | ||
} | ||
|
||
public void setAudioFormat(String audioFormat) { | ||
this.audioFormat = audioFormat; | ||
} | ||
package com.github.topi314.lavasrc.plugin.config; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
@ConfigurationProperties(prefix = "plugins.lavasrc.flowerytts") | ||
@Component | ||
public class FloweryTTSConfig { | ||
|
||
private String voice = null; | ||
private boolean translate; | ||
private int silence; | ||
private float speed = 1.0F; | ||
private String audioFormat = "mp3"; | ||
|
||
public String getVoice() { | ||
return this.voice; | ||
} | ||
|
||
public void setVoice(String voice) { | ||
this.voice = voice; | ||
} | ||
|
||
public boolean getTranslate() { | ||
return this.translate; | ||
} | ||
|
||
public void setTranslate(boolean translate) { | ||
this.translate = translate; | ||
} | ||
|
||
public int getSilence() { | ||
return this.silence; | ||
} | ||
|
||
public void setSilence(int silence) { | ||
this.silence = silence; | ||
} | ||
|
||
public float getSpeed() { | ||
return this.speed; | ||
} | ||
|
||
public void setSpeed(float speed) { | ||
this.speed = speed; | ||
} | ||
|
||
public String getAudioFormat() { | ||
return this.audioFormat; | ||
} | ||
|
||
public void setAudioFormat(String audioFormat) { | ||
this.audioFormat = audioFormat; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...topi314/lavasrc/plugin/LavaSrcConfig.java → .../lavasrc/plugin/config/LavaSrcConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...4/lavasrc/plugin/LyricsSourcesConfig.java → ...rc/plugin/config/LyricsSourcesConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...topi314/lavasrc/plugin/SourcesConfig.java → .../lavasrc/plugin/config/SourcesConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...topi314/lavasrc/plugin/SpotifyConfig.java → .../lavasrc/plugin/config/SpotifyConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...314/lavasrc/plugin/YandexMusicConfig.java → ...asrc/plugin/config/YandexMusicConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...topi314/lavasrc/plugin/YouTubeConfig.java → .../lavasrc/plugin/config/YouTubeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.