JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 13.02.2012, 18:08
DJAlexxstyle
Guest
 
Posts: n/a
Default [Plugin] Automatic Accounts Delete/Notify etc

Hi all, I own a service in which users can share premium accounts, so that they all can download as premium users on different sites.

Now that my service has become more known, it usually happens that users have to do with 100/200 accounts in their jDownloader.

Given that accounts (of course) expire (or even get banned), it could happen that people could have more than 50/60 accounts to delete every day...

It's a big problem.

So, I was thinking about some little stuff that could be implemented in jDownloader.

What about some plugin which can be configurated to notify you when an account is on the point of expiring (or when the left traffic is low etc)?

It may be useful if expired accounts could be automatically deleted etc.

So, now I want to be precise: I'm a C# and Java developer, so I do not have problems like "I don't know how to setup jDownloader environment" etc, and I do not want answers like "You need to know programming!".

But even if I have to do with programming almost everyday, I was not able to figure out how (and WHERE) to start to write my own plugin.

I'm capable of doing this (so, even if official developers would reject my proposal for questions of time etc I could write it myself), but I would like to get informed about how to get started...

I read there are not docs about writing plugins (I'm not talking about "host" ones), so, I really have no idea about where going to ask informations, if not here.

I'll wait for an answer.

In the meanwhile, thanks for reading!

- Alex

Last edited by Jiaz; 13.02.2012 at 18:31.
Reply With Quote
  #2  
Old 13.02.2012, 18:28
coalado's Avatar
coalado coalado is offline
JD Manager
 
Join Date: Feb 2009
Posts: 1,983
Default

Please ask me in our irc chat - I will guide you through the process.
__________________

Last edited by coalado; 13.02.2012 at 18:31.
Reply With Quote
  #3  
Old 13.02.2012, 18:39
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,540
Default

If the information is provided by the hoster we generally include it within our plugin dev. If its not we go on error clauses which only usually get listened for as a POST event. We rather not delete or remove any accounts from jdownloader via any automated process, as could remove accounts by error
eg. plugin errors or hoster issues. Just like now many hosters are suffering under heavy loads due to filehoster closure/restructures, accounts can and are been disabled frequently. Which means your idea wouldn't work well in those situations.

Notify maybe useful to the user so they are aware that the account is disabled for xyz reason. What your wanting to do is more GUI and listening to events.

You've most likely already done this ...
setup guide: http://jdownloader.org/knowledge/wik...nt/get-started
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #4  
Old 13.02.2012, 18:46
DJAlexxstyle
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
If the information is provided by the hoster we generally include it within our plugin dev. If its not we go on error clauses which only usually get listened for as a POST event. We rather not delete or remove any accounts from jdownloader via any automated process, as could remove accounts by error
eg. plugin errors or hoster issues. Just like now many hosters are suffering under heavy loads due to filehoster closure/restructures, accounts can and are been disabled frequently. Which means your idea wouldn't work well in those situations.

Notify maybe useful to the user so they are aware that the account is disabled for xyz reason. What your wanting to do is more GUI and listening to events.

You've most likely already done this ...
setup guide: http://jdownloader.org/knowledge/wik...nt/get-started
I have already done all this...

I just would like to write my own extension for the users who use my service...

It's not a problem if sometimes accounts could be deleted due to strange errors, because all the working ones are stored in a database to which users can access everytime they want, so that they can search for other accounts etc..

Of course, my intention was to write an extension, and not a modified jDownloader version, cause I think it would not be correct...

Just an addon, so that whoever wants, could install it and use it
Reply With Quote
  #5  
Old 16.03.2012, 14:19
DJAlexxstyle
Guest
 
Posts: n/a
Default

Sorry for this late post, but my pc actually broke, and I needed to buy another one :(

Anyway I'm still here, searching for a way to write my own plugin...

I'm trying to give a look to the official sources, but there are too many references to "plugin", and I still have no clear ideas about where to start...
Reply With Quote
  #6  
Old 16.03.2012, 15:20
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,540
Default

first of all what type of plugin are you wanting to make? If you want to download files from a provider which isn't supported currently you can make either a decrypter plugin or hoster plugin. Decrypter plugins genrally are used for finding links and passing them into a hoster plugin. You pass them into a dedicated hoster or directhttp plugin. The latter will work if there are no additional steps, like standard http GET. If more steps like recaptcha or additional GETS or POSTS required to get the download started we do this within a hoster plugin.

these are located within eclispe from the explorer
jd.plugins.hoster ( or if you look at it folder view /JDownloader/src/jd/plugins/hoster)
jd.plugins.decrypter ( or if you look at it folder view /JDownloader/src/jd/plugins/decrypter)
from within jdownloader.src

have a look at the other plugins within for examples. Any more questions you can ask via irc.freenode.net #jdteam , grab yourself a standalone irc client or use http://jdownloader.org/knowledge/chat (freenodes webclient, it joins our default channel)
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #7  
Old 16.03.2012, 19:24
DJAlexxstyle
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
first of all what type of plugin are you wanting to make? If you want to download files from a provider which isn't supported currently you can make either a decrypter plugin or hoster plugin. Decrypter plugins genrally are used for finding links and passing them into a hoster plugin. You pass them into a dedicated hoster or directhttp plugin. The latter will work if there are no additional steps, like standard http GET. If more steps like recaptcha or additional GETS or POSTS required to get the download started we do this within a hoster plugin.

these are located within eclispe from the explorer
jd.plugins.hoster ( or if you look at it folder view /JDownloader/src/jd/plugins/hoster)
jd.plugins.decrypter ( or if you look at it folder view /JDownloader/src/jd/plugins/decrypter)
from within jdownloader.src

have a look at the other plugins within for examples. Any more questions you can ask via irc.freenode.net #jdteam , grab yourself a standalone irc client or use http://jdownloader.org/knowledge/chat (freenodes webclient, it joins our default channel)
I already wrote it: I'd like to write a plugin which automatically notifies you when accounts are going to expire, and delete expired one automatically...

I've found something interesting for my purposes in thew source code (package "org.jdownloader.extensions"), but despite I wrote my own classes (which extend for example the AbstractExtension interface etc), I still can't see it in the settings manager of the app...

It's driving me crazy...
Reply With Quote
  #8  
Old 16.03.2012, 20:52
drbits's Avatar
drbits drbits is offline
JD English Support (inactive)
 
Join Date: Sep 2009
Location: Physically in Los Angeles, CA, USA
Posts: 4,437
Default Technical Discussion

Try the Refresh Accounts button in the Hosts -> Accounts page. It shows remaining traffic on accounts and greys out the accounts with no remaining traffic.

Because most hosts ban accounts with multiple IP addresses, it is better to allocate accounts through a proxy or internet site. The proxy could be called from your add-on code to determine the unused account with the most remaining traffic. If this is only for JD, an account becomes unused when there is no traffic for 2 minutes.

You can use an internet site instead (because proxies always slow transfers), but the add-on has to notify the internet site periodically that the transfer is continuing (called a heartbeat and the server would have a watchdog) and when the transfer completes (otherwise crashes will cause the account to remain allocated).

The next version of JD will have an option to automatically use the account with the most remaining traffic for a host. If the transfer is rejected (because some other IP is using the account), then the next account will be tried. However, this will result in banned or locked accounts.

For example, rapidshare only allows 5 IP address changes per account, per day. Thus, without a proxy, each account can only be used 5 times a day. This restriction is intended to ban shared accounts.

The proxy should send the HTTP header that identifies the originating IP address, but fake this address so that each account always uses the same IP address, but the address is different for different accounts. This will also provide a minimal level of user anonymity. It would be interesting to know whether IP addresses like 10.XXX.YYY.ZZZ could be sent to the hosts.

Your add-on could call the function behind Refresh Accounts in JD and send the resulting information for the host to the proxy when requesting an account (h ttp://www.proxy.org/?host=rapidshare.com&account1752=700&account 29564=567). The proxy would respond with the account to use (with an HTTP 200 response) or an HTTP wait response if all accounts are in use.
Reply With Quote
  #9  
Old 16.03.2012, 21:31
DJAlexxstyle
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by drbits View Post
Try the Refresh Accounts button in the Hosts -> Accounts page. It shows remaining traffic on accounts and greys out the accounts with no remaining traffic.

Because most hosts ban accounts with multiple IP addresses, it is better to allocate accounts through a proxy or internet site. The proxy could be called from your add-on code to determine the unused account with the most remaining traffic. If this is only for JD, an account becomes unused when there is no traffic for 2 minutes.

You can use an internet site instead (because proxies always slow transfers), but the add-on has to notify the internet site periodically that the transfer is continuing (called a heartbeat and the server would have a watchdog) and when the transfer completes (otherwise crashes will cause the account to remain allocated).

The next version of JD will have an option to automatically use the account with the most remaining traffic for a host. If the transfer is rejected (because some other IP is using the account), then the next account will be tried. However, this will result in banned or locked accounts.

For example, rapidshare only allows 5 IP address changes per account, per day. Thus, without a proxy, each account can only be used 5 times a day. This restriction is intended to ban shared accounts.

The proxy should send the HTTP header that identifies the originating IP address, but fake this address so that each account always uses the same IP address, but the address is different for different accounts. This will also provide a minimal level of user anonymity. It would be interesting to know whether IP addresses like 10.XXX.YYY.ZZZ could be sent to the hosts.

Your add-on could call the function behind Refresh Accounts in JD and send the resulting information for the host to the proxy when requesting an account (h ttp://www.proxy.org/?host=rapidshare.com&account1752=700&account 29564=567). The proxy would respond with the account to use (with an HTTP 200 response) or an HTTP wait response if all accounts are in use.
The problem was not actually related to how should the plugin work (I've not decided yet), but instead to the jDownloader source code: I was not able to understand how to start writing the extension.

Anyway I came to an head of the problem, and in fact here is the result:

Reply With Quote
  #10  
Old 17.03.2012, 05:51
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,540
Default

sorry I didn't read the entire thread again just your new post and didn't get your previous context into hand, my bad. But when you use references like plugins I think of those two types of plugins we have. Your project wont have anything todo with the individual 'plugins' on the 'plugin level'. You will want some type of extension/addon which you've progressed on by the looks of the image above. Keep track of your accounts, vs users ones, and keep track of the updates to said accounts. Someone has already done similar project to this though based off a really old jdownloader (maybe your the same person/owner/admin).

Personally I do not like these type of projects within JD. As drbits has indicated you will lead to peoples accounts been banned. Also you are using jdownloader to provide a service which could lead to JD been banned as a client by hosters as its been used for abusive/against terms of service of said providers. And what accountability do you have when people submit stolen/hacked accounts to your network?
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]
Reply With Quote
  #11  
Old 17.03.2012, 08:39
DJAlexxstyle
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
sorry I didn't read the entire thread again just your new post and didn't get your previous context into hand, my bad. But when you use references like plugins I think of those two types of plugins we have. Your project wont have anything todo with the individual 'plugins' on the 'plugin level'. You will want some type of extension/addon which you've progressed on by the looks of the image above. Keep track of your accounts, vs users ones, and keep track of the updates to said accounts. Someone has already done similar project to this though based off a really old jdownloader (maybe your the same person/owner/admin).

Personally I do not like these type of projects within JD. As drbits has indicated you will lead to peoples accounts been banned. Also you are using jdownloader to provide a service which could lead to JD been banned as a client by hosters as its been used for abusive/against terms of service of said providers. And what accountability do you have when people submit stolen/hacked accounts to your network?
The extension will only notify the user when an account is going to expire. And if this option is selected, it can also automatically delete expired accounts.

It has nothing to do with my community at all

Anyway I still have a question: I can work on this when I'm debugging from sources, but how does the jDownloader's addon protocol work when it has to do wit jars, instead of java files?
Reply With Quote
  #12  
Old 17.03.2012, 11:25
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 16,540
Default

I was inferring within your community / 'account sharing project' was the problem or it could be harmful to jdownloader more so than say a traditional multihoster as IP based detection on the hoster side will lead to accounts been suspended. And not your new addon, like you've stated its more a feature than mutually exclusive to your project. JD will disable the accounts anyway when they do expire or disabled for some other reason. Typically disabled accounts cause no harm to the normal user.
__________________
raztoki @ jDownloader reporter/developer
http://svn.jdownloader.org/users/170

Don't fight the system, use it to your advantage. :]

Last edited by raztoki; 17.03.2012 at 11:34.
Reply With Quote
  #13  
Old 17.03.2012, 13:10
DJAlexxstyle
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
I was inferring within your community / 'account sharing project' was the problem or it could be harmful to jdownloader more so than say a traditional multihoster as IP based detection on the hoster side will lead to accounts been suspended. And not your new addon, like you've stated its more a feature than mutually exclusive to your project. JD will disable the accounts anyway when they do expire or disabled for some other reason. Typically disabled accounts cause no harm to the normal user.
Jes, but me, for example, I have more than 4k accounts in my jDownloader...

It's a bit tiring delete them manually when expire...

If you consider this addon not necessary, I won't release it, but I actually think I need it XD
Reply With Quote
  #14  
Old 17.03.2012, 14:33
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 49,953
Default

If you want you can implement it and then send the code to us

GreeZ pspzockerscene
__________________

Ad-free installers || Werbefreie Installer
Windows Setup<--JD2 BETA-->Linux Setup x86 || Linux Setup x64 || Mac Setup
-----=>Support Chat<=-----
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 10:35.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.