#1
|
|||
|
|||
All I want to do is make a hoster plugin
I am trying to shortcut the development method by developing against my installed instance. I tried decompiling (DJ) the sharingmatix one then recompiled it with it with a new name (MyHosterCom.java). Next, I set the right claspath (JDownloader.jar), and placed the .class file in the hoster directory. It is not showing up in my hoster list.
I am guessing that there is some sort of check going on. I was just presuming that addon meant just that, but apparently I am mistaken. I develop java typically using ultraedit and making bat files with setting my classpath with -classpth arg (I don't even use ant for that matter). I checked out the whole svn trunk from the 'first steps' guide using tortoise. Can I build this without eclipse? If not, then which eclipse should I get. Their download site has Eclipse IDE for java developers (99MB), Eclipse Classic (170MB), and since the guide says 3.4 based, I also found one called eclipse-java-ganymede-SR2-win32.zip. These are big downloads. For the least amount of hassle, which should I go with? Since new hosters seem to spring up like weeds, I wanted to learn how to build hoster addons myself. Please advise on the quickest means to an end. |
#2
|
|||
|
|||
OK, I went ahead with the eclipse way.
After following the whole 'first steps': http://jdownloader.org/knowledge/wik...nt/first-steps I was left with an eclipse error for AppWorksUtils missing project. I tried adding the jar, but that didn't fix it (The step 'Including Libraries' references a bunch of jars that should be here, this was the only one here appworksutils.jar, so I assumed the 'first steps' wasn't up to date on this step). So I googled 'AppWorksUtils' and found a google cached version of 'first steps' that said to add this as another project from SVN (svn://svn.appwork.org/utils): **External links are only visible to Support Staff****External links are only visible to Support Staff** So I did so and that made the AppWrkUtils error go away, but now 5 others show up: Code:
AsynchronousFileChannel cannot be resolved to a type JDFile.java JDownloader/src/jd/plugins/optional/neembuu line 30 Java Problem SimpleUserAgentContext cannot be resolved to a type JavaScript.java JDownloader/src/jd/parser line 207 Java Problem SimpleUserAgentContext cannot be resolved to a type JavaScript.java JDownloader/src/jd/parser line 207 Java Problem The import java.nio.channels.AsynchronousFileChannel cannot be resolved JDFile.java JDownloader/src/jd/plugins/optional/neembuu line 4 Java Problem The import org.lobobrowser.html.test cannot be resolved JavaScript.java JDownloader/src/jd/parser line 39 Java Problem |
#3
|
|||
|
|||
This are errors from an plugin which is under development and requires Java 7. But you can ignore these errors.
|
#4
|
|||
|
|||
Thanks, that did it!
Now I am at the point where I put in my plugin (I just duped sharingmatrixcom.java as a template and replaced the namings). Probably a bad choice. I am actually attempting keepfile.com at present. Does anyone have any advice as to what a better one would be to start with (as a template). What I mean is, does anyone have any experience with keepfile.com and maybe know which other hoster has the most similarity with internal functionality? |
#5
|
||||
|
||||
@hoofhearted
We have a template-plugin for hosters like keepfile.com. The name of it is "XFileSharingProBasic". Just create a new class, copy the code from XFileSharingProBasic in it and change some strings, then kepfile.com should work. I'll actually do this later this day(night^^). GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#6
|
|||
|
|||
cool, thanks for that. learning is always good. hopefully I'll get good enough to contribute. I am actually hoping to do a plugin that pops up catchas remotely (unless it has already been done)
|
#7
|
||||
|
||||
@hoofhearted
Maybe you can make an addon for this but doing this in a hosterplugin is no good idea. GreeZ pspzockerscene
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#8
|
|||
|
|||
understand. more meant as a plugin todo after I get my fet wet with hoster plugins.
so far on the keepfile.com, need to replace: Form DLForm = br.getFormbyProperty("name", "F1"); with Form DLForm = br.getFormBySubmitvalue("REGULAR+DOWNLOAD"); ... |
#9
|
||||
|
||||
No.
Using the template s described above it should work correctly. I didn't test it as i am currently working on another project but later i'll make the keepfile plugin so youcan then see what i did GreeZ pspzockerscene EDIT Keepfile is no good way to start. A good way to start is using a hoster that has no limits/waittimes/forms and directly shows the link to download on the first page.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download |
#10
|
|||
|
|||
I was comparing it against filebling which seems to be similar and I have working samples.
With keepfile I was getting: Code:
<Form method="POST" action=''> ... <input type="submit" class="button-ch1" name="method_free" value="REGULAR DOWNLOAD"> </Form> Code:
<Form name="F1" method="POST" action="" ... </Form> |
#11
|
|||
|
|||
The reason I chose to do this was because I was getting a null expcetion leaving the code as is (DLForm was null)
Code:
Form DLForm = br.getFormbyProperty("name", "F1"); if (DLForm == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT); |
#12
|
||||
|
||||
@hoofhearted
So the previous form wasn't found. The template doesn't always work 100% with no changes. As i said i'll do it later then you'll see how it works in this case. GreeZ pspzockerscene EDIT Please stop making double posts! EDIT Plugin committed, now you can take a look at the code.
__________________
JD Supporter, Plugin Dev. & Community Manager
Erste Schritte & Tutorials || JDownloader 2 Setup Download Last edited by pspzockerscene; 01.08.2010 at 03:18. |
Thread Tools | |
Display Modes | |
|
|