| View previous topic :: View next topic |
| Author |
Message |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Oct 25, 2008 12:48 pm Post subject: |
|
|
| dalys wrote: | Haven't had any time to look over the script yet to make it work without needing the replacevar function (or why some doesn't have that function) but I'm gonna check out and fix that too somehow, not sure when I'll have time though.  |
Because replacevar isn't part of standard tcl. It's some kludge to replace things within the string with other things. It's kinda poorly written as well.
| Code: | regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output
regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output
regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output
regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output
regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output
regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output |
| Code: | set bluray_output [string map [list "%title" "$bluray_title" "%studio" "$bluray_info_studio" "%year" "$bluray_info_year" \
"%length" "$bluray_info_length" "%rating" "$bluray_info_rating" "%releasedate" "$bluray_info_releasedate"] $bluray_output] |
You can use regsub or a string map to do your replacements and it doesn't require an extrernal script loaded supporting the replacevar procedure. _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
Joori Voice
Joined: 24 Mar 2006 Posts: 34 Location: Sydney
|
Posted: Sun Oct 26, 2008 7:35 am Post subject: |
|
|
Cheers bud, that worked a treat, all works fine now  _________________ No Haters, No Spies, Just the love 'tween my thighs! |
|
| Back to top |
|
 |
dalys Voice
Joined: 05 Oct 2008 Posts: 9 Location: Gothenburg, Sweden / QuakeNet
|
Posted: Sun Oct 26, 2008 7:37 am Post subject: |
|
|
| speechles wrote: | | dalys wrote: | Haven't had any time to look over the script yet to make it work without needing the replacevar function (or why some doesn't have that function) but I'm gonna check out and fix that too somehow, not sure when I'll have time though.  |
Because replacevar isn't part of standard tcl. It's some kludge to replace things within the string with other things. It's kinda poorly written as well.
| Code: | regsub -all -nocase "%title" $bluray_output $bluray_title bluray_output
regsub -all -nocase "%studio" $bluray_output $bluray_info_studio bluray_output
regsub -all -nocase "%year" $bluray_output $bluray_info_year bluray_output
regsub -all -nocase "%length" $bluray_output $bluray_info_length bluray_output
regsub -all -nocase "%rating" $bluray_output $bluray_info_rating bluray_output
regsub -all -nocase "%releasedate" $bluray_output $bluray_info_releasedate bluray_output |
| Code: | set bluray_output [string map [list "%title" "$bluray_title" "%studio" "$bluray_info_studio" "%year" "$bluray_info_year" \
"%length" "$bluray_info_length" "%rating" "$bluray_info_rating" "%releasedate" "$bluray_info_releasedate"] $bluray_output] |
You can use regsub or a string map to do your replacements and it doesn't require an extrernal script loaded supporting the replacevar procedure. |
Very nice! The funny thing I'm using string maps in the script but didn't thought of that. Thanks for clearing up about the replacevar function and helping out. I've put together a new version of the script and will upload it later today. |
|
| Back to top |
|
 |
dalys Voice
Joined: 05 Oct 2008 Posts: 9 Location: Gothenburg, Sweden / QuakeNet
|
Posted: Sun Oct 26, 2008 9:34 am Post subject: |
|
|
Uploaded the new version now (see first post). I've also chatted a bit with hyuma about fetching multiple search results and it's something I will put in the next version of the script. |
|
| Back to top |
|
 |
hyuma Voice
Joined: 23 Feb 2008 Posts: 4
|
Posted: Mon Oct 27, 2008 12:19 pm Post subject: |
|
|
thank you for your job dude!  |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Tue Oct 28, 2008 7:27 am Post subject: |
|
|
Great Script My Users love to use it, but
i think a line seperator would be useful
And one question:
Is it difficult to "change" the search, that if u use for eg
!bluray The.Dark.Knight also results are coming ?
greets |
|
| Back to top |
|
 |
