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

Error when downloading videos with no downvotes #50

Closed
theoutsider24 opened this issue Feb 17, 2021 · 4 comments
Closed

Error when downloading videos with no downvotes #50

theoutsider24 opened this issue Feb 17, 2021 · 4 comments

Comments

@theoutsider24
Copy link

Couldn't download this video (https://www.youtube.com/watch?v=O7AXkEzX2VM&ab_channel=LoLEsportsVODsandHighlights) with no downvotes (at time of writing)

Traceback:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/background_task/tasks.py", line 43, in bg_runner
func(*args, **kwargs)
File "/app/sync/tasks.py", line 335, in download_media
write_text_file(media.nfopath, media.nfoxml)
File "/app/sync/models.py", line 1081, in nfoxml
votes.text = str(self.votes)
File "/app/sync/models.py", line 981, in votes
return upvotes + downvotes
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

@theoutsider24
Copy link
Author

TubeSync version 0.8 with youtube-dl version 2021.01.16 and FFmpeg version 4.3.1-static.

@theoutsider24
Copy link
Author

Possibly requires changing from
downvotes = self.loaded_metadata.get(field, 0)
to
downvotes = self.loaded_metadata.get(field) || 0

@meeb meeb closed this as completed in 3567e20 Feb 17, 2021
@theoutsider24
Copy link
Author

Damn @meeb you beast!

@meeb
Copy link
Owner

meeb commented Feb 17, 2021

Thanks for the report, fixed in :latest and will be bundled into the next release.

@meeb meeb mentioned this issue Feb 18, 2021
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