Skip to content

Commit

Permalink
Reflecting changes in the twitch-python package for getting video com…
Browse files Browse the repository at this point in the history
…ments.
  • Loading branch information
PetterKraabol committed Jul 17, 2019
1 parent 8ac739c commit c45da39
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 41 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "pypi"
requests = "*"
python-dateutil = "*"
pytz = ">=2018.9"
twitch-python = ">=0.0.11"
twitch-python = ">=0.0.12"

[dev-packages]
wheel = "*"
Expand Down
67 changes: 33 additions & 34 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/PetterKraabol/Twitch-Chat-Downloader',
version='3.1.0',
version='3.1.1',
zip_safe=True,
)
2 changes: 1 addition & 1 deletion tcd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .settings import Settings

__name__: str = 'tcd'
__version__: str = '3.1.0'
__version__: str = '3.1.1'
__all__: List[Callable] = [Arguments, Settings, Downloader, Logger, Log]


Expand Down
2 changes: 1 addition & 1 deletion tcd/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def video(self, video: Video) -> None:
'comments': []
}

for comment in video.comments():
for comment in video.comments:

# Skip unspecified users if a list is provided.
if Arguments().users and comment.commenter.name.lower() not in Arguments().users:
Expand Down
2 changes: 1 addition & 1 deletion tcd/formats/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def use(self) -> Tuple[Generator[Tuple[str, Comment], None, None], str]:
:return: tuple(formatted comment, comment), output format
"""
# Format comments
comments = self.comment_generator(self.video.comments())
comments = self.comment_generator(self.video.comments)

# Format output
output: str = Pipe(self.format_dictionary['output']).output(self.video.data)
Expand Down
2 changes: 1 addition & 1 deletion tcd/formats/srt.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def use(self) -> Tuple[Generator[Tuple[str, Comment], None, None], str]:
Use SRT format
:return: Comment generator and output string
"""
return self.subtitles(self.video.comments()), Pipe(self.format_dictionary['output']).output(self.video.data)
return self.subtitles(self.video.comments), Pipe(self.format_dictionary['output']).output(self.video.data)

@staticmethod
def format_timestamp(time: datetime.timedelta) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tcd/formats/ssa.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def generator(self) -> Generator[Tuple[str, Optional[Comment]], None, None]:
Line generator
:return:
"""
for line in chain(self.prefix(), self.dialogues(self.video.comments())):
for line in chain(self.prefix(), self.dialogues(self.video.comments)):
yield line

@staticmethod
Expand Down

0 comments on commit c45da39

Please sign in to comment.