Closed Taranis01 closed 4 years ago
I noticed this too. It happens if you copy more than just the next course into the _inprogress
folder. I made these quick tweaks to fix it:
@@ -90,11 +95,12 @@ def move_content(pdl, course_id, coursepath, completionpath):
pdl.to_stdout("Moving content to " + finalpath)
set_directory(completionpath)
try:
- if os.path.exists(finalpath):
- shutil.rmtree(finalpath)
- shutil.move(coursepath,finalpath)
- if os.path.exists(INPROGRESSPATH):
- shutil.rmtree(INPROGRESSPATH)
+ os.makedirs(finalpath)
+ for f in os.listdir(coursepath):
+ if os.path.exists(finalpath + "/" + f):
+ shutil.rmtree(finalpath+"/"+f)
+ shutil.move(coursepath + "/" + f,finalpath + "/" + f)
+ shutil.rmtree(coursepath)
except PermissionError:
print("Directory still in use, leaving it. Will be fixed in future releases.")
I also commented out every move_content
call except for finished downloads in the invoke_download
function to keep everything in the _inprogress
folder until it finished. I have meh internet & have to restart the script every time it goes out for a couple seconds and this makes it less work for me.
Thanks @prikhi. I had running multiple instances with the same course folder (symbolic links), so no wonder this happened frequently
so i just lost a week's worth of downloaded courses, because i moved all courses that it (incompletely) downloaded into _inprogress. i mean what's even the point in these directories? _cancelled, _failed, why are they even there? i just want to download, not sort them based on some nonsense. everytime i ran it i had to move _failed and _cancelled into _inprogress. i wish i had not found this software
When plura-dl encounters an problem for what ever reason the current downloads are moved to the _failed folder. Then i move them back to _inprogress folder and restart plura-dl. However sometimes files are lost:
I will give furter information if i can replicate the first two issues
Something went wrong. The download request for 'django-angularjs-web-development' was forced to terminate. Double check that https://app.pluralsight.com/library/courses/django-angularjs-web-development exists or that your subscription is valid for accessing its content.