rejetto forum

speed limit for file format

eddy · 8 · 21485

0 Members and 1 Guest are viewing this topic.

Offline eddy

  • Occasional poster
  • *
    • Posts: 19
    • View Profile
hi, i don't want to let users download songs fast because they can listen mp3 on 320kbps (40KB/s)
could you add separate speed limits for formats or folders/files? sorry can't find futures topic.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
there's no such feature and will likely never be.
But it can be done by scripting

Add an event script (menu > other options)
like this
Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| mp3|40 | -1 .}
.}

if you want, you can complicate things, like adding OGG files to mp3, with same speed, and having other speed for AVI files. Here it is

Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| mp3 ogg|40 | avi|200 | -1 .}
.}


Offline eddy

  • Occasional poster
  • *
    • Posts: 19
    • View Profile
what else can i script and how?
will HFS 3 relised?(which should have upnp support as you said)
« Last Edit: November 24, 2013, 04:22:36 PM by eddy »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
scripting is so powerful that's hard to be told what you can do with it.
HFS 3 is under construction, but i don't really have the time to work on it since long.


Offline DAD1977

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hello , help write a scripting with 2 simultaneous constraints :

- maximum speed for downloads files AVI or TAR - 50 kB/s
and maximum 1 simultaneous downloads files these types (AVI or TAR) for single IP-adress.

I want, one IP could not simultaneously download 2 or more movies (avi) or archives (tar). Also could not download using "Download manager" with multiple streams . In this case, the download speed of these types of files should not exceed 50  kB/s.

I understand that it is necessary to add the above script
limit on the number of simultaneous downloads for single adress

Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| avi tar|50 | -1 .}
.}

I think, to use the command ".current downloads", but not know how.
Tell me, please .


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
menu > limits > max simultaneous downloads from single address > 1

this option and the script you already have should be enough


Offline DAD1977

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Thanks for the quick reply.
About this function I know. I'm more interested in how to make this function (max simultaneous downloads from single address) is applied for only to AVI files.

This is due to the fact that if this  function (max simultaneous downloads from single address) is enabled , the download pages with lots of pictures and icons errors occur . On the page a few photos from the first time are not loaded. I think that the requests for uploading photos to the pages partially blocks HFS. It is necessary to update the page again . Chat is similar to the first time will not boot.



Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
you have to do it in the opposite way, you should set the limit for the downloads, and then exclude the stuff that must not be limited.
To get this you should right click on the folder containing the stuff that you DON'T want to limit > properties > file masks > don't consider as download (mask)

there you can enter "*" to say that all the files in the folder should be excluded, or else you can decide to enter *.jpg;*.gif