JDownloader Community - Appwork GmbH
 

Closed Thread
 
Thread Tools Display Modes
  #21  
Old 19.08.2011, 20:19
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

Update: i got new api specs from fileserve, will add it as soon as possible
__________________
JD-Dev & Server-Admin
  #22  
Old 19.08.2011, 22:01
zixer92
Guest
 
Posts: n/a
Default

Great you are working on it. But i cant understand this, they say we can use fileserve manager but that keeps coming up with errors like jdownloader sometimes do also.

Very frustrating.
  #23  
Old 19.08.2011, 22:26
madascene
Guest
 
Posts: n/a
Default

Thanks Jiaz for the hard work.
  #24  
Old 20.08.2011, 09:37
remi
Guest
 
Posts: n/a
Cool

Quote:
Originally Posted by zixer92 View Post
they say we can use fileserve manager but that keeps coming up with errors...
That's their problem, not jD's.
  #25  
Old 20.08.2011, 12:40
mdih01
Guest
 
Posts: n/a
Default

Jiaz - any idea when the update will be posted


Thanks in advance

Mark
  #26  
Old 20.08.2011, 13:13
remi
Guest
 
Posts: n/a
Default

In http://board.jdownloader.org/showthr...t=30858&page=5 you'll find :-

Quote:
Originally Posted by grambax View Post
Any idea how long we are talking about until jdownloader is updated? Hours? Days?
Quote:
Originally Posted by Jiaz View Post
i will do it today
Jiaz is working during the WE for you!
  #27  
Old 20.08.2011, 13:43
PutterPlace
Guest
 
Posts: n/a
Default

I say to hell with their API. Who's to say they won't have similiar problems in the future? I got tired of waiting for FileServe to fix their issues, so I modified the current FileServe plugin to not use the API. I'm currently downloading without any problems.

Screenshot:

**External links are only visible to Support Staff**Full-Size Screenshow

;)

If I were a JD dev, I'd modify the plugin to work with the API first...then without it as a fail-safe. But I don't really have the time to commit.

Last edited by PutterPlace; 20.08.2011 at 13:46.
  #28  
Old 20.08.2011, 13:57
remi
Guest
 
Posts: n/a
Default

Thanks for your great commitment to jD, but I can also produce such a screen-shot.
  #29  
Old 20.08.2011, 14:29
PutterPlace
Guest
 
Posts: n/a
Default

Lol....for what it's worth, the screenshot isn't fake. I wouldn't waste my time with such a thing. As proof, my changes to the FileServe hoster plugin are below.....

Added string:
Code:
    private static final String COOKIE_HOST = "**External links are only visible to Support Staff**;

Custom login method...because I didn't want to change or remove the loginAPI method:
Code:
    private void login(final Browser useBr, final Account account) throws Exception {
        Browser br = useBr;
        if (br == null) br = new Browser();
        this.setBrowserExclusive();
        br.getPage(COOKIE_HOST + "/index.php");
        Form loginform = br.getForm(1);
        if (loginform == null) throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
        loginform.put("loginUserName", Encoding.urlEncode(account.getUser()));
        loginform.put("loginUserPassword", Encoding.urlEncode(account.getPass()));
        br.submitForm(loginform);
        br.getPage(COOKIE_HOST + "/dashboard.php");
        if (!br.containsHTML("Login Name")) throw new PluginException(LinkStatus.ERROR_PREMIUM, PluginException.VALUE_ID_PREMIUM_DISABLE);
        if (br.getCookie(COOKIE_HOST, "cookie") == null)
            throw new PluginException(LinkStatus.ERROR_PREMIUM, PluginException.VALUE_ID_PREMIUM_DISABLE);
        else
            return;
    }

