Search in sources :

Example 1 with PluginState

use of com.biglybt.pif.PluginState in project BiglyBT by BiglySoftware.

the class SFPluginDetailsLoaderImpl method addEPIDS.

private String addEPIDS(String str) {
    try {
        String pids = "";
        PluginInterface[] pis = PluginInitializer.getDefaultInterface().getPluginManager().getPluginInterfaces();
        for (PluginInterface pi : pis) {
            PluginState ps = pi.getPluginState();
            if (!(ps.isBuiltIn() || ps.isDisabled())) {
                String version = pi.getPluginVersion();
                if (version != null && Constants.compareVersions(version, "0") > 0) {
                    String pid = pi.getPluginID();
                    if (pid != null && pid.length() > 0) {
                        pids += pid + ":";
                    }
                }
            }
        }
        str += "&epids=" + UrlUtils.encode(pids);
    } catch (Throwable e) {
        Debug.out(e);
    }
    return (str);
}
Also used : PluginState(com.biglybt.pif.PluginState) PluginInterface(com.biglybt.pif.PluginInterface)

Aggregations

PluginInterface (com.biglybt.pif.PluginInterface)1 PluginState (com.biglybt.pif.PluginState)1