Added follower_sounds directory to allow user to specify what follower
sounds will play. All files inserted into that directory can be selected for playing.
This commit is contained in:
parent
1d1e7b1910
commit
2b69dcda03
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -41,7 +41,7 @@ import sig.utils.TimeUtils;
|
||||
public class TwitchModule extends Module{
|
||||
public String console="Twitch module goes here.";
|
||||
final public static String USERDIR = sigIRC.BASEDIR+"sigIRC/users/";
|
||||
final public static String SOUNDSDIR = sigIRC.BASEDIR+"sigIRC/sounds/";
|
||||
final public static String SOUNDSDIR = sigIRC.BASEDIR+"sigIRC/follower_sounds/";
|
||||
final public static String FOLLOWERQUEUEFILE = USERDIR+"followers.txt";
|
||||
public static boolean streamOnline = false;
|
||||
static BufferedImage follower_img;
|
||||
@ -76,6 +76,7 @@ public class TwitchModule extends Module{
|
||||
boolean firstTime = false;
|
||||
InitializeImages();
|
||||
InitializeStatistics();
|
||||
InitializeFollowerSounds();
|
||||
firstTime = CreateUserFolder();
|
||||
if (firstTime) {
|
||||
CreateFollowerQueueLog();
|
||||
@ -127,6 +128,26 @@ public class TwitchModule extends Module{
|
||||
});*/
|
||||
}
|
||||
|
||||
private void InitializeFollowerSounds() {
|
||||
File follower_sounds_dir = new File(SOUNDSDIR);
|
||||
String[] files = filterFiles(follower_sounds_dir.list());
|
||||
followersounds = files;
|
||||
//System.out.println(Arrays.toString(followersounds));
|
||||
}
|
||||
|
||||
private static String[] filterFiles(String[] files) {
|
||||
List<String> finallist = new ArrayList<String>();
|
||||
for (String file : files) {
|
||||
if (!file.equalsIgnoreCase("README.txt")) {
|
||||
File f = new File(SOUNDSDIR+file);
|
||||
if (!f.isDirectory()) {
|
||||
finallist.add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
return finallist.toArray(new String[finallist.size()]);
|
||||
}
|
||||
|
||||
private void InitializeStatistics() {
|
||||
viewers_numb = new FancyNumber("icon_viewers_count.png",0);
|
||||
views_numb = new FancyNumber("icon_views_count.png",0);
|
||||
|
@ -203,7 +203,9 @@ public class sigIRC{
|
||||
manager = new FileManager("sigIRC/Emotes/subscribers.txt"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/logs/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/sounds/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/sounds/Glaceon_cry.wav"); manager.verifyAndFetchFileFromServer();
|
||||
//manager = new FileManager("sigIRC/sounds/Glaceon_cry.wav"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/follower_sounds/Glaceon_cry.wav"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/follower_sounds/README.txt"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/record"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/glaceon_follower.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/sigIRCicon.png"); manager.verifyAndFetchFileFromServer();
|
||||
|
Loading…
x
Reference in New Issue
Block a user