rejetto forum

to limit the speed

AYEHAN · 23 · 9257

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
ohoh, very nice suggestion mars.
i will use your hint in the default template. :)


Offline AYEHAN

  • Occasional poster
  • *
    • Posts: 92
    • View Profile
1 more thing  ... we have set speed 1030KB/s for some drives and MovieZ is in the same partions .. will they clash again?

no.
anyway, the script is made so that "switch" is done only if not "movieZ".

not working for me :( i did as what u told me now the status bar error gone but its not working :/

Code: [Select]
[download]
{.if|{.is substring|%folder%|MovieZ.} {.is substring|%item-name%|Xvid.}
| {:{.set speed limit for connection|100.}:}
|
{.switch| {.cut||2|%item-resource%.} |,|
D:,E:,F:| {:{.set speed limit for connection|500.}:}
|
G:,H:,I:,P:,L:| {:{.set speed limit for connection|1030.}:}
/switch.}

 /if.}

[download name]
SmS_Share_Server.%item-name%


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
try this only, and see if it works

Code: [Select]
[download]
{.switch| {.cut||2|%item-resource%.} |,|
D:,E:,F:| {:{.set speed limit for connection|500.}:}
|
G:,H:,I:,P:,L:| {:{.set speed limit for connection|1030.}:}
/switch.}


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
good news

Quote
Quote
[file=folder=link]
<a href=%item-url>%item-name%

[+file]
<td align='right'>%item-size%<td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+folder]
<td align='center'><i>folder</i><td align='right'>%item-modified%<td align='right'>%item-dl-count%

[+link]
<td colspan='3' align='center'><i>link</i>

[+file=+folder|nolog]
I am a file or a folder, be happy

[+link|nolog]
I am only a link SNIF!

If you are right, this template shall have to work correctly with some small modifications in delphi.

all is working in the build 229  (nolog not tested but sections with + work fully)

notice a light twice usage in sources:
Quote
else
    begin
                      s:=diffTpl.getTxtByExt(ExtractFileExt(f.name));
    if s = '' then s:=diffTpl.getTxtByExt(ExtractFileExt(f.name));
    if s = '' then s:=fileTpl;
    inc(numberFiles);
    end;

  s:=xtpl(s, nonPerc);
  md.f:=f;
  tryApplyMacrosAndSymbols(s, md, table, FALSE);
  fast.append(s);
  end; // handleItem


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
Is it possible to extend the possibility of Ttpl.getTxtByExt to work with [file.*] ?
  * is replaced by the correct ext every time it is necessary.

Quote
[folder=file=link=file.*]
I am a

[+folder]
folder

[+file]
file

[+link]
lnk

[file.*]
file with ext :

[+file.zip]
zip

[+file.mp3]

mp3

[+file.jpg]
jpg

[+file.*=+folder=+file=+link]
!!!
« Last Edit: March 14, 2009, 12:18:00 AM by mars »


Offline AYEHAN

  • Occasional poster
  • *
    • Posts: 92
    • View Profile
just added the new code
will let you know about the results


Offline AYEHAN

  • Occasional poster
  • *
    • Posts: 92
    • View Profile
try this only, and see if it works

Code: [Select]
[download]
{.switch| {.cut||2|%item-resource%.} |,|
D:,E:,F:| {:{.set speed limit for connection|500.}:}
|
G:,H:,I:,P:,L:| {:{.set speed limit for connection|1030.}:}
/switch.}

this one is not working too


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
ok, this should work, but the "moviez" will only work with next build, because %folder% has a bug in this version.

Code: [Select]
[download]
{.set speed limit for connection|
{.if| {.pos|MovieZ|%folder%.}{.pos|Xvid|%item-name%.} | 100
|
{.switch| {.cut||2|%item-resource%.} |,|
D:,E:,F:| 500
|G:,H:,I:,P:,L:| 1030
/switch.}
/if.}
.}