Skip to content

Add trakt-manager extension - #12898

Merged
raycastbot merged 23 commits into
raycast:mainfrom
thesobercoder:ext/trakt-manager
Jul 25, 2024
Merged

raycastbot merged 23 commits into
raycast:mainfrom
thesobercoder:ext/trakt-manager

Conversation

@thesobercoder

@thesobercoder thesobercoder commented Jun 12, 2024 •

Copy link
Copy Markdown
Contributor

Description

Trakt Manager enables you to control your Trakt account directly from Raycast. It provides a set of commands to perform various actions on your account like adding shows to watchlist, checking-in on shows, and more. It allows you to sign in to your Trakt account using OAuth and then perform actions on your account.

Screencast

CleanShot 2024-06-12 at 13 37 10

Checklist

- feat: prepare for release
- feat: refactor for performance
- feat: invalidate single show cache after next episode check-in
- feat: invalidate cache in refresh command
- chore: update description
- feat: add refresh command
- feat: add additional types
- chore: further refactoring
- chore: further refactoring
- chore: refactor common functions
- feat: optimize types
- fix: lint issues
- feat: skip up next shows which are being rewatched
- chore: cleanup command descriptions
- chore: cleanup and rename command
- fix: improve on-deck search condition
- fix: trakt show link
- feat: optimize subtitle
- fix: year null for movie or show
- chore: cleanup code
- feat: polish up the interface
- fix: show success toast only on success
- feat: check-in next episode
- feat: fix types
- feat: on deck shows
- fix: react rendering warnings
- feat: add preference action
- fix: remove show from watchlist bug
- feat: create show grid component
- feat: empty movie watchlist text
- feat: create movie grid component
- feat: switch shows to background image fetching
- feat: switch movies to background image fetching
- feat: add on-deck command and switch to global type declarations
- feat: add new command snippet and on-deck command
- chore: remove console.log
- feat: cache user details during oauth
- fix: assign max listeners for abort signal
- fix: increase max listener to fix memory leak
- fix: movie search limited to title
- fix: set search movie limit to 10
- fix: pagination rendering
- fix: incorrect shortcut
- fix: keyboard shortcut standardization
- feat: make TMDB API Key optional
- fix: wrong show cache key
- feat: add shows to watchlist
- fix: check-in issues
- fix: episode toast labels
- feat: open links for Trakt and IMDb
- feat: switch episodes to Trakt API
- fix: movie image cache bug
- feat: optimize fetch calls
- feat: turn off TMDB if no key if present
- fix: use path.join
- feat: switch seasons to Trakt API
- chore: cleanup constants
- feat: add check-in to watchlist
- feat: switch movie search to Trakt
- feat: remove from watchlist
- feat: add watchlist for movies
- feat: switch to 3 column layout for episodes
- feat: add episode view
- feat: switch shows to TMDB API
- chore: remove unused assets
- feat: movie title fallback
- feat: add error handling for abort signal
- feat: switch moives to TMDB API
- feat: show toast if not AbortError
- chore: remove console logs
- chore: update README
- feat: store fetched images
- chore: remove unused null coalescing operators
- feat: add abort controller cleanup on unload
- feat: improve error handling for movies
- feat: add abort controller for movies
- feat: movie poster
- chore: format with import sorting
- fix: migrate to npm lock file required to publish
- fix: lint issues
- chore: remove redundant packages
- chore: format
- chore: update README
- chore: update README
- chore: improve README
- chore: update README
- chore: update README
- chore: update README
- chore: update README
- chore: update README
- feat: add show seasons
- feat: search shows
- feat: add movie to watchlist
- feat: implement search movie list
- feat: fix oauth login flow
- feat: get movie list
- initial commit

ghost commented Jun 12, 2024 •

Copy link
Copy Markdown

Congratulations on your new Raycast extension! 🚀

We're currently experiencing high demand and limited capacity. As a result, extension reviews might take longer than usual to get the initial review. Please expect an initial review within 5-10 business days.

Once the PR is approved and merged, the extension will be available on our Store.

Sorry for the inconvenience

@ghost ghost added the new extension Label for PRs with new extensions label Jun 12, 2024
Soham Dasgupta added 6 commits June 13, 2024 23:51
- fix: malformed movie check-in body
- fix: up-next not showing any shows
- fix: watchlist build errors
- feat: add  seasons and episodes to history
- feat: add movie and show to history
- chore: update README
- feat: switch to TMDB readonly bearer token
- chore: update README
- chore: update README
- chore: update README

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi 👋

