Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

movie files being deleted after download completion #26

Open
fkick opened this issue Oct 28, 2016 · 1 comment
Open

movie files being deleted after download completion #26

fkick opened this issue Oct 28, 2016 · 1 comment

Comments

@fkick
Copy link

fkick commented Oct 28, 2016

PlexDownloader scans the library properly and can pull files, but once the video file download completes it's automatically deleting it, but keeping subtitle files. Plexdownloader does not report any errors, and after sleep it will attempt to download the file again.

@retnug
Copy link

retnug commented Mar 25, 2018

Thats happens by big files, I prevent this by splitting the download . may be it helps!
while dfile < long(filesize):
range = {"Range":"bytes="+str(rangestart) + '-' + str(rangeend) }
req = urllib2.Request(link, headers=range)
epfile = urllib2.urlopen(req)
while dfile < rangeend:
if debug_limitdld:
chunk = epfile.read(buffer) #1K buffer
fp.write(chunk)
dfile=long(filesize)
else:
chunk = epfile.read(buffer)#1MB buffer
if not chunk: break
fp.write(chunk)
dfile += len(chunk)
#print "Downloaded: " + str(dfile) + "/" + str(filesize) + " Buffer: " + str(buffer) + " Chunk: " + str(len(chunk)) + " rangeend: " + str(rangeend)
epfile.close()
rangestart = dfile
rangeend = min([rangewidth+dfile,long(filesize)])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants