Update import and add rate limiting, fix csv writing for Windows #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Import for episodes and movies both weren't working well for me before with -w option (watched_at). I think that functionality is now fixed. To help with this, the import episodes now uses the episode object format, referenced from here instead of show object format. Tested with both movie and episode import and export.
Every format except for imbd did not work before when importing due to trying to parse the header line of the csv, now they work.
Also added a simple fix to ensure that 429 errors aren't being thrown due to rate limiting (mentioned in #36). And Windows now shouldn't write csv files with extra newlines.
While already mentioned in #25, I think that trakt should be set to the default format for import because there are movies on trakt without imdb ids. I didn't change this however.