Thanks for your contribution 💪

I have now tested your extension, and I have some feedback ready for you:

  • The extension crashes If you try to run Refresh before authenticating is done

trakt-manager 2024-06-17 at 16 08 06

  • Maybe add confirmAlert and style={Action.Style.Destructive} to remove actions

  • Use our screenshot tool to make the images of the extension

  • What is backgorund.png for?

I'm looking forward to testing this extension again 🔥

Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.

@ghost ghost self-assigned this Jun 17, 2024

ghost commented Jun 18, 2024 •

Copy link
Copy Markdown
Author

Hi @pernielsentikaer,

Thank you for your feedback. I will fix the Refresh command, and publish the update soon.

  • Maybe add confirmAlert and style={Action.Style.Destructive} to remove actions

Can you please explain this a bit further? I'm not sure I understand where to put this.

Since I don't have a MacBook Pro and I use a Mac Studio with an LG external monitor. Whenever I try to take a screenshot with the Raycast screenshot tool, it never matches the screenshot dimensions required by the linter. For this reason, I had to, create a separate background.png file and manually place the screenshots within that background image using Pixelmator Pro. Last I checked, the linter was happy with the image that I created.

Also, I'm facing one more problem, if you try to load the Watchlist command without authenticating, it correctly redirects you to the sign in screen from where you can complete the sign-in process, but after the authentication is done, the Watchlist command is empty, which is incorrect as it should start loading the data from inside the useEffect hook. Any insight will be really helpful.

ghost commented Jun 19, 2024

Copy link
Copy Markdown

Did you change anything with the oAuth, I can't connect and getting this error when returning to Raycast after allowing Trakt to use my account

trakt-manager 2024-06-19 at 11 57 56

11:57:43.300 
FetchError: request to https://trakt.tv/oauth/token failed, reason: connect ECONNREFUSED 127.0.0.1:9090

ClientRequest.<anonymous>:index.js:108:10

---
105:            };
106: 
107:            request_.on('error', error => {
108:                    reject(new FetchError(`request to ${request.url} failed, reason: ${error.message}`, 'system', error));
109:                    finalize();
110:            });
111: 
---

ClientRequest.emit:node:events:526:35
ClientRequest.emit:node:domain:488:12
index.js:2:38805

ghost commented Jun 19, 2024

Copy link
Copy Markdown
Author

Did you change anything with the oAuth, I can't connect and getting this error when returning to Raycast after allowing Trakt to use my account

That is strange. I haven't pushed anything new to this PR. I was able to log in just fine. Tried it just now. Maybe something in your network is blocking the requests?

Anyway, I would really appreciate it if you can clarify my questions that I asked above. Thanks a ton!

- chore: update command description
- feat: add remove from history command
- chore: improve message
- fix: catch authorization error gracefully
- fix: unnecessary rerender bug
- fix: view component rerender logic
- fix: refresh command crash if user not authorized
- fix: remove unused helper method
- feat: add history command

ghost commented Jun 19, 2024 •

Copy link
Copy Markdown
Author

Hi @pernielsentikaer I have updated the PR addressing the Refresh command issues and also added some robust error handling for all possible situations. Please feel free to check and let me know what you think. Also, I have tested the login scenario multiple times, and it did not fail ever a single time. I'm not sure why yours isn't working. If you can ask someone else to try and let me know, might give me some insights.

Soham Dasgupta added 2 commits June 19, 2024 16:48
- fix: remove from history shortcut
- fix: add to history action

ghost commented Jun 19, 2024

Copy link
Copy Markdown

Seems like I had a network issue but it should be resolved now 🙂

Shouldn't I be able to see the two items in Watchlist? I tried to open the command a few times but it's always empty.

Raycast19062024-5PQ8JYzN png@2x

ghost commented Jun 19, 2024

Copy link
Copy Markdown
Author

Seems like I had a network issue but it should be resolved now 🙂

Shouldn't I be able to see the two items in Watchlist? I tried to open the command a few times but it's always empty.

Raycast19062024-5PQ8JYzN png@2x

I think the problem is you are on the movie page and there are no movies added to your watchlist. What is even stranger is, I don't see the search bar accessory to select movies or shows. I hope your Raycast version is updated, not sure what else could go wrong here.

CleanShot 2024-06-19 at 20 16 03

ghost commented Jun 19, 2024

