Raised This Month: $51 Target: $400
 12% 

Jukebox for Source - Streaming Music System v0.5.5.0 Beta


Post New Thread Reply   
 
Thread Tools Display Modes
smithy
SourceMod Donor
Join Date: Sep 2008
Location: United Kingdom
Old 04-27-2012 , 11:55   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #911

Hi

We have everything setup exactly as described in the op , but after uploading a song we then click it to preview but nothing happens , the player pops up but doesnt play the song or anything , also tried from in game same result also tried with multiple songs but nothing

Is their something i have missed ?
smithy is offline
kotek
Member
Join Date: Jun 2010
Old 05-08-2012 , 15:53   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #912

do You have adobe flash player for other browsers?

User requirements
kotek is offline
smithy
SourceMod Donor
Join Date: Sep 2008
Location: United Kingdom
Old 05-09-2012 , 11:33   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #913

Quote:
Originally Posted by smithy View Post

We have everything setup exactly as described in the op
smithy is offline
Static2601
Senior Member
Join Date: Jun 2010
Old 05-16-2012 , 16:51   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #914

im not sure how to get this working. Ive setup everything in mysql, setup remote file host, setup the webserver. Ive signed in, made an account and deleted the default "admin" acount and uploaded tracks to the uploads folder.
When I add tracks to the library, they seem to add but dont play, though the player pops up. In game, they show that theyre playing but hear nothing, my sound is up, the jb volume is at its fullest, MOTD's are enabled, Im not getting any errors in the logs, flash is updated.
so everything seems to be working fine i just cant hear anything. What could be wrong?
Code:
 
16:52:39 [SM] Listing 39 plugins:
           01 "Admin File Reader" (1.4.3-dev) by AlliedModders LLC
           02 "SQL Admins (Prefetch)" (1.3.9-dev) by AlliedModders LLC
           03 "Admin Help" (1.4.3-dev) by AlliedModders LLC
           04 "Admin Menu" (1.4.3-dev) by AlliedModders LLC
           05 "Anti-Flood" (1.4.3-dev) by AlliedModders LLC
           06 "MOTD Backpack Enhanced" (1.0.5) by Bottiger, Munra
           07 "Basic Chat" (1.4.3-dev) by AlliedModders LLC
           08 "Basic Comm Control" (1.4.3-dev) by AlliedModders LLC
           09 "Basic Commands" (1.4.3-dev) by AlliedModders LLC
           10 "Basic Info Triggers" (1.4.3-dev) by AlliedModders LLC
           11 "Basic Votes" (1.4.3-dev) by AlliedModders LLC
           12 "Client Preferences" (1.4.3-dev) by AlliedModders LLC
           13 "Fun Commands" (1.4.3-dev) by AlliedModders LLC
           14 "Fun Commands X" (1.9) by Spazman0 and Arg!
           15 "Fun Votes" (1.4.3-dev) by AlliedModders LLC
           16 "Jukebox" (0.5.5.0) by SirLamer
           17 "Kigen's Anti-Cheat" (1.2.2.0) by CodingDirect LLC
           18 "MySQL Polls" (1.4) by Cep>|< - Russian BugTrack Group
           19 "Nextmap" (1.4.3-dev) by AlliedModders LLC
           20 "PermaMute" (0.1) by Ryan "FLOOR_MASTER" Mannion
           21 "Player Commands" (1.4.3-dev) by AlliedModders LLC
           22 "[TF2] Heavy Sprint" (1.0) by noodleboy347
           23 "Quake Sounds" (2.7) by dalto, Grrrrrrrrrrrrrrrrrrr, and psychonic
           24 "Remote Control Sentries" (5.0) by twistedeuphoria,CnB|Omega,Tsunami,-=|JFH|=-Naris
           25 "Reserved Slots" (1.4.3-dev) by AlliedModders LLC
           26 "[TF2] Roll The Dice" (0.3.8.2) by linux_lover
           27 "Server Hop" (0.8.1) by [GRAVE] rig0r
           28 "SourceMod Anti-Cheat" (0.7.7.1) by GoD-Tony, psychonic
           29 "SMAC Aimbot Detector" (0.7.7.1) by GoD-Tony
           30 "Evil Admin - Rocket" (1.0.110) by <eVa>Dog
           31 "Observer Point" (1.0.100) by <eVa>Dog
           32 "Sound Commands" (1.4.3-dev) by AlliedModders LLC
           33 "Spray Tracer" (5.8a) by Nican132, CptMoore, Lebson506th
           34 "SQL Admin Manager" (1.3.9-dev) by AlliedModders LLC
           35 "[TF2Items] Manager" (1.4.1) by Damizean & Asherkin
           36 "Client Unbury" (1.0) by Static2601
           37 "Vote Mute/Vote Silence" (1.0.105) by <eVa>Dog/AlliedModders LLC
           38 "Advanced admin commands" (0.16) by 3sigma
           39 <Error> "SourceBans" (1.4.8) by SourceBans Development Team
         Load Errors:
         SourceBans: Error detected in plugin startup (see error logs)

Last edited by Static2601; 05-16-2012 at 16:53.
Static2601 is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-20-2012 , 15:09   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #915

Quote:
Originally Posted by Static2601 View Post
im not sure how to get this working. Ive setup everything in mysql, setup remote file host, setup the webserver. Ive signed in, made an account and deleted the default "admin" acount and uploaded tracks to the uploads folder.
When I add tracks to the library, they seem to add but dont play, though the player pops up. In game, they show that theyre playing but hear nothing, my sound is up, the jb volume is at its fullest, MOTD's are enabled, Im not getting any errors in the logs, flash is updated.
so everything seems to be working fine i just cant hear anything. What could be wrong?
There could be tons of different issues here, and I only can make suggestions cause it took me an entire day to get it working.

If you are doing this INSIDE your own network and you want to hear the music YOU CANT. That is because in the jukebox.cfg you set the jb_base_url as your public ip address. You cannot access yourself with a public IP address without setting up some sort of NAT reflection or NAT on a stick. Those require enterprise level routers, or very expensive ones at least anyway. You may be able to find some alternate firmware however. If you change this IP address to a local IP address you can hear it, but then no one else can. Unless the author of this mod adds local networking feature, then I'm afraid there is no work around with the mod itself. You have to change your network setup.
saucex4 is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-20-2012 , 15:15   WEB INTERFACE BUG
Reply With Quote #916

WEB INTERFACE BUG

I found that when I was browsing the playlist on the Jukebox web interface, any song I tried to edit would only edit, delete, or view info for the first song in the list no matter where I clicked.

Upon further investigation of the code I found that in BROWSE.php on line 731 there was a while loop with a $item_count variable used to up the count of certain items; however, $item_count++ came up on line 772 of the code which is OUTSIDE of the while loop, and thus all checkboxes had the html ID of "frm_box_0".

To fix this bug all you have to do is move the $item_count++ to inside the loop and everything works fine.
saucex4 is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-20-2012 , 15:38   User Registration BUG
Reply With Quote #917

For some reason, you cannot register more than 1 user in the admin section of the web interface.

You can temporary work around this by adding users into the database manually if you know SQL, or use phpmyadmin or something similar, but the following may be a better solution

This is the code in question

database.php

Code:
function addNewUser($username, $password, $email){
      $time = time();
      /* If admin sign up, give admin user level */
      if(strcasecmp($username, ADMIN_NAME) == 0){
         $ulevel = ADMIN_LEVEL;
      }else{
         $ulevel = USER_LEVEL;
      }
      $q = "INSERT INTO ".TBL_USERS." (`username`, `password`, `userid`, `userlevel`, `email`, `timestamp`) VALUES ('$username', '$password', '0', $ulevel, '$email', $time)";
      return mysql_query($q, $this->connection);
   }
The userid is inserted in the table as "0" everytime. The SQL table defines the PRIMARY KEYS as username, and userid, and that they must be unique. This is probably why you can't add more than 1 user.

Here is a simple fix. Replace the addNewUser function in the database.php with the following.

Code:
function addNewUser($username, $password, $email){
      $time = time();
      /* If admin sign up, give admin user level */
      if(strcasecmp($username, ADMIN_NAME) == 0){
         $ulevel = ADMIN_LEVEL;
      }else{
         $ulevel = USER_LEVEL;
      }
      $userid = md5(str_shuffle($email));
      $q = "INSERT INTO ".TBL_USERS." (`username`, `password`, `userid`,  `userlevel`, `email`, `timestamp`) VALUES ('$username', '$password',  '$userid', $ulevel, '$email', $time)";
      return mysql_query($q, $this->connection);
   }
I added a variable $userid and defined it as the md5 hash of a shuffled e-mail address.

Last edited by saucex4; 05-20-2012 at 15:39.
saucex4 is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-20-2012 , 15:45   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #918

Quote:
Originally Posted by Skyrider View Post
Can anyone get this to work? SQL works fine, added music on the web panel just fine, server can find the music as well. But like many other people, no music is being played.
If your server is on the local network, or even your own computer you cannot hear the music, because the jb_base_url variable in the jukebox.cfg file is set to a public IP address I assume. This is fine for users outside your network, but no one in the inside LAN can hear anything because you are trying to access your server using a Public IP address which is not possible normally. To get around this you need to enable NAT reflection on your router, or NAT on a stick. Unfortunately these features are too powerful for conventional consumer routers, and you need to get an enterprise class router. Perhaps some custom router firmware may have it but I have never used it.

The only solution to this problem is by changing your network setup, or if the author adds LAN support.
saucex4 is offline
saucex4
Junior Member
Join Date: May 2012
Old 05-21-2012 , 12:21   LAN Support Request
Reply With Quote #919

I would like to request LAN support on this plugin if possible.

The following modifications should make it work for LAN environments while maintaining listenability for outside users. This is a crude modification but it works for me since I know very little about making plugins.

Add new variable to jukebox.cfg

jb_base_local_url = "" // put the local IP address of your jukebox install here.

Add IsLanIP()

Code:
//Thanks to Darkthrone (https://forums.alliedmods.net/member.php?u=54636)
bool:IsLanIP( String:src[16] )
{
    decl String:ip4[4][4];
    new ipnum;

    if(ExplodeString(src, ".", ip4, 4, 4) == 4)
    {
        ipnum = StringToInt(ip4[0])*65536 + StringToInt(ip4[1])*256 + StringToInt(ip4[2]);
        
        if((ipnum >= 655360 && ipnum < 655360+65535) || (ipnum >= 11276288 && ipnum < 11276288+4095) || (ipnum >= 12625920 && ipnum < 12625920+255))
        {
            return true;
        }
    }

    return false;
}
Added new handle variable

Code:
//around line 70
new Handle:cv_base_local_url = INVALID_HANDLE;
Added the following on OnPluginStart()

Code:
public OnPluginStart() {
    cv_base_local_url = CreateConVar("jb_base_local_url", "", "URL path to Jukebox's base folder if local", FCVAR_SPONLY|FCVAR_PRINTABLEONLY|FCVAR_PLUGIN);
}
Added the following on OnPluginEnd()

Code:
public OnPluginEnd() {
     CloseHandle2(cv_base_local_url);
}
Added the following on OnConfigsExecuted()
*NOTE There is a slight bug here where the error messages were swapped.

Code:
public OnConfigsExecuted() {
    decl String:base_local_url_test[128];
    GetConVarString(cv_base_local_url, base_local_url_test, sizeof(base_local_url_test));
    
    if(strlen(base_url_test) == 0) {
        PrintToServer("[JB] WARNING - You must populate 'jb_base_url' in cfg/sourcemod/jukebox.cfg with the URL to Jukebox's base folder on your web server."); 
    }
    if(strlen(leech_password_test) == 0) {
        PrintToServer("[JB] WARNING - You must populate 'jb_leech_password' in cfg/sourcemod/jukebox.cfg with the anti-leech password specified in settings.php on your web server.");
    }
    //There is obviously a better way to do this but this is just temporary.
    if(strlen(base_local_url_test) == 0) {
        PrintToServer("[JB] WARNING - You must populate 'jb_base_local_url' in cfg/sourcemod/jukebox.cfg with the URL to Jukebox's base folder on your web server."); 
    }
}
Modified the AddClients() to look like this (I'm posting all the code for clarity)

Code:
AddClients(id, clients_list[], update_count, bool:lock=false) {
    decl String:key[9], String:play_url[256];
    new volume_target = FindOption("volume");
    decl String:base_url[128];
    new temp_volume;
    new volume_min = GetConVarInt(cv_volume_min);
    
    //SAUCE
    decl String:ip[16];
    new bool:bIsLanIp;
    decl String:base_local_url[128];
    GetConVarString(cv_base_local_url, base_local_url, sizeof(base_url));
    //SAUCE
    
    GetConVarString(cv_base_url, base_url, sizeof(base_url));

    
    if(base_url[strlen(base_url)-1] != '/') {
        Format(base_url, sizeof(base_url), "%s/", base_url);
    }
    
    //SAUCE
    if(base_local_url[strlen(base_local_url)-1] != '/') {
        Format(base_local_url, sizeof(base_local_url), "%s/", base_local_url);
    }
    //SAUCE

    for(new i = 0; i < update_count; i++) {
        AssignStreamToClient(clients_list[i], id);
        play_lock[clients_list[i]] = lock;
    }
    
    GenerateKey(key, sizeof(key)); // Encrypts a time stamp into the URL to prevent leeching

    for(new i = 0; i < update_count; i++) {
        if(now_volume[clients_list[i]] < 0) {
            StopMOTD(clients_list[i]);
        } else {
            if(now_volume[clients_list[i]] > 0) {
                temp_volume = now_volume[clients_list[i]];
            } else {
                temp_volume = options[clients_list[i]][volume_target];
                now_volume[clients_list[i]] = temp_volume;
            }
            if(temp_volume > 0) {
                if(temp_volume < volume_min) {
                    temp_volume = volume_min;
                }
                //SAUCE
                GetClientIP(clients_list[i], ip, sizeof(ip)); 
        
                //detect LAN ip
                bIsLanIp = IsLanIP( ip );
                if(bIsLanIp) {
                    FormatEx(play_url, sizeof(play_url), "%squery.php?sid=%d&key=%s&vol=%d", base_local_url, id, key, temp_volume);
                }
                else {
                    FormatEx(play_url, sizeof(play_url), "%squery.php?sid=%d&key=%s&vol=%d", base_url, id, key, temp_volume);
                }
                //SAUCE
                LoadMOTDPanelHidden(clients_list[i], "Jukebox - Source Engine Streaming Music System", play_url, MOTDPANEL_TYPE_URL);
                // ShowMOTDPanel(clients_list[i], "Jukebox - Source Engine Streaming Music System", play_url, MOTDPANEL_TYPE_URL); // DEBUG
                // PrintToConsole(clients_list[i], "Playing URL: %s", play_url); // DEBUG
            }
        }
    }
    
    return true;
}

Last edited by saucex4; 05-21-2012 at 12:58.
saucex4 is offline
Jenzz
Junior Member
Join Date: Mar 2007
Old 05-26-2012 , 15:03   Re: Jukebox for Source - Streaming Music System v0.5.5.0 Beta
Reply With Quote #920

Hello everyone!
I am a little curious about this Jukebox plugin...
Is anyone still working on this? I read that sirlamer where trying to make it lighter then it already is.
I tried to strip it down a little myself but it didnt make much difference whatever i did, it all came to what songs i started playing anyway...

Anyone here know any solution to make it lag less?
I already tried the lower bitrate but, is it possible to do anything with the player itself to make it lag less?

Any help appreciated, thanks.
__________________
Jenzz is offline
Send a message via MSN to Jenzz Send a message via Skype™ to Jenzz
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode