• WolfDJ 3.0 - Stream music to players. Includes web-code
    236 replies, posted
  • Avatar of mr.wolf
  • [QUOTE=yuriman;29558025]He means each song should have a unique ID as in a integer which counts up for every song you add.[/QUOTE] It already does....
  • Avatar of Fleamonji
  • [QUOTE=mr.wolf;29558292]It already does....[/QUOTE] Then how hard would it be to make it not add doubles?
  • Avatar of mr.wolf
  • You're apparently not getting anything I'm telling you. What does having a unique row ID have to do with anything? Making it so you can't add double songs is a very difficult issue. How do you define a song as unique? By the song name? I've already told you the issue with this. In case you forgot, if you have unique song names, then if you have another song by the same name, but a different artist, it will still kick it out. If you make the combination of unique song name and artist unique, then you just have to rename the song, and you bypass it. If you do an MD5 hash of the file contents, then you just have to change the file slightly (such as modifying the metadata encoded in the file), and you bypass that as well. If you wish to implement any of the above options, I am not stopping you. However for the public release, I am not going to implement it unless I get a LOT more people asking for it, since it is easier to add, provided you know what you're doing, than to remove, assuming you do not.
  • Avatar of Fleamonji
  • Goddamn, again, give each song their own unique number in the table. If anything in the queue has that ID, return false when adding.
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29562848]Goddamn, again, give each song their own unique number in the table. If anything in the queue has that ID, return false when adding.[/QUOTE] And what is a SONG? The name? The artist? The file? ALL of these are mentioned in my above post. If you have another means of identifying what exactly a SONG is, then please let me know.
  • Avatar of Fleamonji
  • You said it was stored in a goddamned table. table.insert(songs, {name = title, length = time, uid = newid, artist = sartist})
  • Avatar of Nick Clegg
  • [QUOTE=Fleamonji;29568513]A number that increases by 1 for every song added.[/QUOTE] Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..
  • Avatar of mr.wolf
  • [QUOTE=Nick Clegg;29568567]Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..[/QUOTE] Ding ding ding! At least someone understands.... [editline]2nd May 2011[/editline] [QUOTE=Fleamonji;29568513]A number that increases by 1 for every song added.[/QUOTE] Also, it already DOES this. Like I've ALREADY said.
  • Avatar of yuriman
  • You could make a query when a song is added and do something like this [php] $hash = md5($songtitle . $songartist); $query = "SELECT count(*) FROM `songs` WHERE md5(`title` + `artist`) = $hash;"; [/php]And then check if the count(*) is greater then 0 [editline]2nd May 2011[/editline] I do not know the variable names you use since i havnt looked at the code.
  • Avatar of mr.wolf
  • [QUOTE=yuriman;29569116]You could make a query when a song is added and do something like this [php] $hash = md5($songtitle . $songartist); $query = "SELECT count(*) FROM `songs` WHERE md5(`title` + `artist`) = $hash;"; [/php]And then check if the count(*) is greater then 0 [editline]2nd May 2011[/editline] I do not know the variable names you use since i havnt looked at the code.[/QUOTE] Only prevents duplicates of the exact file md5, which is rare. Changing the meta data changes the md5.
  • Avatar of yuriman
  • No it prevents you from having a song with the same title and artist. You can lower it if you want it to be prevent duplications with different uppercase and lowercase characters
  • Avatar of mr.wolf
  • [QUOTE=yuriman;29571849]No it prevents you from having a song with the same title and artist. You can lower it if you want it to be prevent duplications with different uppercase and lowercase characters[/QUOTE] Sorry, didn't actually look what was in the MD5. I'm getting frustrated with this. Here is my final word on the matter. Is it possible to have very basic unique checks? Yes, but none of them are fool proof in any way, and most of them lead to a user mistagging something. So for the public release I am not going to implement it. If you want to implement it yourself, you have my full permission. You can even post what you did here so other can do it to. But I am not doing it for the public build.
  • Avatar of Fleamonji
  • [QUOTE=Nick Clegg;29568567]Right, so what happens when you add a duplicate song? You end up with two of the same song with different identifiers..[/QUOTE] No....each song added to the entire list has its own ID. When a song is added to the queue, that ID copies over. If the song you're trying to add has an ID of one in the queue, return false. it's really not that hard.
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29620894]No....each song added to the entire list has its own ID. When a song is added to the queue, that ID copies over. If the song you're trying to add has an ID of one in the queue, return false. it's really not that hard.[/QUOTE] OH! You're talking about adding songs to the QUEUE, not to the DATABASE. In that case, yes it is also entirely possible, but I'm not going to add it because some people like to listen to the same song in a row. You are free to modify the code to your liking.
  • Avatar of NOVS 12
  • I got an Internal Server Error on my web server. "The server encountered an internal error or misconfiguration and was unable to complete your request." Thats what happens after I enter the user name and password to enter the site. I did change the path in .htaccess Any help appreciated.
  • Avatar of Fleamonji
  • [QUOTE=NOVS 12;29703475]I got an Internal Server Error on my web server. "The server encountered an internal error or misconfiguration and was unable to complete your request." Thats what happens after I enter the user name and password to enter the site. I did change the path in .htaccess Any help appreciated.[/QUOTE] Are you 100% sure the path is correct? I had the same issue, but I discovered my host's control panel told me the wrong path. [editline]8th May 2011[/editline] It went away when I fixed it..
  • Avatar of mr.wolf
  • [QUOTE=Fleamonji;29706747]Are you 100% sure the path is correct? I had the same issue, but I discovered my host's control panel told me the wrong path. [editline]8th May 2011[/editline] It went away when I fixed it..[/QUOTE] This. The 500 error is what happens when your .htaccess file is invalid. For security reasons, and technical ones, it gives that error if there is something wrong in the file, so triple check it.
  • Avatar of Carson B
  • Okay all previous problems i got around (so removed them) But i have issue.. In-game when I press F7 nothing happens, at all, not even errors, its as if F7 isnt binded to anything. I tried switching it to F3 still nothing, any ideas?
  • Avatar of FlapadarV2
  • Is it possible to have it so as when guests add a new request, it removes their old one? I'm getting shit like this on my server: [code][WolfDJ] Pelf wants to play At A Medium Pace This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Backstabber This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Highway To Hell This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play No Quarter This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Vegemite This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Fun Fun Fun This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Up Above My Head This song needs 2 more nominations to play. [WolfDJ] Dr.HAX! [RUS] wants to play Robots Ftw This song needs 2 more nominations to play. Player Placardman left the game (Disconnect by user.) [WolfDJ] [THB] poo_fo [NL] wants to play Doom Level 1 This song needs 2 more nominations to play. [WolfDJ] Pelf wants to play Rasputin This song needs 2 more nominations to play. *DEAD* (TEAM) Andy19926: !votekick Pelf So much music?! Player ers35 has joined the game (TEAM) [ivG] dastreet 2K10: /vote highway to hell [WolfDJ] The Communist Duck wants to play Cigaro This song needs 2 more nominations to play. [WolfDJ] [THB] poo_fo [NL] wants to play Robots Ftw This song needs 1 more nominations to play. [WolfDJ] The Communist Duck wants to play Gay Bar This song needs 2 more nominations to play. (TEAM) [ivG] dastreet 2K10: !vote song Robots Ftw *DEAD* (TEAM) [THB] poo_fo [NL]: its f7 [WolfDJ] The Communist Duck wants to play A Friend In Need This song needs 2 more nominations to play.[/code]
  • Avatar of Zombiedance
  • Everytime i try to open my index.php i get a fatal error that me and my friend just cant seem to fix it says: Fatal error: Class 'SQLiteDatabase' not found in /home/a6241867/public_html/admin/lib/DB.php on line 9 Please can anyone help?
  • Avatar of Zombiedance
  • That's what i thought but we cant find that file for our lives we have the path to it but we just cant get to it. We made a ini.php page to give us all the information. But every time we try to go to that directory in our web server we get an error saying nothings there. In case it helps this is out path basic: /usr/local/lib/php.ini
  • Avatar of CawldFussuian
  • For CentOS and some other OS's the ini file is located in /etc/php.ini Tell me what OS you are running and i look up the specifics. If you are not hosting from a VPS or a Dedicated Server, and its a web only host. you should make a ticket and ask them to enable sql lite.
  • Avatar of Zombiedance
  • I found out the problem and its just not worth the work to bother. I'm going to get a web server from [url]http://www.a2hosting.com/database/sqlite-hosting[/url] saves me a lot of time and work.
  • Avatar of FlapadarV2
  • [img]http://gyazo.com/58bdf1d8cf0fffd9fb2e425e9d2c60f3.png[/img] [editline]5th June 2011[/editline] [code]Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value) Timer Error: [lua\includes\extensions\string.lua:146] attempt to index local 's' (a nil value)[/code]