Author Topic: speed limit for file format  (Read 7548 times)

0 Members and 1 Guest are viewing this topic.

Offline eddy

  • Regular poster
  • **
  • Posts: 19
    • View Profile
speed limit for file format
« on: November 22, 2013, 11:48:14 PM »
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
  • Insane programmer
  • *
  • Posts: 12844
    • View Profile
Re: speed limit for file format
« Reply #1 on: November 24, 2013, 09:45:38 AM »
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

  • Regular poster
  • **
  • Posts: 19
    • View Profile
thanks
« Reply #2 on: November 24, 2013, 10:19:54 AM »
what else can i script and how?
will HFS 3 relised?(which should have upnp support as you said)
« Last Edit: November 24, 2013, 10:22:36 AM by eddy »

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12844
    • View Profile
Re: speed limit for file format
« Reply #3 on: November 24, 2013, 06:26:37 PM »
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 Tranzit

  • Occasional poster
  • *
  • Posts: 6
    • View Profile
Re: speed limit for file format
« Reply #4 on: March 26, 2015, 09:34:03 AM »
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
  • Insane programmer
  • *
  • Posts: 12844
    • View Profile
Re: speed limit for file format
« Reply #5 on: March 29, 2015, 05:59:07 AM »
menu > limits > max simultaneous downloads from single address > 1

this option and the script you already have should be enough

Offline Tranzit

  • Occasional poster
  • *
  • Posts: 6
    • View Profile
Re: speed limit for file format
« Reply #6 on: March 30, 2015, 04:03:20 AM »
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
  • Insane programmer
  • *
  • Posts: 12844
    • View Profile
Re: speed limit for file format
« Reply #7 on: April 01, 2015, 01:35:04 PM »
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