Changelog¶
v2.1.3¶
Fix a race condition that can cause duplicated notifications.
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v2.1.2…v2.1.3
v2.1.2¶
Fix not properly handling errors when resubscribing to channels every day.
Fix race conditions in
InMemoryVideoHistoryandFileVideoHistory
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v2.1.1…v2.1.2
v2.1.1¶
Fix raising an error when receiving the push notification for deleted video.
From now on,
ytnotiexplicitly raisesRuntimeErrorwhen failed to parse the request body from YouTube. In the past, it logged the error to the logger.
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v2.1.0…v2.1.1
v2.1.0¶
From now on,
YouTubeNotifierextendsAsyncYouTubeNotifierandAsyncYouTubeNotifierextendsobject.BaseYouTubeNotifierwas 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 IDsFrom now on,
(Async)YouTubeNotifier.subscribe()immediately raisesValueErrorwhen 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 either add_any_listener(), add_upload_listener(), or add_edit_listener()
The following decorators are deprecated and will be removed in version 3.0.0
* (Async)YouTubeNotifier.listener() -> use either any, upload or edit
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v2.0.1…v2.1.0
v2.0.1¶
Fixed raising TypeError when a video supports multiple languages.
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v2.0.0…v2.0.1
v2.0.0¶
Breaking Changes¶
The following fields in
Videoare 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
appwasn’t given.Fixed (Async)YouTubeNotifier not invoking the event listeners for some YouTube channels.
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v1.1.2…v2.0.0
v1.1.2¶
Improved error messages, suggesting possible reasons why they occurred
YouTubeNotifier.run()andAsyncYouTubeNotifier.serve()now raisesValueErrorif the registered routes in the givenFastAPIinstance conflict with the reserved routes for the notifier.
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v1.1.1…v1.1.2
v1.1.1¶
Update the type of dir_path of the constructor of
FileVideoHistoryfromPathtostr | PathLike[str]
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v1.1.0…v1.1.1
v1.1.0¶
Add an optional parameter
hosttoYouTubeNotifier.run()andAsyncYouTubeNotifier.serve()to specify the host to bind to when running the FastAPI server. Defaults to0.0.0.0
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v1.0.0…v1.1.0
v1.0.0¶
Breaking Changes¶
Class
Notificationis removed. Instead, the classVideois passed to the listeners.Videocontains a fieldchannel. Their definitions are moved fromytnoti.models.notification.pytoytnoti.models.video.pyParameter
cache_sizeforYouTubeNotifieris removed. Instead, it takesvideo_historyargument and the constructor of``InMemoryVideoHistory`` takescache_sizeParameter
endpointis removed fromYouTubeNotifier.run(). From now on, the endpoint is extracted from the givencallback_urlsubscribe()now raisesHTTPErrordefined in this package rather than the one defined in packagehttpx
Improvements¶
Class
AsyncYouTubeNotifieris added. It’s the async version ofYouTubeNotifierthat can be run in the existing event loop.Abstract class
VideoHistorycan be passed to the constructor ofYouTubeNotifier.InMemoryVideoHistoryandFileVideoHistoryextends the abstract class. You can also implement your own class that extendsVideoHistoryand pass it to theYouTubeNotifier
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v0.1.2…v1.0.0
v0.1.2¶
Fix
YouTubeNotifier.run()raising an error when it wasn’t called inside the main threadAdd
YouTubeNotifier.stop()that gracefully stops the runningYouTubeNotifierRemove the
/healthendpoint that was used to check whether the server is accepting requests or not
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v0.1.1…v0.1.2
v0.1.1¶
Improved the efficiency of verification of channel IDs (it now uses
HEADrequest instead ofGET)For parameter
channel_idsfor allYouTubeNotifier’s methods, it can now also take a singular id with typestr.Added optional parameters to the constructor of
YouTubeNotifier*password- The password to use for verifying push notifications. If not provided, a random password will be generated. Defaults to None *cache_size: The number of video IDs to keep in the cache to prevent duplicate notifications. Defaults to 5000Added
created_atinChannel
Full Changelog: https://github.com/SeoulSKY/ytnoti/compare/v0.1.0…v0.1.1
v0.1.0¶
Initial release