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

Feature: Add sync.get_playback method #48

Merged
merged 4 commits into from
Apr 7, 2024
Merged

Feature: Add sync.get_playback method #48

merged 4 commits into from
Apr 7, 2024

Conversation

glensc
Copy link
Owner

@glensc glensc commented Apr 6, 2024

https://trakt.docs.apiary.io/#reference/sync/playback/get-playback-progress

required by:

Not implemented:

  • start_at, end_at parameters
  • unit testing

Summary by CodeRabbit

  • New Features
    • Introduced a feature to track and synchronize playback progress for movies or episodes across different media centers or applications.

Copy link

coderabbitai bot commented Apr 7, 2024

Warning

Rate Limit Exceeded

@glensc has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 39 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between b37c570 and dfc367f.

Walkthrough

The recent update introduces a new PlaybackEntry dataclass designed to encapsulate playback progress, including details like paused time, ID, type, and additional metadata. A significant feature is the get_playback function, which fetches playback progress for movies or episodes. This enhancement is aimed at improving synchronization capabilities across various media centers or applications, ensuring a seamless viewing experience.

Changes

Files Change Summary
trakt/sync.py Added PlaybackEntry dataclass and get_playback function for retrieving playback progress.

Poem

In the digital burrows where the bytes do play,
A new feature hops in, brightening the day.
🐰 "With PlaybackEntry so fine and so neat,
Synchronizing your shows is now quite a feat.
Just call get_playback, and you'll see,
Your viewing's as smooth as a dance can be!"

  • CodeRabbit 🎩✨

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@glensc glensc marked this pull request as ready for review April 7, 2024 14:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b37c570 and a3b8dd7.
Files selected for processing (1)
  • trakt/sync.py (2 hunks)
Additional comments not posted (2)
trakt/sync.py (2)

23-34: Consider adding type hints for the data attribute in the PlaybackEntry dataclass to improve code readability and type checking.


346-387: Ensure proper error handling for the external call within get_playback. Consider wrapping the network request in a try-except block to handle potential connectivity issues or API errors gracefully.

trakt/sync.py Outdated Show resolved Hide resolved
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a3b8dd7 and 7cb38ec.
Files selected for processing (1)
  • trakt/sync.py (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • trakt/sync.py

@glensc glensc merged commit 3c4a5fe into main Apr 7, 2024
7 checks passed
@glensc glensc deleted the get_playback-method branch April 7, 2024 14:25
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

Successfully merging this pull request may close these issues.

None yet

1 participant