fixes #53654, H264 Streaming-mod is the cause

already fixed/added support for in new downloadsystem


git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@27277 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: ddc2c0a3a1c9167743bf28fa7d910403246cf3b4
This commit is contained in:
jiaz 2014-10-06 10:02:11 +00:00
parent 610081af8e
commit c5cf723cdd

View File

@ -19,6 +19,8 @@ package jd.plugins.hoster;
import java.io.IOException;
import jd.PluginWrapper;
import jd.http.Browser;
import jd.http.URLConnectionAdapter;
import jd.nutils.encoding.Encoding;
import jd.plugins.DownloadLink;
import jd.plugins.DownloadLink.AvailableStatus;
@ -63,7 +65,13 @@ public class TnaFlixCom extends PluginForHost {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
dllink = Encoding.htmlDecode(dllink);
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, true, 0);
Browser brc = br.cloneBrowser();
brc.setHeader("Range", "bytes=0-");
final URLConnectionAdapter con = brc.openHeadConnection(dllink);
final long fileSize = con.getCompleteContentLength();
con.disconnect();
downloadLink.setVerifiedFileSize(fileSize);
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, false, 1);
if (dl.getConnection().getResponseCode() == 416) {
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Server error 416", 30 * 60 * 1000l);
}