This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Search found 37 matches

by DJCharlie
Sat Jul 24, 2010 3:56 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

It's working now! Thanks everyone!

Stop by the station (kjsr.net) next Friday around 7 eastern and I'll play some music for you!
by DJCharlie
Sat Jul 24, 2010 11:24 am
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

That's very nice code! But that part of the script is working. :) What we need help with is the !fetch part. proc pub_fetch {nick host hand chan text} { global db set sqlhand [mysqlconnect -host $db(hostname) -user $db(username) -password $db(password)] mysqluse $sqlhand $db(database) foreach query ...
by DJCharlie
Fri Jul 23, 2010 10:07 am
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

4 fields: tracknum (int11), artist (text), title (text), and path (text).

The output of $query is 1. Every time, no matter what I input, it's 1.

I've gotten a temporary fix by going back to exec'ing a bash script that does the lookup instead of the tcl, but I'd like to do away with that.
by DJCharlie
Thu Jul 22, 2010 8:48 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Ok, trying a different tack... proc pub_fetch {nick host hand chan text} { global db set sqlhand [mysqlconnect -host $db(hostname) -user $db(username) -password $db(password)] mysqluse $sqlhand $db(database) set query [mysqlsel $sqlhand "SELECT `path` FROM `music` WHERE `tracknum` = '$text'&quo...
by DJCharlie
Thu Jul 22, 2010 5:26 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Here's exactly what I have:

Code: Select all

foreach query [mysqlsel $sqlhand "SELECT * FROM `music` WHERE `tracknum` = [::mysql::escape $text]"] {
And what I get is:

Code: Select all

-FredGibson- Sending you Song #1:  -
That query is valid in MySQL, but not here...
by DJCharlie
Thu Jul 22, 2010 4:58 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

tracknum is an int(11) field. And I just tried your line: "SELECT * FROM `music` WHERE `tracknum` = [::mysql::escape $text]" and got: Tcl error [pub_fetch]: mysqlsel/db server: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the righ...
by DJCharlie
Thu Jul 22, 2010 4:49 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

I'm currently using the code phpmyadmin spat out at me, and it works for the search. :) !fetch is a whole different can of worms though.
by DJCharlie
Thu Jul 22, 2010 4:40 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

I -think- so. What I have is 4 fields: tracknum, artist, title, path Trouble I'm having, is when someone requests track number 8655 (as an example, with the test data I'm using, that would be Collective Soul - Better Now), instead of getting track number 8655, it's returning track number 1. proc pub...
by DJCharlie
Thu Jul 22, 2010 4:25 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Well, that works. :)

!fetch is still slower than Christmas, but I'm getting to it in a few.
by DJCharlie
Thu Jul 22, 2010 4:02 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

It works!!! Search time has been cut by several seconds! Only problem I'm having now is formatting. The result comes back as: -FredGibson- 8655 {Collective Soul} {Better Now} {/mnt/music/C/Collective Soul/Collective Soul - Better Now.mp3} And what I'd like to have is: Collective Soul - Better Now He...
by DJCharlie
Thu Jul 22, 2010 2:18 pm
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Well, I finally cracked the error in the bash script (swapped " for ' in the sql query string), and it's doing the initial fill now. :)

Next step is to write up a quick search function for the eggdrop.

Thanks again!
by DJCharlie
Thu Jul 22, 2010 9:11 am
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Got the server, and an ( unfortunately, empty ) database set up. Trouble is initially populating it. I've tossed together a bash script to do that, but some artists INSIST on spelling their names with an apostrophe ( I'm looking at you, Anita O'Day ), which is causing errors. Once we get that done, ...
by DJCharlie
Thu Jul 22, 2010 2:16 am
Forum: Script Requests
Topic: Recursive File search (possibly via database?) [solved!]
Replies: 28
Views: 14270

Recursive File search (possibly via database?) [solved!]

Ok folks, first a bit of background. I work for a net radio station, and I'm trying to set up a !search and !fetch command so our DJs can download songs from our central archive from the DJ chat room on our IRC server. The problem is, we have over 471,000 files in the main section (not counting the ...
by DJCharlie
Wed Jul 21, 2010 8:59 pm
Forum: Scripting Help
Topic: invalid command name? [solved]
Replies: 22
Views: 17385

Yeah. Considering we get new music (legally, from the labels!) weekly, keeping a db in sync would be a pain.

I'll try out globbing though. Anything to shave off a few seconds. :) Thanks again!
by DJCharlie
Tue Jul 20, 2010 8:46 pm
Forum: Scripting Help
Topic: invalid command name? [solved]
Replies: 22
Views: 17385

I don't know why, but it's working now.

Next question... How can I optimize the search function? It was mentioned up-thread to use glob, but I have no clue how to do that, and my DJs are searching through 471,000+ files.