Modified handlePremium method:
Code:
    public void handlePremium(final DownloadLink link, final Account account) throws Exception {
        this.requestFileInformation(link);
        this.login(br, account);
        br.setFollowRedirects(false);
        br.getPage(link.getDownloadURL());
        String dllink = br.getRedirectLocation();
        this.dl = jd.plugins.BrowserAdapter.openDownload(this.br, link, dllink, true, 0);
        if (this.dl.getConnection().getResponseCode() == 404) {
            this.br.followConnection();
            throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
        }
        if (this.dl.getConnection().getContentType().contains("html")) {
            this.br.followConnection();
            if (this.dl.getConnection().getLongContentLength() == 0) { throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND); }
            this.handleErrors(br);
            throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
        }
        if (link.getFinalFileName() == null) {
            /* workaround for buggy server response, see #3545 */
            String name = Plugin.getFileNameFromHeader(dl.getConnection());
            if (name != null) {
                name = name.replaceAll("\\%\\%", "%25%");
                name = Encoding.htmlDecode(name);
                link.setFinalFileName(name);
            }
        }
        this.dl.startDownload();
    }

Modified fetchAccountInfo method:
Code:
    @Override
    public AccountInfo fetchAccountInfo(final Account account) throws Exception {
        final AccountInfo ai = new AccountInfo();
        try {
            login(br, account);
        } catch (PluginException e) {
            account.setValid(false);
            return ai;
        }
        String expire = br.getRegex("Premium Until<\\/h4><\\/th>.*?<td><h5>(.*?)<\\/h5").getMatch(0);
        String type = br.getRegex("Account Type<\\/h4><\\/td> <td><h5 class\\=\\\"inline\\\">(.*?) <\\/h5").getMatch(0);
        account.setValid(true);
        if (type != null) ai.setStatus(type);
        if (!"Premium".equals(type)) {
            try {
                account.setMaxSimultanDownloads(1);
            } catch (final Throwable e) {
                /* not available in 0.9xxx */
            }
            account.setProperty("type", "free");
            account.setValid(false);
        } else {
            if (expire == null) {
                ai.setExpired(true);
                account.setValid(false);
                return ai;
            } else {
                ai.setValidUntil(TimeFormatter.getMilliSeconds(expire, "dd MMMM yyyy zzz", null));
                ai.setStatus("Premium User");
                return ai;
            }
        }
        return ai;
    }

As you can see, I did away with the API in my customization. Instead, I used the built-in browser. Also, as a plus, with these customizations, the loginAPI, getShorten, getDirectLink, parse, and decrypt methods could all be removed.

Last edited by PutterPlace; 20.08.2011 at 14:44.
  #30  
Old 20.08.2011, 14:52
editestowy's Avatar
editestowy editestowy is offline
Polish Supporter
 
Join Date: May 2009
Location: PL
Posts: 3,029
Default

But everytime they change anything in their page: i.e. "Login Name" -> "User Name" - the plugin requires rewriting.
This is why using API is independent from whatever they change in layout of the pages and should not care about what they are changing in their internal soft - 3rd party app calls specified API functions and expects specified response.
But the fileserve moroons instead of adding new API functions changed specification of the existing API - this is why 3rd party apps stopped to work. They made it (and probably started to test it) on living organism - even their own tool stopped to work with Premium accounts.
They do not care about customers because they exactly knew how many of them are using jD and didn't warn jD developers before applying the new API specification.
  #31  
Old 20.08.2011, 14:56
PutterPlace
Guest
 
Posts: n/a
Default

While that is understandable completely, I made those specific strings as a quick fix to work right now. More permanent strings could be used to check logins and expiration and such. Plus, that's also why I made the suggestion to modify the plugin to try the API first, and if that fails, then go ahead without it. That way, at least the plugin would work even if the FileServe API isn't.
  #32  
Old 20.08.2011, 15:09
MrT69
Guest
 
Posts: n/a
Default Newbee question

Can someone explain this how to solve this FileServe issue???
I have no clue about JAVA. Can someone explain this what changes needs to be done??

