rafacovez / notify

Telegram bot written in Python to interact with the Spotify API.
https://t.me/playlistNotificationBot
MIT License
2 stars 0 forks source link

Implement Worker for Playlist Snapshot Comparison #8

Closed rafacovez closed 1 year ago

rafacovez commented 1 year ago

Issue Description

Feature Request: Implement Worker for Playlist Snapshot Comparison

Problem Statement

The current code lacks a worker that compares the snapshot_id of playlists added to the notify_list table in the bot's database. This prevents the bot from automatically detecting changes in playlist snapshots and notifying users.

Proposed Solution

Implement a worker that runs periodically to check for differences in snapshot_id values. When a playlist's snapshot_id changes, the bot should send a notification to the user who added the playlist, including a clickable link to the playlist on Spotify.

Acceptance Criteria

Technical Considerations

Additional Information

Implementation Guidance

  1. Modify code to store snapshot_id when adding playlists to notify_list table.
  2. Implement periodic worker to compare stored snapshot_id with current snapshot from Spotify API.
  3. Send notification to respective Telegram user when a difference is detected.
  4. Handle errors and log worker execution.

Please let me know if you need further assistance or clarification.