Releases: SeoulSKY/ytnoti
Releases · SeoulSKY/ytnoti
v2.1.3
v2.1.2
Changes
- Fix not properly handling errors when resubscribing to channels every day.
- Fix race conditions in
InMemoryVideoHistory
andFileVideoHistory
Full Changelog: v2.1.1...v2.1.2
v2.1.1
Changes
- Fix raising an error when receiving the push notification for deleted video.
- From now on,
ytnoti
explicitly raisesRuntimeError
when failed to parse the request body from YouTube. In the past, it logged the error to the logger.
Full Changelog: v2.1.0...v2.1.1
v2.1.0
Changes
- From now on,
YouTubeNotifier
extendsAsyncYouTubeNotifier
andAsyncYouTubeNotifier
extendsobject
.BaseYouTubeNotifier
was removed. - Added
(Async)YouTubeNotifier.run_in_background()
. It works like therun()
method but immediately returns when the notifier starts running. - Added
(Async) YouTubeNotifier.unsubscribe()
. It unsubscribes the subscribed channel IDs - From now on,
(Async)YouTubeNotifier.subscribe()
immediately raisesValueError
when the given channel IDs are invalid. It didn't raise an error in the past until the notifier started running. - Improved the speed of verifying channel IDs
Deprecations
The following methods are deprecated and will be removed in version 3.0.0
AsyncYouTubeNotifier.serve()
->use AsyncYouTubeNotifier.run()
(Async)YouTubeNotifier.add_listener()
-> use eitheradd_any_listener()
,add_upload_listener()
, oradd_edit_listener()
The following decorators are deprecated and will be removed in version 3.0.0
(Async)YouTubeNotifier.listener()
-> use eitherany
,upload
oredit
Full Changelog: v2.0.1...v2.1.0
v2.0.1
Changes
- Fixed raising TypeError when a video supports multiple languages.
Full Changelog: v2.0.0...v2.0.1
v2.0.0
Breaking Changes
The following fields in Video
are removed as these are not sent by YouTube in the push notifications:
- description
- thumbnail
- stats
Bug Fixes
- Fixed YouTubeNotifier.run() and AsyncYouTubeNotifier.serve() raising TypeError when the optional parameter
app
wasn't given. - Fixed (Async)YouTubeNotifier not invoking the event listeners for some YouTube channels.
Full Changelog: v1.1.2...v2.0.0
v1.1.2
Changes
- Improved error messages, suggesting possible reasons why they occurred
YouTubeNotifier.run()
andAsyncYouTubeNotifier.serve()
now raisesValueError
if the registered routes in the givenFastAPI
instance conflict with the reserved routes for the notifier.
Full Changelog: v1.1.1...v1.1.2
v1.1.1
Changes
- Update the type of
dir_path
of the constructor ofFileVideoHistory
fromPath
tostr | PathLike[str]
Full Changelog: v1.1.0...v1.1.1
v1.1.0
Changes
- Add an optional parameter
host
toYouTubeNotifier.run()
andAsyncYouTubeNotifier.serve()
to
specify the host to bind to when running the FastAPI server. Defaults to0.0.0.0
Full Changelog: v1.0.0...v1.1.0
v1.0.0
Breaking Changes
- Class
Notification
is removed. Instead, the classVideo
is passed to the listeners.Video
contains a fieldchannel
. Their definitions are moved fromytnoti.models.notification.py
toytnoti.models.video.py
- Parameter
cache_size
forYouTubeNotifier
is removed. Instead, it takesvideo_history
argument and the constructor ofInMemoryVideoHistory
takescache_size
- Parameter
endpoint
is removed fromYouTubeNotifier.run()
. From now on, the endpoint is extracted from the givencallback_url
subscribe()
now raisesHTTPError
defined in this package rather than the one defined in packagehttpx
Improvements
- Class
AsyncYouTubeNotifier
is added. It's the async version ofYouTubeNotifier
that can be run in the existing event loop. - Abstract class
VideoHistory
can be passed to the constructor ofYouTubeNotifier
.InMemoryVideoHistory
andFileVideoHistory
extends the abstract class. You can also implement your own class that extendsVideoHistory
and pass it to theYouTubeNotifier
Full Changelog: v0.1.2...v1.0.0