Copy link
Copy Markdown
Author

@pernielsentikaer I think I figured out the issue. Working on it.

ghost commented Jun 19, 2024

Copy link
Copy Markdown
Author

@pernielsentikaer I'm not sure what happened, but auth stopped working. It won't just go past the sign-in overlay screen in Raycast. I've been debugging it for the last 2 hours, but I'm unable to figure out why. What is strange is the no-view Refresh command is authenticating perfectly and working fine. I'm out of ideas at this point. Would really appreciate some help.

- chore: update packages
- chore: update auth error message
- feat: switch to react context for authentication state

ghost commented Jun 19, 2024

Copy link
Copy Markdown

@thesobercoder I have had similar issues since updating to 1.77 today (see here: https://raycastcommunity.slack.com/archives/C02HEMAF2SJ/p1718820854528979)

Soham Dasgupta added 6 commits June 20, 2024 21:23
- feat: add attributions details in README
- feat: massive refactor and polishing for release
- feat: add check-in first episode command
- chore: update CHANGELOG
- feat: use hooks for the seasons component
- feat: improve loading computation and other improvements
- chore: remove loading state from hooks
- feat: add success to useEpisodes hook
- feat: use hooks for episode component
- chore: rename components
- feat: add loading state for mutation
- feat: optimize movie grid component
- feat: optimize show grid component
- feat: use separate movie and show details hook
- feat: optimize useMovies hook
- feat: use hooks for search movies command
- feat: use hooks for up-next command
- feat: refine history command hooks
- feat: use hooks for watchlist command
- feat: bubble up error from history hooks
- feat: add better types
- feat: use hooks for history command
@ghost ghost added the status: stalled Stalled due inactivity label Jul 17, 2024

ghost commented Jul 17, 2024 •

Copy link
Copy Markdown
Author

@mil3na @pernielsentikaer I've asked the community for help, but no one replied. I checked everything from my end and don't see any performance issues. The flickering is something that I don't believe actually causes any memory pressure or performance issues, which I have verified. I'm a bit out of ideas at this point on how to improve this perceived performance problem. If you still think my extension is not acceptable, I guess I will just go ahead and close the PR. I have been using React for a very long time (and have been a developer for 15 years), and I'm pretty pedantic about performance issues in general, but I'm out of ideas at this point. Please let me know your thoughts.

https://raycastcommunity.slack.com/archives/C02HEMAF2SJ/p1720886607399709

@ghost ghost removed the status: stalled Stalled due inactivity label Jul 17, 2024

ghost commented Jul 19, 2024

Copy link
Copy Markdown

Hey! Sorry that no one answer your claim. The flickering is kind of a no-no for us, according to our internal guideline. Per will be back on Monday, I wonder if he has any better insight. I will get back to this then.

ghost commented Jul 20, 2024

Copy link
Copy Markdown
Author

@mil3na Thanks. I will wait for @pernielsentikaer's insight.

ghost commented Jul 24, 2024

Copy link
Copy Markdown

Hi @thesobercoder 👋

I think we'll add it now and see if we can find ways to improve it in a later version 🙂

@ghost
ghost marked this pull request as ready for review July 24, 2024 11:39

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Could you redo the metadata images of the extension to use our tool instead 🙂

ghost commented Jul 25, 2024 •

Copy link
Copy Markdown
Author

Hi @pernielsentikaer,

The Raycast screenshot tool doesn't seem to work best for non-retina external monitors. The reason I manually created those screenshots of desired sizes is because of this limitation. Please take a look at the image below.

CleanShot 2024-07-25 at 20 11 03

ghost commented Jul 25, 2024

Copy link
Copy Markdown

Added a simple metadata image for now

@ghost
ghost merged commit 0fa83b4 into raycast:main Jul 25, 2024

ghost commented Jul 25, 2024

Copy link
Copy Markdown

ghost commented Jul 25, 2024

Copy link
Copy Markdown

🎉 🎉 🎉

Such a great contribution deserves a reward, but unfortunately we couldn't find your Raycast account based on your GitHub username (@thesobercoder).
Please link your GitHub account to your Raycast account to receive your credits and soon be able to exchange them for some swag.

@ghost
ghost deleted the ext/trakt-manager branch July 25, 2024 18:18
@ghost
ghost restored the ext/trakt-manager branch July 25, 2024 18:18
@ghost
ghost deleted the ext/trakt-manager branch February 8, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new extension Label for PRs with new extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants