Skip to content

maint, move to iter library#57

Merged
tphoney merged 1 commit intomainfrom
move_to_iter
Jan 25, 2026
Merged

maint, move to iter library#57
tphoney merged 1 commit intomainfrom
move_to_iter

Conversation

@tphoney
Copy link
Owner

@tphoney tphoney commented Jan 25, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the codebase to replace manual concurrency management (channels and semaphores) with the sourcegraph/conc/iter library, improving code simplicity and maintainability.

Changes:

  • Replaced manual goroutine + channel + semaphore patterns with iter.Map calls across spotify, plex, and cinemaparadiso packages
  • Added new value-returning helper functions to work with iter.Map
  • Removed explicit concurrency limit constants (spotifyThreads)
  • Fixed a bug in plex.go where extractMoviesFromPlaylist was returning undetailed movies instead of detailed movies
  • Updated TODO file to mark the refactoring task as complete
  • Updated golangci-lint path in copilot instructions

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spotify/spotify.go Refactored GetArtistsInParallel and GetAlbumsInParallel to use iter.Map, added value-returning helper functions
plex/plex.go Refactored AllMovies, getPlexTVSeasons, and extractMoviesFromPlaylist to use iter.Map, added value-returning helper functions, fixed bug in extractMoviesFromPlaylist
cinemaparadiso/cinemaparadiso.go Refactored MoviesInParallel, ScrapeMoviesParallel, and TVInParallel to use iter.Map, added value-returning helper functions
cinemaparadiso/cinemaparadiso_test.go Updated TestSearchCinemaParadisoMovies to use new value-returning function
utils/utils.go Removed placeholder comments
go.mod Added sourcegraph/conc dependency
go.sum Updated with new dependencies (conc and its transitive dependencies)
TODO Marked concurrency refactoring task as complete
.github/copilot-instructions.md Updated golangci-lint path from dynamic to hardcoded

@tphoney tphoney merged commit c32dd6b into main Jan 25, 2026
4 checks passed
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.

1 participant