Thanks in advance...
  #33  
Old 20.08.2011, 15:15
editestowy's Avatar
editestowy editestowy is offline
Polish Supporter
 
Join Date: May 2009
Location: PL
Posts: 3,029
Default

@PutterPlace
I have nothing against your idea and I think it's good backup method for situation like this.

I simply made the statement that fileserve guys completely fu...ed up the rules of good programming.
Imagine that Microsoft changed completely their DirectX API, put the changes in their monthly updates and millions of games (and other apps) stopped to working? This will probably lead to mass riot.

I can understand the changes sometimes are needed but fileserve made them unprofessionally and completely ignoring many customers. At least for the period they were making the changes - the old specification should work to give the 3rd party developers required time for changing their apps without stopping them to work.
  #34  
Old 20.08.2011, 16:43
lionelboy
Guest
 
Posts: n/a
Default

When you change something so touchy, in a true profesional business I mean, you make lots of tests BEFORE applying your changes. Even their own download manager was affected !
  #35  
Old 20.08.2011, 17:51
PutterPlace
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by editestowy View Post
@PutterPlace
I have nothing against your idea and I think it's good backup method for situation like this.

I simply made the statement that fileserve guys completely fu...ed up the rules of good programming.
Imagine that Microsoft changed completely their DirectX API, put the changes in their monthly updates and millions of games (and other apps) stopped to working? This will probably lead to mass riot.

I can understand the changes sometimes are needed but fileserve made them unprofessionally and completely ignoring many customers. At least for the period they were making the changes - the old specification should work to give the 3rd party developers required time for changing their apps without stopping them to work.
I understand. I was just saying. In no way would my method be a good replacement simply because of the fact that the search strings are so precise, and could change at any given moment. But yea....they did mess up pretty royally by taking their API down like that. It's like live-testing a web site....bad for business to put it simply.

Quote:
Originally Posted by lionelboy View Post
When you change something so touchy, in a true profesional business I mean, you make lots of tests BEFORE applying your changes. Even their own download manager was affected !
I agree....there was no reason for them to make such drastic changes to live code, and have it down for so long to the point that even their own products wouldn't work properly.

Quote:
Originally Posted by MrT69 View Post
Can someone explain this how to solve this FileServe issue???
I have no clue about JAVA. Can someone explain this what changes needs to be done??

Thanks in advance...
Jiaz is on it....just wait for the update.
  #36  
Old 20.08.2011, 18:35
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 69,671
Default

@PutterPlace
We KNOW what we're doing and it is NOT up to us to FIX mistakes of hosters or to make workarounds for those.
If there is an API we trust it 100% and if it fails it's up to our users to contact the hosters support and ask why it doesn't work!

GreeZ pspzockerscene
EDIT

Closed till we have news!
__________________
JD Supporter, Plugin Dev. & Community Manager
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

  #37  
Old 21.08.2011, 10:15
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,084
Default

thanks to PutterPlace for his help. the official api i got from fileserve.....i dont find any words for it.....
wait for plugin update then it will work again
__________________
JD-Dev & Server-Admin
  #38  
Old 21.08.2011, 11:09
mdih01
Guest
 
Posts: n/a
Default

many thanks for sorting this much appreciated

mark
  #39  
Old 21.08.2011, 16:38
PutterPlace
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Jiaz View Post
thanks to PutterPlace for his help. the official api i got from fileserve.....i dont find any words for it.....
wait for plugin update then it will work again
Very welcome, I'll help out where I can.
  #40  
Old 21.08.2011, 20:05
esquin
Guest
 
Posts: n/a
Default fileserve problem

hi,
i cant use jdownloader for fileserve links for 2-3 days, my premium account did not expire yet.. in "status" part of my account in premium section it's written "ServerError, will try later", is there a general problem?
Closed Thread

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 20:18.
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 - 2023, Jelsoft Enterprises Ltd.