JDownloader Community - Appwork GmbH
 

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 18.08.2018, 19:35
Iskelderon's Avatar
Iskelderon Iskelderon is offline
Bandwidth Beast
 
Join Date: Aug 2018
Location: Europe
Posts: 131
Default Tutorials for writing new plugins

Hi

I wanted to try my hand at contributing plugins, but since I'm just getting started and any recommendations for tutorials on how to write would be priceless. My first attempt failed rather miserably, as I couldn't even ensure that my class was used, much less dumping debug information, configuring the Eclipse project (not just the JAR file) for debugging/inspection at breakpoints or even the location of where a Eclipse-compiled instances log data shows up.

Current skeleton for reference:
Code:
package jd.plugins.decrypter;

import java.util.ArrayList;

import org.appwork.utils.logging2.LogSource;
import org.jdownloader.logging.LogController;

import jd.PluginWrapper;
import jd.controlling.ProgressController;
import jd.plugins.CryptedLink;
import jd.plugins.DecrypterPlugin;
import jd.plugins.DownloadLink;
import jd.plugins.PluginForDecrypt;

@DecrypterPlugin(revision = "$Revision: 35010 $", interfaceVersion = 3, names = { "domain.here" }, urls = { "**External links are only visible to Support Staff** })

public class classNameHere extends PluginForDecrypt {
    
    protected final LogSource logger = LogController.CL();

    public classNameHere(PluginWrapper wrapper) {
        super(wrapper);
    }

    @Override
    public ArrayList<DownloadLink> decryptIt(CryptedLink param, ProgressController progress) throws Exception {
        ArrayList<DownloadLink> decryptedLinks = new ArrayList<DownloadLink>();
        final String parameter = param.toString().replace("http:", "https:");
        final String page = br.getPage(parameter);

        logger.info("--------------------------------------------------------------");
        logger.info("parameter --------------------------------------------------------------");
        logger.info(parameter);
        logger.info("--------------------------------------------------------------");
        logger.info("page --------------------------------------------------------------");
        logger.info(page);
        logger.info("--------------------------------------------------------------");
        logger.info("--------------------------------------------------------------");

        return decryptedLinks;
    }

}
Thanks in advance for any help so I can get started contributing plugins for various streaming sites!

Last edited by raztoki; 19.08.2018 at 02:10.
Reply With Quote
 

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:55.
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 - 2024, Jelsoft Enterprises Ltd.