1. Post #41
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Without looking at the code, and based on that error, s is nil. I'm assuming s is song, so could you just add a check to see if it's nil?

    if !s then return end
    That should only happen if the songlist is fucked up. I'd rather fixed the songlist than ignore the problem and hack a solution that targets the symptoms.

    botuts, when did you get this error, what where you doing?

  2. Post #42
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    That should only happen if the songlist is fucked up. I'd rather fixed the songlist than ignore the problem and hack a solution that targets the symptoms.

    botuts, when did you get this error, what where you doing?
    Meh, I'd still say add it in anyway, a proper error message would look better than a Lua error - WTF SUCKY ADDON IT HAZ ERRORZ
    Reply With Quote Edit / Delete Reply United States Show Events Dumb Dumb x 2 (list)

  3. Post #43
    botuts's Avatar
    March 2011
    45 Posts
    That should only happen if the songlist is fucked up. I'd rather fixed the songlist than ignore the problem and hack a solution that targets the symptoms.

    botuts, when did you get this error, what where you doing?
    Well i finally got the songs uploaded and the gmod lua code configured. I started up a quick gmod mp server, i pressed f7 and the window popped up but those 2 Lua errors would pop on the top right. It said in my song list i had 2 available songs which is correct. But the songs never popped up in the list and those 2 errors would always show.

  4. Post #44
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Well i finally got the songs uploaded and the gmod lua code configured. I started up a quick gmod mp server, i pressed f7 and the window popped up but those 2 Lua errors would pop on the top right. It said in my song list i had 2 available songs which is correct. But the songs never popped up in the list and those 2 errors would always show.
    Can you please post the URL to your songlist.php file?

  5. Post #45
    botuts's Avatar
    March 2011
    45 Posts
    Can you please post the URL to your songlist.php file?
    is this is?

    http://botuts1209.dyndns.org/wolfdj/songlist.php

  6. Post #46
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    You didn't enter the song length's correctly. It should be min-sec, not min:sec. I guess I should have seen that one coming....

    Re-upload the songs using the min-sec format. I also added a string replace to catch any min:sec and convert them.
    Reply With Quote Edit / Delete Reply United States Show Events Winner Winner x 1 (list)

  7. Post #47
    botuts's Avatar
    March 2011
    45 Posts
    You didn't enter the song length's correctly. It should be min-sec, not min:sec. I guess I should have seen that one coming....

    Re-upload the songs using the min-sec format. I also added a string replace to catch any min:sec and convert them.

    As of now, everything works :D thanks man

  8. Post #48
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    As of now, everything works :D thanks man
    No Problem. Glad you like it.

  9. Post #49
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    Still failing trying to get to work in IIS.
    Uploader works fine, but Song conformation is broken.
    No errors, i had some looks true the code myself but everything looks fine to me.

    Any suggestions on stuff i can try ?

    Edited:

    Fuck yea got it to work, This is the stuff you need to do if you are working on a windows system.
    1. Enable sqllite by uncommenting
    extension=php_pdo.dll
    extension=php_sqlite.dll
    in php.ini

    2. Download the windows support files for getID3 else it will silently fail
    http://sourceforge.net/projects/geti...ows%20Support/

    3. Copy the files in the zip to random folder

    4. Specifie the folder location in wolfdj\admin\lib\getid3.php
    by addeding this line to the top of the file
    define('GETID3_HELPERAPPSDIR', 'C:/Your/Folder/'); //(No spaces end path with a / )

  10. Post #50
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    [@wolfdj\client\cl_menu.lua:387] Tried to use invalid object (type Panel) (Object was NULL or not of the right type)

    Also it most of the time doesn't go to the next song in que.

  11. Post #51
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Awesome, glad that is fixed. That error pops up occasionally. I think it has to do with the panel being closed, but I can't seem to reliably reproduce it.

  12. Post #52
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    Awesome, glad that is fixed. That error pops up occasionally. I think it has to do with the panel being closed, but I can't seem to reliably reproduce it.
    -- Update the list
    			Stream.MenuText:SetText('WolfDJ - Total Songs Available: '..Stream.Count)
    			Stream.MenuText:SizeToContents()
    			Stream.MusicWindow:Clear()
    			Stream.LoadList( Stream.SongList, Stream.MusicWindow )

    Replace with

    			-- Update the list
    			if Stream.Menu and Stream.Menu:IsValid() then
    				Stream.MenuText:SetText('WolfDJ - Total Songs Available: '..Stream.Count)
    				Stream.MenuText:SizeToContents()
    				Stream.MusicWindow:Clear()
    			end
    			Stream.LoadList( Stream.SongList, Stream.MusicWindow )

  13. Post #53
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    hmm.. Could have sworn I added that a while ago, but I guess the commit didn't go through =/

    Anyways, thanks flap!

    Let me know if this still happens everyone.

  14. Post #54
    Grim Jam's Avatar
    May 2010
    266 Posts
    Requesting a random shuffle option for clients as well as server.

    Also a better explaination of radio mode.

    Edit : This has been a great thing to have on a server,thanks.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Agree Agree x 1 (list)

  15. Post #55
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Requesting a random shuffle option for clients as well as server.

    Also a better explaination of radio mode.

    Edit : This has been a great thing to have on a server,thanks.
    Radio Mode is a random shuffle mode for clients.

    When Radio Mode is enabled on the client, it will block incoming server songs. When the client plays a song locally, when the song ends, it will randomly choose a new song from the list. Basically it will keep streaming songs randomly after each song ends. The selection of what is played next is limited by what filter you currently have. So if you only want to listen to, say, Daft Punk, then you would put Daft Punk in the filter, and after the current songs ends clientside, it would play a random Daft Punk song. After that one ends, another random Daft Punk song.

    I've not fully tested this feature however. The above is how is should work. Please let me know if you run across any issues, and I will fix them.

    Edited:

    Also, is your request for a random shuffle mode for the server as well?
    Reply With Quote Edit / Delete Reply United States Show Events Useful Useful x 1 (list)

  16. Post #56
    Grim Jam's Avatar
    May 2010
    266 Posts
    Yarp, for the server too.

    And I understand roughly how radio mode should be executed - although I don't know what filter you are talking about - and I attempted playing and letting a song finish(locally) with radio mode on, but no joy. (Maybe it works for base level clients?)


    Also it most of the time doesn't go to the next song in que[ue].
    This isn't a big issue, but seconded.

  17. Post #57
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Might have to do with the panel being unloaded when you close it. I will look into it this evening when I have some free time, and possibly add the server-side radio mode as well.

    The filter is the Quick Search function. It limits what is shown in the list to what you search for. The radio will then only play what you searched for.

    Edited:

    Also, out of curiosity, how many people are actually using this?

  18. Post #58
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    Grim Jam, Me and Flapjack are the same team.

  19. Post #59
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Cool. What community do you guys code for, if any? I've seen you and flap around in tons of threads.

  20. Post #60

  21. Post #61
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Updated to r14.

    Fixed the remaining client-side errors. Songs should play in radio mode correctly now. I also saved the quick search state when you close the player, since the radio uses that as a filter.

    I also added a very basic server-side radio implementation. The problem with this is that the server doesn't know about the songlist, it only accept commands from players. So each player with DJ rights has the option to turn on Server Radio on the Queue panel. When enabled, if that player adds a song to the queue, when it ends, the server will start playing another song. The song choice is limited to the quick search filter, just like local radio.

    A warning about the server-side radio. Because of the nature of how it works, only one person should have it enabled at once, and they should start it by enabling server-side radio, and adding one song to the queue. The DJ should handle the rest. If more than one person has server-side radio enabled, and each add a song, then songs will still be added to the queue, but at seemingly random intervals.

    The server-side radio works by requesting a random new song 7 seconds after the last requested song was supposed to have ended. The advantage to this is keeping the songlist clientside and having filters, but there is no callback for when a song ends, so we have to predict it. But the client doesn't know if they song just added is played immediately, or added to the queue to be played later. The prediction assumes the former.




    TL;DR

    I fixed errors, and added server-side radio, but it is finicky. I will add a callback for a song's end some time soon that will make it more reliable.

  22. Post #62
    Grim Jam's Avatar
    May 2010
    266 Posts
    Updated, server side radio works well - though when you get around to revamping it, having it not linked to a specific player, and maybe letting people vote yes/no for it would be good. But it works at the moment and that's all I care about.

    Nominations should have a percentage option - for example, I feel like 5 or 6 is about right for a full server, but too high for an emptier one.

    And more thank you's for adding the features you have.

  23. Post #63
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Updated, server side radio works well - though when you get around to revamping it, having it not linked to a specific player, and maybe letting people vote yes/no for it would be good. But it works at the moment and that's all I care about.

    Nominations should have a percentage option - for example, I feel like 5 or 6 is about right for a full server, but too high for an emptier one.

    And more thank you's for adding the features you have.
    Percentage should be pretty easy to do. I think I'll have an option for both. Which ever is higher, specific number or %.

    The problem with having the server radio not linked to a person is that I have to set up the links to the song list on the server, which I hadn't originally planned on. I will look into it, though it may b a while. Got lots of stuff to do lately.

    Glad everything is working though, and good to know my work is appreciated.

  24. Post #64
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    Code:
    12:30 - +[SP]+ CCD: i found a bug with wolfDJ :P
    12:30 - Flapadar: what is it?
    12:31 - +[SP]+ CCD: When you add your own song. and it finishes the DJ automatically plays another without any nominations.
    12:31 - +[SP]+ CCD: And there is none in the que after it.

  25. Post #65
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Code:
    12:30 - +[SP]+ CCD: i found a bug with wolfDJ :P
    12:30 - Flapadar: what is it?
    12:31 - +[SP]+ CCD: When you add your own song. and it finishes the DJ automatically plays another without any nominations.
    12:31 - +[SP]+ CCD: And there is none in the que after it.
    Is it playing server-wide or locally? That sounds like someone has radio mode enabled.

  26. Post #66
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    Is it playing server-wide or locally? That sounds like someone has radio mode enabled.
    I'm not too sure - he didn't tell me any more. I'll pester him later about that.

    Edited:

    12:28 - +[SP]+ CCD: No.
    12:28 - +[SP]+ CCD: it isn't
    12:28 - +[SP]+ CCD: i always check.

  27. Post #67
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Is that a "No, it isn't player server-wide", or a "No, Radio Mode isn't enabled"?

  28. Post #68
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    Is that a "No, it isn't player server-wide", or a "No, Radio Mode isn't enabled"?
    "No, radio mode isn't enabled"

  29. Post #69
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Can you ask him to double check that it is server wide, and not local?

  30. Post #70
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    15:50 - +[SP]+ CCD: Server
    15:50 - +[SP]+ CCD: I left it on to check, and someone said "What is this shit"

  31. Post #71
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Does it say something is added to the queue, or is it just playing? If it says it was added to the queue, who does it say added it?

  32. Post #72
    FlapadarV2's Avatar
    December 2010
    1,802 Posts
    16:09 - +[SP]+ CCD: "Server(WolfDJ) has added <Song Name> to the song que"

  33. Post #73
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    16:09 - +[SP]+ CCD: "Server(WolfDJ) has added <Song Name> to the song que"
    That means that someone who as Server Radio Mode permissions has it on.

    Edited:

    Tell him to double check that Server radio mode is off. It's on the Queue tab.

  34. Post #74

    November 2008
    14 Posts
    Hey,

    Iv installed it onto my webserver and have set it up ok, uploaded songs and all formats are mp3.
    iv edited the cl_config and put the address of the webserver and the dir's but when in game i press f7 and it comes up with refreshing songlist and then doesnt show any songs ?

  35. Post #75
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    Paste the URL you are using for the songlist

  36. Post #76

    November 2008
    14 Posts
    Paste the URL you are using for the songlist
    http:///Qweb/wolfdj/songlist.php

    Ip address is current

    thanks

  37. Post #77
    ColdFusion's Avatar
    December 2009
    2,227 Posts
    Is that the same ip as your home network ?

    Is the webserver home hosted?


    EDIT: That was a fucking serious question. Stuff screws up when you connect to your own external ip.
    Reply With Quote Edit / Delete Reply Netherlands Show Events Funny Funny x 1Agree Agree x 1 (list)

  38. Post #78
    Terminal Shell Founder
    mr.wolf's Avatar
    July 2010
    820 Posts
    That link is blank. You dun broke something, probably with how you set up your webserver installation.

  39. Post #79

    November 2008
    14 Posts
    Is that the same ip as your home network ?

    Is the webserver home hosted?


    EDIT: That was a fucking serious question. Stuff screws up when you connect to your own external ip.
    Yeah this is hosted at home, only reason being i wanted to see if my nas could handle it but i know someone who will be able to host it on a proper webserver.

    Edited:

    That link is blank. You dun broke something, probably with how you set up your webserver installation.
    I have given the link to my friend and he has been able to go on to the website..... but like what cold fusion said its probably because im trying to connect to my own ip address... Il should be able to install it onto a dedicated webserver. so until then thanks for the help.

  40. Post #80
    Gold Member
    Fleamonji's Avatar
    April 2010
    627 Posts
    Out of curiosity, why did you add meta:HasDJRights() to 3 (probably 4) files? Couldn't you just add 1 shared file?
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 1 (list)