JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 31.07.2010, 20:32
hoofhearted
Guest
 
Posts: n/a
Default 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.
Reply With Quote
  #2  
Old 31.07.2010, 22:30
hoofhearted
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #3  
Old 31.07.2010, 23:02
Botzi
Guest
 
Posts: n/a
Default

This are errors from an plugin which is under development and requires Java 7. But you can ignore these errors.
Reply With Quote
  #4  
Old 01.08.2010, 00:08
hoofhearted
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #5  
Old 01.08.2010, 00:10
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 57,523
Default

@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
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
  #6  
Old 01.08.2010, 00:25
hoofhearted
Guest
 
Posts: n/a
Default

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)
Reply With Quote
  #7  
Old 01.08.2010, 00:35
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 57,523
Default

@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
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
  #8  
Old 01.08.2010, 02:18
hoofhearted
Guest
 
Posts: n/a
Default

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");

...
Reply With Quote
  #9  
Old 01.08.2010, 02:24
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 57,523
Default

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
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
  #10  
Old 01.08.2010, 02:32
hoofhearted
Guest
 
Posts: n/a
Default

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>
and with filebling:
Code:
<Form name="F1" method="POST" action="" 
...
</Form>
Reply With Quote
  #11  
Old 01.08.2010, 02:38
hoofhearted
Guest
 
Posts: n/a
Default

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);
I was also dumping the source HTML with logger.info and the form tag had no name.
Reply With Quote
  #12  
Old 01.08.2010, 02:41
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 57,523
Default

@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
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

Last edited by pspzockerscene; 01.08.2010 at 03:18.
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 13:34.
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 - 2021, Jelsoft Enterprises Ltd.