dalys Voice
Joined: 05 Oct 2008 Posts: 9 Location: Gothenburg, Sweden / QuakeNet
|
Posted: Tue Oct 28, 2008 10:19 am Post subject: |
|
|
| Elfriede wrote: | Great Script My Users love to use it, but
i think a line seperator would be useful
And one question:
Is it difficult to "change" the search, that if u use for eg
!bluray The.Dark.Knight also results are coming ?
greets |
Hello! Glad to hear users like it.
What do you mean with line separator? Like a %breakline variable to use in the output style that will split the output in two messages? That should be doable I think! Will have to look in to it for the next version.
About making a search with dots as separators, like "The.Dark.Knight", work you can fix it easily!
On line 103 in v1.1 of the script you find this line:
| Code: | | set bluray_keywords [string map { " " "+" "%" "+" "&" "+" "*" "+"} $bluray_keywords] |
And all you have to do is add "." "+" in the end of the inside of the braces, so the line will look like this instead:
| Code: | | set bluray_keywords [string map { " " "+" "%" "+" "&" "+" "*" "+" "." "+"} $bluray_keywords] |
(This will transform the search "The.Dark.Knight" into "The+Dark+Knight", and the blu-ray.com search function interprets plus signs, +, as spaces.)
Good luck.  |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Tue Oct 28, 2008 11:22 am Post subject: |
|
|
Thank you ! I'll try this ASAP
With line seperator i mean to split the output-lines
Details for The Dark Knight (+ Digital Copy and BD Live) (Blu-ray)
Video: Video codec: VC-1/Video resolution: 1080p/Aspect ratio: 2.40:1
Audio: English: Dolby TrueHD 5.1/English: Dolby Digital 5.1/English: Dolby Digital 2.0/French: Dolby Digital 5.1 Subs: English SDH, English, French,
Spanish Disc: 50GB Blu-ray Disc/Three-disc set/Digital copy |
|
| Back to top |
|
 |
MiNdErAsR Voice
Joined: 27 Nov 2004 Posts: 17
|
Posted: Sun Nov 02, 2008 9:24 am Post subject: |
|
|
Working like a charm. Thanks!
 |
|
| Back to top |
|
 |
jjnerd Voice
Joined: 24 Feb 2007 Posts: 3
|
Posted: Sat Jan 23, 2010 9:47 am Post subject: |
|
|
"Could not fetch any search result or error message. The script is probably outdated."
Looks like smth has changed. Fix would be awesome, love the script. |
|
| Back to top |
|
 |
dalys Voice
Joined: 05 Oct 2008 Posts: 9 Location: Gothenburg, Sweden / QuakeNet
|
|
| Back to top |
|
 |
Ragman Voice
Joined: 06 Jun 2010 Posts: 5
|
Posted: Sun Jun 06, 2010 4:58 pm Post subject: |
|
|
I updated to version 1.2 of the script but I still get the error message "Could not fetch any search result or error message. The script is probably outdated.".
Have they updated their site again? |
|
| Back to top |
|
 |
cbsjanten1 Voice
Joined: 18 Jun 2010 Posts: 4
|
Posted: Fri Jun 18, 2010 11:05 am Post subject: |
|
|
hey im still running version 1.1
just replace ur url line with
| Code: | set bluray_url "http://www.blu-ray.com/search/?quicksearch=1§ion=movies&quicksearch_keyword=$bluray_keywords&searchbutton.x=0&searchbutton.y=0"
|
works really fine...great script |
|
| Back to top |
|
 |
Ragman Voice
Joined: 06 Jun 2010 Posts: 5
|
Posted: Fri Jun 18, 2010 1:44 pm Post subject: |
|
|
| cbsjanten1 wrote: | hey im still running version 1.1
just replace ur url line with
| Code: | set bluray_url "http://www.blu-ray.com/search/?quicksearch=1§ion=movies&quicksearch_keyword=$bluray_keywords&searchbutton.x=0&searchbutton.y=0"
|
works really fine...great script |
I updated v1.2 with the above line and now it works like a charm.
THANKS A LOT!  |
|
| Back to top |
|
 |
cbsjanten1 Voice
Joined: 18 Jun 2010 Posts: 4
|
Posted: Sun Jul 04, 2010 7:43 am Post subject: |
|
|
seems the changed something on blu-ray.com again  |
|
| Back to top |
|
 |
|