Skip to content

Commit

Permalink
Add subtis extension
Browse files Browse the repository at this point in the history
- feat: Add deploy:raycast script
- feat: Wrap-up raycast update
- feat: Modify code to match CLI
- feat: Fix broken API tests
- feat: Change stremio codebase to match code-style in subtis
- feat: Standarize project to v0.3.0
- feat: Improve message status in file indexer
- feat: Improve GalaxyRG support
- fix: Broken CLI binary build
- docs: Format URLs table
- feat: Bump project dependencies
- feat: Update readme with CLI instructions
- fix: Broken test
- feat: Wrap-up CLI new UI/UX
- feat: Bump project dependencies
- feat: Wrap-up new CLI with real time indexer!!
- feat: Use production api only
- feat: Improve type definitions in api
- feat: Improve naming in const
- feat: Throw error with cause to display specific message to UI
- feat: Remove clipboardy. Infer fromWebSocket boolean from webscoket key.
- feat: Fix broken script in cli package json
- feat: Deploy new Stremio version
- feat: Re-use subtitle requests by receiving apiClient from the outside
- feat: Demo for socketdex official url
- feat: Use own package api client
- feat: Export webSocket messages schemas
- feat: Create apiClient in indexer
- feat: Shorten supabase link in API responses
- feat: Move links to API to have short links directly in responses
- feat: Add bun env type definitions
- feat: Add WebSocket URLs to bash
- feat: Add WebSocket (Socketdex) to URLs
- feat: Remove repeated file extensions
- feat: Add new environment variables in env template
- feat: Update code to be re-usable between Stremio and other apps
- feat: Improve ws percentages
- feat: Remove background from Stremio
- feat: Update Stremio background
- feat: Move all apiClient to shared
- feat: Skip subtitle link id test
- feat: Update tests to match object avoiding going specific for certain keys
- feat: Update buscar parameter from SubDivx
- feat: Bump project dependencies
- feat: Update Yaak collection file
- feat: Improve API naming of parameters
- docs: Improve initialization script
- feat: Add script to initialize project
- feat: Improve Stremio description
- feat: Remove series in Stremio addonBuilder
- feat: Improve YTS error call
- fix: Avoid getting subtitles for different movies
- feat: Skip tv shows temporary on not found subtitles
- feat: Bump project dependencies
- feat: Bump project dependencies
- feat: Update tests to be automatized when DB gets cleaned-up
- feat:
- feat: Improve getApiClient call
- feat: Add new endpoint to GET title metadata by ID
- feat: Small comment improve
- feat: Update biome schema
- feat: Differentiate conditional into 2 parts
- feat: Bump project dependencies
- feat: Improve EVO and RARBG release groups
- feat: Index movies without debugging mode
- feat: Improve cinema regex filtering
- feat: Bump project dependencies
- feat: Improve supabase indexer by avoiding indexing more than one equal torrent at the same time
- feat: Dispolay less data for not filtered torrents
- feat: Search movies by year in file not found indexer
- feat: Improve indexedBy values
- feat: Improve ampersand and aka support filtering
- feat: Bump project dependencies
- feat: Remove logs
- feat: Bump project dependencies
- feat: Deploy real time indexer to Fly.io
- feat: Remove dockerfile legacy
- feat: Bump project dependencies
- feat: Add new replacer
- feat: Improve support for 2160p and 4K movies
- fix: Improve filtering for subtitle titles that don\'t match current title find
- feat: New cinema recording regex addition
- feat: Add HEVC release groups
- feat: Avoid indexing FORZADO subtitles
- feat: Get title id in response. Avoid getting duplicated titles.
- feat:
- fix: For movies that are not related to their year release date
- feat: Improve API error handling
- feat: Bump project dependencies
- feat: Skip tv shows
- feat: Add new subtitle metadata endpoint
- feat: Add indexer based on supabase INSERT calls
- feat: Add pagination to not found subtitles indexer plus minor fixes
- feat: Add new endpoint for download metadata based on a tv show id and season
- feat: Fix access to SubDivX
- feat: Update project dependencies
- feat: Add YOUTUBE_API_KEY environment variable template
- feat: Bump project dependencies
- feat: Update SubDivX parameters to make it work again
- feat: Improve release group for yts
- feat: Add new query match for YTS
- feat: Return id for release groups and return subtitle group name for subtitle group record
- fix: Watermark for movies
- fix: For special characters like "-"
- feat: Avoid cache on Stremio
- feat: Update fuzzy_search_title plpgsql fn
- feat: Bump project dependencies
- feat: Rollback max timeout to 30s
- feat: Bump project dependencies
- fix: Filter titles that are not related in SubDivX
- feat: Make date_uploaded keys optional for YTS schema
- feat: Remove old log
- feat: Bump project dependencies
- feat: Format release groups
- Merge pull request #24 from lndgalante/mejora-indexador-pelis
- mejora-indexador-pelis
- feat: Safely execute call to SubDivX
- feat: Index only titles with english as original language
- feat: Improve torrents filtering logic
- feat: Bump project dependencies
- feat: Bump project dependencies
- feat: Add URLs to main readme
- feat: Share getStringWithoutSpecialCharacters fn across packages. Update fuzzy_search_title logic to match full title names.
- feat: Filter torrents that doesn\'t match title name
- feat: Store subtitle not found in DB within /file/name/:bytes/:fileName endpoint
- feat: Update Biome configuration to v1.9.0
- feat: Bump project dependencies
- feat: Remove Supabase call
- feat: Remove logs
- feat: Bump project dependencies
- feat: Change torrent_size to string. Remove teaser from Titles table.
- feat: Bump project dependencies
- feat: Support file names without resolution by extracting it
- feat: Bump project dependencies
- feat: Update docs to login with Cloudfare first
- feat: Filter torrents by filter
- feat: Add YTS trackers for torrentStream engine
- feat: Remove table logs
- feat: Get title teaser from YouTube and not from TMDB
- feat: Add IGN channel by Agus
- feat: Bump project dependencies
- feat: Improve API error handling
- feat: Add 1337x provider back
- feat: Bump project dependencies
- feat: Add ability to search tv show by name
- feat: Format code
- feat: Improve metadata for alpha description
- feat: Add script to deploy stremio
- feat: Remove old logs
- feat: Improve stremio app code
- feat: Deploy Stremio to fly.io
- feat: Run stremio project in bun
- feat: Improve Stremio scaffolding
- feat: Update apiBaseUrl
- feat: Wrap up MVP for Stremio
- feat: Send queried_times key in /titles/trending
- feat: Add Walt Disney and Pixar channels
- feat: Bump project dependencies
- feat: Handle error scenarios
- feat: Update collection to support params
- feat: Update collection and format code
- feat: Avoid windows-1251 as a encoding parameter
- feat: Use only first tracker since it breaks magnet
- feat: Add @types/node back
- feat: Fix broken magnet for YTS
- feat: Update PATCH in HTTP collection
- feat: Update POST methods to PATCH
- docs: Update indexer docs
- feat: Update HTTP collection
- feat: Switch from Hoppscotch to Yaak
- feat: Add test for new download season subtitles endpoint
- feat: Add endpoint to return all subtitles for a tv show season
- feat: Remove unused dependency
- feat: Update biome schema version
- feat: Update all broken tests
- feat: Update HTTP collection
- feat: Add new endpoints for trending titles
- feat: Add TODO to TMDB
- feat: Improve watermark to be dynamic for movies
- feat: Use Number.parseInt to get limit in integer
- feat: Bump project dependencies
- feat: Add movie release groups by Agu
- feat: Improve watermark for tv shows
- feat: Check for positive numbers only
- feat: Improve check for positive integer numbers in parameters
- feat: Improve file alternative controller logic
- feat: Improve wording for watermark
- feat: Detect encoding automatically
- feat: Improve watermark indexes
- feat: Improve watermark wording
- feat: Improve subtitle watermark
- fix: Code comment
- feat: Store our first dump
- docs: Add docs to generate SQL dump
- feat: Avoid duplicate bytes on Subtitles table
- feat: Update broken tests
- feat: Add new release groups
- feat: Bump project dependencies
- Merge pull request #23 from lndgalante/agustingarciainf/sub-203-agregar-nuevos-canales-oficiales-de-yt-para-teasers
- agustingarciainf/sub-203-agregar-nuevos-canales-oficiales-de-yt-para-teasers
- feat: Bump project dependencies
- feat: Improve TV Show messages
- feat: Avoid displaying torrent tracker error
- feat: Run saveReleaseGroupsToDb on tv shows as well
- feat: Improve continue message. Avoid duplicated torrents.
- feat: Improve subdivx error message
- feat: Improve YTS naming
- feat: Improve indexer for manual work of improving it
- fix: Watermark bug that tabs make it hidden
- feat: Update collection file
- feat: Update tests suite for subtitles controller
- feat: Remove logs
- feat: Update API tests
- fix: Format biome code
- fix: Bugfix for teasers that have html escaped characters
- feat: Update watermark for tv shows
- feat: Check limit parameter is a number in /titles/recent/:limit
- feat: Bump dependencies
- feat: General code cleanup
- feat: Bump project dependencies
- feat: Update API collection
- fix: Save release groups
- docs: Add update_subtitle_info in the docs
- feat: Add release groups for tv shows (by Agu)
- feat: Add YTS / YIFY support !
- feat: Update broken tests
- feat: Improve indexer on demand
- feat: Use optional try-catch for movies
- feat: Decrease maxTorrents by 5
- feat: Increase max torrents to 20
- feat: Fix broken schemas
- feat: Avoid inserting rows again in release groups
- Merge pull request #22 from lndgalante/feat/AddReleaseGroups
- feat: Wrap up stremio with websockets
- feat/AddReleaseGroups
- feat: Allow comments key to be nullable
- feat: Bump project dependencies
- fix: Broken test. All tests passing.
- feat: Add tests to subtitles and title
- feat: Quick API clean-up
- feat: Remove .cjs file
- feat: Add test suite for subtitle controller
- feat: Clean-up curated channels
- Merge pull request #21 from lndgalante/feat/AddChanels
- feat/AddChanels
- feat: Index by movie name and optionally by year
- feat: Add tests for MAX_LIMIT
- feat: Update tests for titles controllers
- feat: Search by season on teaser
- feat: Bump project dependencies
- feat: Improve /title/teaser endpoint with test
- feat: Move youtube url to title API
- feat: Update collection json
- feat: Improve title handler
- feat: Ignore ssa subtitles
- feat: Add comment for curated channels
- feat: Improve data structure for channel list
- feat: Bump project dependencies
- fix: Loose schema for id in items for YT schema
- feat: Split title and titles endpoints
- feat: Update /title/teaser to find teasers in YT if they do not exists in our DB
- feat: Update Biome config
- feat: Add access token with login
- feat: Add TODO to watermark
- feat: Display id for subtitle groups. Remove unnecesary logo request.
- feat: Bump project dependencies
- feat: Improve timing for subtis watermark
- feat: Bump project dependencies
- feat: Update HTTP collection
- feat: Avoid hitting DB if query is lesser than 3 characters
- fix: Raise exception if there\'s no subtitle found in DB for update_subtitles_info fn
- feat: Sort title serach by title year
- feat: Avoid filtering by title type
- feat: Return a single subtitle for alternative endpoint
- feat: Bump dependencies
- feat: Bump project dependencies
- feat: Improve support for OpenSubtitles
- feat: Run to lowercase once
- feat: Limit to 2 episodes for testing
- feat: Add cam to cinema recording regex
- feat: Add new cinema recording regex
- feat: Bump project dependencies
- feat: Add safe guard checks for numbers
- feat: Type check
- feat: Split subtitles and subtitle controllers
- feat: Merge searchable_opensubtitles_name and searchable_subdivx_name into query_matches
- feat: Bump dependencies
- fix: Avoid erroring the whole indexer when no file are found in torrents
- feat: Sort subtitles by subtitle_group_id in order to return SubDivX first
- feat: Add support for OpenSubtitles
- feat: Bump project dependencies. Remove no longed needed ts-reset.
- feat: Update HTTP collection
- feat: Bump project dependencies
- feat: Final details for WS
- feat: Add WebSocket for not found subtitles
- feat: Format API code
- feat: Bump web dependencies
- feat: Sort subtitle endpoints. Fix duplicates titles.
- feat: Bump dependencies
- feat: Move all metrics and shortener to subtitles
- feat: Add more subtitles to not found mock
- feat: Store all values
- feat: Update dependencies
- feat: Integrate sending emails for JIT indexer
- fix: Avoid running API when importing AppType
- feat: Add validation to check that subtitleId is a number
- feat: Optimization to find by bytes OR title file name to avoid double calls to DB
- feat: Query by title file name or bytes
- feat: Bump dependencies
- feat: Add title_name_without_special_chars in Titles table
- feat: Index movie and tv shows trailers
- feat: Bump dependencies
- feat: Code clean-up
- feat: Update project dependencies
- feat: Add subtitle watermark in file
- feat: Add re-usable and tested getDecodedSubtitleFile fn
- feat: Add isDebugging parameter to indexMovieByName
- feat: Clean-up Stremio addon with fixes
- feat: Update collection HTTP json
- feat: Remove integrations router and endpoints
- feat: Add missing export
- feat: Re-use getDecodedSubtitleFile fn
- feat: Bump project dependencies
- feat: Sort by queried times
- feat: Improve alternative versions endpoint by resolution and release group
- feat: Make email optional. Call API from file indexer.
- feat: Add /not-found enpodint to store file
- fix: Stremio to work with ts-node
- feat: Comment whole error in getSubtitlesForTitle
- feat: Add new release groups
- feat: Improve efficiency of indexer
- feat: Run indexer on file
- feat: Sort imports
- feat: Update collection HTTP API
- feat: Search titles by type i.e. movie or tv-show
- feat: Update fuzzy_search_title fn
- fix: Search alternative subtitles with insensitive case
- feat: Update cron time
- feat: Add final cron to run tv shows and movies indexer, and then not found subtitles indexer
- feat: Iterate not found script
- feat: Add logic to index not found subtitles
- feat: Filter SVG logos
- feat: Remove subtitles files after each indexation. Improve file indexer. Improve YTS support.
- feat: Remove playing sounds on subtitle success
- feat: Store title logo in Titles table
- feat: Update dependencies
- feat: Improve stremio type definitions
- feat: Call insert_subtitle_not_found in indexTitleByFileName
- feat: Update insert_subtitle_not_found on docs
- feat: Send titleFileName through params
- feat: Remove RPC call from endpoints
- feat: Bump project dependencies
- feat: Add search by file possible
- feat: Update HTTP collection
- feat: Remove unused logs
- fix: Duplicated episodes subtitles
- feat: Parse title file name when year doesn\'t exists
- feat: Add tests for /subtitles/tv-show
- fix: All broken tests
- feat: Add limit early return for /recent/:limit endpoint
- feat: Bump project dependencies
- feat: Add endpoint for tv shows to query a specific season or episode
- feat: Bump project dependencies
- feat: Update Stremio plugin to work with series. Fetch subtitle metadata to use ID.
- feat: Parse tracker to remove extra unused data
- feat: Small code refactors
- fix: Zod error message access
- feat: Bump project dependencies
- docs: Improve description
- feat: Update titles controller and endpoint to return title type
- feat: Update fuzzy_search_title docs
- test: Fix broken tests that doesn\'t return title type
- feat: Return title type on subtitles endpoint. Fix repeated bytes on subtitles by filename.
- feat: Enable cache only on production environment
- feat: Return current season and current episode for subtitles
- feat: Update HTTP collection
- fix: Fix all broken tests and type checks
- feat: Make API back up
- feat: Add Torrent table and index it
- feat: Store total seasons and total episodes. Upsert title instead of insert.
- feat: Add support for title and overview in spanish
- feat: Add tests for a serie episode
- feat: Bump project dependencies
- feat: Update project dependencies
- feat: Wrap up indexer refactoring
- feat: Use a single source of file names
- feat: Second refactor iteration for tv show support
- feat: Move more code into its own title type file
- feat: Bump project dependencies
- feat: Begin refactoring for getSubtitlesForTitle to work with movies and tv shows
- feat: Update project dependencies
- docs: Improve DOCS
- feat: Use proper bun install --force
- feat: Hide Sentry DSN in a env variable
- feat: Use version for addon from package.json version key in Stremio app
- feat: Use PORT key in uppercase
- feat: Use node env port
- feat: Run Stremio in Node with ts-node. Convert sentry/bun to sentry/node.
- feat: Integrate Sentry in Stremio addon
- feat: Use spaces in Biome. Update project dependencies.
- docs: Fix packages table on root readme
- feat: Remove tiny-invariant from shared package
- feat: Use fetch API since hono client doesn\'t work with Raycast
- feat: Read file from fs to send bytes to API endpoint
- feat: Remove tiny-invariant. Add zod library.
- feat: Disable style lint rule for Raycast
- feat: Bump project dependencies
- feat: Bump project dependencies
- feat: Update HTTP collection
- feat: Modify metrics endpoint to receive bytes and fileName. Execute new metrics endpoint on CLI and Stremio.
- feat: Display loading message for subtitle download in CLI
- feat: Bump project dependencies
- feat: Add CORS to API
- feat: Bump project dependencies
- feat: Update collection JSON
- feat: Bump project dependencies. Fix broken test.
- feat: Big change to trigger metrics in CLI
- chore: Improve code formatting in stremio app
- feat: Add TODO to avoid duplicated movies from trending subtitles
- feat: Improve type definitions on Stremio addon
- fix: Update Stremio logo
- fix: Type issue on getApiClient utility
- feat: Bump project dependencies
- docs: Improve root project readme
- feat: Update type definitions
- feat: Update gitignore
- feat: Update collection
- fix: All broken tests
- feat: Improve CLI to avoid showing API hono client errors on it
- feat: Collocate cache to specific endpoints. Remove CLI endpoint.
- feat: Use single supabase project
- feat: Format code
- feat: Set cache middleware
- feat: Bump project dependencies
- fix: Broken tests and api calls
- feat: Convert necessary endpoints from POST to GET
- feat: Add /cli route on web to redirect to API in order to expose CLI binary
- fix: Port to redirect to web instead of API
- feat: Add Remix web package. Add route to redirect to API shortener.
- fix: Fix metrics endpoint always returning true
- feat: Bump project dependencies
- feat: Increase type coverage treshold to 100%
- docs: Update HTTP collection for testing
- feat: Bump project dependencies
- docs: Avoid big schema image on root readme
- feat: Add missing test. Update project dependencies. Fix broken types.
- feat: Add shortener API tests
- feat: Add subtitles API tests
- feat: Use same key order for query and schema
- feat: Add getMockEnv for API testing
- feat: Improve Wrangler configuration
- feat: Add types and test:watch script to API package json
- feat: Add .toml to type definitions
- feat: Bump project dependencies
- feat: Add Stremio logo. Code cleanup.
- feat: Standarize use of .match() insteado of .eq()
- feat: Bump project dependencies
- feat: Add schema image into root readme
- feat: Improve progress bar message
- feat: Show progress in indexer
- feat: Add reviewed and uploadedBy columns
- docs: Improve API playground section
- feat: Publish environment JSON for HTTP clients
- docs: Add deploy API tick
- feat: Use simple scaffolding in CLI
- docs: Improve main title
- feat: Use table for packages
- docs: Improve project readme with Good Practices section
- feat: Bump project type definitions
- feat: Add missing type check script
- feat: Run biome check
- feat: Fix broken type defintions
- feat: Remove unused website key
- feat: Remove TODOS and moved to Linear
- feat: Add missing subtitleFileName key used in CLI
- feat: Add security headers middleware to Hono
- feat: Update github actions
- feat: Format raycast code. Add deploy:api to root package json.
- feat: Avoid query duplication. Avoid requesting unnecesary keys.
- feat: Update collection with environment variables
- feat: Change ports from old server the new Hono server
- feat: Move UI package to shared package
- feat: Bump project dependencies
- feat: Improve docs to run project
- feat: Update collection and wrangler config
- feat: Rename to api and worker to subtis
- feat: Migrate from Elysia to Hono framework
- feat: Clean-up CLI scripts
- feat: Clean-up root package json
- feat: Update project dependencies. Update database types and schemas.
- feat: Update biome schema version
- feat: Improve stremio codebase with refactoring and tests
- feat: Update collection and project dependencies
- feat: Download automatically subtitle in CLI
- feat: Show new subtitle short link in CLI
- feat: Small code improvements
- Merge pull request #20 from lndgalante/link-redirect
- feat: Added link redirect endpoint for download
- feat: Improve test coverage
- feat: Add tests for getSubtitleAuthor
- feat: Improve import order
- feat: Improve code duplication
- feat: Improve code test coverage
- feat: Avoid code duplication in codebase
- feat: Update tests and root package json
- feat: Update project deps
- feat: Remove swagger from collection
- feat: Bump project dependencies
- feat: Change mainIndexer fn name
- feat: Use Number for movieId instead of String
- feat: Use fuzzy search RPC call instead of ilike method
- feat: Update Swagger collection
- feat: Group file endpoints. Disable swagger due to bug.
- feat: Bump project dependencies
- feat: Update swagger collection doc
- feat: Add endpoint to return subtitles for a movie given a file name
- feat: Display guide only on user confirmation (CLI)
- feat: Bump project dependencies
- feat: Add support to index a single movie
- fix:
- feat: Save lang to database
- feat: Add lang key support for each subtitle provider getter
- feat: Update database schemas and type definitions
- feat: Bump project dependencies
- feat: Update API dependencies
- feat: Run biome check
- feat: Avoid throwing error on getMovieMetadata
- feat: Add ETRG release group
- feat: Filter torrents with less than 15 seeds
- feat: Add HUZZAH release group
- feat: Improve cinema recordings with new regex value
- feat: Bump project dependencies
- feat: Filter torrents with less than 30 torrents
- feat: Format release groups file
- feat: Add MADSKY release group
- feat: Add SPARKS release group
- feat: Improve YTS release group with YIFY values
- feat: Add 2 new release groups
- feat: Improve YTS release group. Fix broken links for subX value in SubDivX URL.
- feat: Remove terminal-image from CLI.
- feat: Add more CMRG file attributes
- feat: Skip QRips release group since are cinema recordings
- feat: Add Atmos-MRCS release group
- feat: Add EVO and ATMOS-SWTYBLZ release groups
- feat: Add REMUX release group
- feat: Add ACEM release group
- feat: Add new cinema recording string values
- feat: Remove unused release group website key
- feat: Add REVILS new release group
- feat: Improve ETHEL support for SubDivX
- feat: Add instructions to CLI
- feat: Bump project dependencies
- fix: Use match instead of test due to broken filtering with cinema recording regex
- feat: Update API collection
- fix: All broken tests
- fix: Broken indexer tests
- fix: Broken CLI tests
- feat: Bump project dependencies
- feat: Remove sort by subtitleGroupId
- feat: Add support to display poster on CLI
- feat: Add poster and backdrop support in DB
- feat: Add stremio addon scripts to root package json
- feat: Format and lint entire codebase
- docs: Add missing packages in root readme
- feat: Improve shared scaffolding
- docs: Improve overall docs
- feat: Bump project dependencies
- feat: Add stremio controller in API
- feat: Remove zod dependency. Wrap-up stremio addon MVP.
- feat: Add stremio integration endpoint
- feat: Update collection docs with new integrations endpoint
- feat: General code clean-up
- fix: Imports in shared package
- feat: Add stremio package and MVP
- feat: Update deps
- feat: Use separate databases
- fix: Broken tests due to DB reset
- feat: Add SHITBOX release group
- feat: Improve cinema recordings filter
- feat: Increase timeout for seed missing error
- feat: Add PiGNUS release group
- feat: Run new biome lint on CI
- Merge pull request #19 from lndgalante/agustingarciainf/sub-136-agregar-releasegroups-de-la-pagina-2-indexada
- feat: Add HEVC-EVO release group
- feat: Add RABiDS release group
- feat: Add BYNDR release group
- Add KNiVES, Slot and APEX ReleaseGroups
- fix: All broken tests
- feat: Replace ESLint config with Biome
- feat: Bump project dependencies
- feat: Bump project dependencies
- Merge pull request #18 from lndgalante/agustingarciainf/sub-130-agregar-kbox-rg
- feat: Add EniaHD release group
- feat: Add AOC and AccomplishedYak release groups
- feat: Add HDRip-C1NEM4 release group support
- feat: Add possible solution to spanish from Spain subtitles
- feat: Move cinema recordings regex to its own variable
- feat: Add LiLKiM release group support
- feat: Add new query value for YTS in subdvix key
- feat: Lower-case file attributes
- feat: Add support for a list of file attributes. Extend file attribute support for KBOX and FLUX.
- Add KBOX Release group
- feat: Update type-coverage dependency and treshold
- feat: Update supabase dependency
- feat: Update collection to read from HTTP API client
- feat: Add endpoint to get movies by recent release date
- feat: Add release_date to Movies table
- feat: Send bytes to /subtitles/file POST from CLI and Raycast
- feat: Update dev:cli:sample for testing the CLI
- fix:
- Merge pull request #17 from lndgalante/agustingarciainf/sub-124-agregar-rg-x264-lama
- Add LAMA ReleaseGroup
- feat: Bump TOTAL_MOVIES_TO_SEARCH to 10 torrents
- fix: Update SubDivX response zod schema
- feat: Add ETHEL release groups, Add new matcher to YTS.
- feat: Add new matcher for YTS
- feat: Use SUBDIVX_BASE_URL to fetch SubDivX
- feat: Update HTTP JSON collection with new recents endpoint
- feat: Update taze library version
- fix: Fix broken tests on download endpoint
- feat: Return bytes values in subtitles endpoints
- feat: Add /subtitles/recents endpoint
- feat: Update JSON collection to import to HTTP clients
- feat: Find subtitle movie by bytes in case user changed file name
- feat: Bump project dependencies. Use bracket notation to access Bun env.
- feat: Remove Bun specific v1.0.11 in readme. Remove usage of Bun for indexer.
- feat: Improve overall type definitions. Remove old table polyfill.
- feat: Avoid matching by movie title in find method
- feat: Update tests
- feat: Update API tests to match new records
- feat: Update SubDivX core fn to work with new API
- feat: Remove old SubDivx methods
- feat: Remove getSubDivXSearchUrl old call. Execute saveSubtitleGroups.
- feat: Remove JSDOM indexer dependency
- feat: Use string arrays to search release groups in order to find by more than one match
- feat: Update subtitle groups without inserting duplciates
- feat: Export database core models
- feat: Add ms type definitions
- feat: Update DB types and schemas
- fix: Remove db schemas tests
- test: Fix broken tests to match new endpoint structure
- feat: Group endpoints by functionality. Improve controller names.
- feat: Sort porject deps
- feat: Bump project dependencies
- feat: Add perfectionist ESLint plugin to have better sorts
- feat: Add debugging mode so indexer can run on its own without manual pause with confirms
- feat: Display log messages when no torrents are found
- feat: Update project dependencies
- feat: Use indexer to index by a specific year
- feat: Improve query filters for Discover movies endpoint from TMDB
- feat: Add dayjs dependency to indexer
- test: Fix broken tests for trending and getMovieMetadata
- feat: Bump project dependencies
- feat: Add hdcam filter to avoid cinema recordings. Avoid undefined sending through paramms to prettyBytes.
- fix: Sort torrent files by length to avoid catching i.e. a sample.mkv
- fix: Current year to be not current year plus one
- feat: Add ability to skip movies with confirm
- feat: Trigger RPC call to insert subtitle not found
- feat: Add missing steps to update database
- feat: Add SubtitlesNotFound new table
- feat: Bump project dependencies
- feat: Destroy torrent engine on timeout
- feat: Unite by a dot words separated by spaces. Add support for 576p.
- feat: Avoid commiting .rar files
- fix: Display seeds in indexer logs. Timeout when torrent has low amount of seeds.
- feat: Add AAC release group
- feat: Remove unused ESLint rule
- feat: Add code:duplication script to check for duplications
- feat: Use new bun type definitions
- feat: Bump project dependencies
- feat: Improve logs when there\'s no release group supported
- test: Fix OpenSubtitles test and remove only test call
- Merge pull request #15 from lndgalante/nicolasaccetta/sub-102-implementar-patrones-en-package-shared
- test: correct failing cases
- fix: Add try/catch to turl shorten call
- fix(indexer): gracefully continue when the movie doesnt have a release group
- fix(shared): remove spread operator on found release group
- fix(indexer): use release group name when interpolating to create user error message
- refactor: move console table polyfill to its own file
- refactor(ui): create module + move get error message util + get api client
- chore(indexer): remove useless import
- chore(api): add todo to message getter util
- feat(shared): move several utils to other modules + apply new module structure
- fix: Destroy torrent stream engine
- feat: Return null and continue looping for getMovieMetadata call
- fix: Avoid throwing error in getMovieMetadata fn
- feat: Bump project dependencies
- feat: Add root package script to run indexer in Node environment
- feat: Bump supabase dependency
- Merge pull request #16 from lndgalante/leo/fix-1337x-with-piratebay
- fix: Indexer back to life again!!
- fix: use thepiratebay
- feat: Bump project dependencies
- test: Automatically check that release groups in DB are equal to release groups list in the Indexer
- feat: Automatically save unique release groups to DB
- fix: Correct folder path for indexer
- feat: Create folders automatically for indexer in case they don\'t exists
- Merge pull request #14 from lndgalante/agustingarciainf/sub-104-agregar-soporte-a-hevc-release-group-en-el-indexador
- Add HEVC-PSA Release group support
- feat: Bump project dependencies
- refactor: Remove unused zod file and utilities
- feat: Bump threshold to 100
- feat: Remove argenteam from subtitles group
- test: Improve test coverage
- feat: Add download endpoint for metrics
- test: Add a ton of tests to supabase schemas
- feat: Improve type coverage to 100%
- feat: Bump project dependencies
- feat: Add minimum treshold for type coverage
- feat: Ignore coverage-ts generated folder
- feat: Add type definitions coverage
- fix: Add await for RPC call if not doesn\'t work
- feat: Trigger RPC method on cached subtitle branch
- feat: Add listener callback
- feat: Remove unnecesary limit 1 in subtitle controller
- fix: Broken test on db and subtitle controller
- test: Improve code coverage
- feat: Add limit key to trending endpoint
- feat: Skip broken argenteam tests seems API is down
- feat: Bump project dependencies
- feat: Sort imports
- feat: Update project dependencies
- feat: Implement LRU cache for subtitle controller
- fix: Return a single item instead of an array of results
- docs: Change web path to raycast path
- test: Add tests to check Elysia instance and routes definitions
- fix: fuzzy search in movies controller. Adds extra test for fuzzy search.
- feat: Update collection with trending endpoint
- feat: Add trending endpoint. Update lastQueriedAt and queriedTimes in subtitle and subtitles endpoints. Move test to each controller.
- fix: Remove pruneTables fn
- feat: Use @subtis prefix on db package
- feat: Bump project dependencies
- feat: Use new paths for generated type defs and schemas
- Merge pull request #13 from lndgalante/nicolasaccetta/sub-87-iterar-package-db
- feat(db): implement new folder structure
- feat: Bump dependencies. Update tests.
- feat: Use simpler generate script to update DB type defintions and schemas
- Merge pull request #12 from lndgalante/leo/update-pr-template
- feat: Remove unused step
- feat: Use Bun stable version in GH
- feat: Test relative path using PWD from env
- fix: Disable log
- feat: Log PWD temporary
- feat: Add step to set execution permissions for binary file
- feat: Add temporary step to list files in binary folder
- feat: Use bun official step directly
- feat: Compile CLI in GH actions
- fix: Resolve subtis binary
- fix: Avoid resolveSync only for modules
- fix: Disable temporary eslint rules
- fix: Resolve paths correctly for GH actions
- fix: Add run command to avoid running default build bun command
- fix: Resolve imports for GH actions
- feat: Set environment variables in gh action
- docs: Update PR template docs
- feat: Add simple GitHub Action configuration file to lint and test on PRs
- docs: Remove old warning section on main readme
- fix: Remove root file binary
- feat: Run all tests at once with CLI included
- test: Fix tests to match CLI output text
- feat: Accept port in runApi fn
- feat: General code clean-up
- Merge pull request #11 from lndgalante/feat/rework-rework-rework
- chore(eslint): add rules for removing imports automatically
- fix(cli): returns correct errors for every case
- feat(api): rework core file + expose explicit run file to run module
- feat: Add lockfile to gitignore
- test: Use a single it to avoid duplication for both development script and production/binary script
- feat: Bump bun-types definition
- Merge pull request #9 from lndgalante/leo/demo-2
- docs: Avoid shared repetition
- fix: Remove searching text from test
- fix: Use error schema from api/shared
- Merge pull request #8 from lndgalante/leo/demo
- docs: Improve packages with sections
- fix: Remove old ESLint config file
- feat: Use TS for ESlint config file
- docs: Adds PR template
- test: Add Binary tests
- feat: Update bun lockfile
- Merge pull request #7 from lndgalante/feat/rework-cli-app
- fix: Remove unused bin key from package json
- fix: Remove code comment
- fix: Add required_error back. Use ZodIssueCode enum.
- fix: Fix build script
- fix: Move server log to within listen callback
- fix: Avoid relative paths
- feat: Update docs collection for Hoppscotch
- fix: Fix broken tests. Lint fixes. Video file name schema english message in API. Bump dependencies.
- feat(cli): use custom error map in cli arguments union
- fix(shared): rework error name for video file name schema
- fix(api): initialize elisyia wihtin test file
- feat: target run file instead of app
- refactor(api): expose explicit run file to run module + remove server file
- feat(api): rework core file + expose explicit run file to run module
- feat: Remove fileNameHash utility
- feat: Add HEVC-CMRG release group
- feat: Remove fileNameHash no longer necessary
- feat: Display current torrent data in table format
- feat: Display query link for SubDivX
- feat: Copy movie name with year to clipboard in order to paste on subtitle provider website
- feat: Add clipboardy dependency to indexer
- fix: Filter HDTS cine recording quality from torrents array
- feat: Bump dependencies
- fix: Remove web package
- fix: Use type on db type definitions for consistency
- test: Fix 400 broken tests
- feat: Update bun lockfile
- fix: Remove unnecesary as any type assertions
- Revert "feat: Use a single validation library across the codebase and API"
- fix: Use any until we can resolve apiClient
- docs: Update CLI and API docs
- feat: Bump project dependencies.
- test: Add tests to check for payload keys
- feat: Use a single validation library across the codebase and API
- test: Update tests to match database
- fix: Replace backticks. Improve fn name.
- feat: Bump project deps. Update bun lockfile
- test: Fix file shorcut flag from --f to -f
- fix: Remove extra "-" string for file shorcut flag
- fix: Remove file flag on dev:cli
- fix: Remove unneeded CLI log
- feat: Add space jump to provide more space to CLI UI
- feat: Add missing Movie type definition
- fix: Codebase lint issues fixed
- docs: Improve root docs readability
- feat: Update project lockfile
- feat: Ignore binary files
- feat: Update project lockfile
- feat: Disable unecessary node eslint rule
- feat: Add build script to compile binary. Add coverage script.
- fix: Avoid environment variables for CLI since they\'re not being read in compilation
- feat: Rename elysia to server for clarity
- test: Update CLI tests
- feat: Add line jumps when server begin running
- fix: Remove unnecesary node:process
- feat: Display log when app begins running
- feat: Avoid INSERT for duplicated subtitles
- feat: Bump project deps
- docs: Update Database readme section
- test: Fix CLI tests to match intro changes
- test: Add oxdown to fix getSubDivXSearchParams unit tests
- fix: Sort SubDivX results by downloads to query the best subtitle
- fix: Match also by resolution in SubDivx provider
- fix: Remove unused type definitions
- fix: Display intro message only Subtis
- fix: Clean-up code comments
- fix: Remove unused dependencies
- feat: Centralize api client in shared. Remove redis and other unused dependencies.
- Merge pull request #5 from lndgalante/nicolasaccetta/sub-68-aplicar-mismos-patrones-de-apisubtitle-a-apisubtitles
- chore(api): remove unused shared function
- feat(api): extract functions into shared submodule
- feat(api): extract functions into shared submodule
- Merge pull request #6 from lndgalante/nicolasaccetta/sub-72-crear-getter-para-getsubtitles-subtitles-y-getmovies-movies
- feat(api): implement subtitles and movies getters + delete global shared definition
- feat: Update project lockfile
- docs: Clean-up docs
- feat: Exit process in CLI in finally catch.
- feat: Add build script to CLI
- feat: Add colors to CLI
- feat: Improve CLI schema. Add tests.
- feat: Add CLI guidelines
- feat: Bump project dependencies
- fix: Solve and sort imports
- Merge pull request #3 from lndgalante/feat/api-subtitles
- Merge pull request #4 from lndgalante/feat/api-movies
- chore(api): remove unused imports from movies
- feat(api): use validation schemas in movies folder
- feat(api): use validation schemas in subtitles folder
- feat: Create new custom schema from auto-generated supabase schemas
- fix: Broken dev script for api
- fix: Remove unused resolution schema
- fix: Lint new supabase types
- test: Update broken tests
- feat: Update lockfile
- feat: Update DB types. Generate schemas from DB types. Bump dependencies.
- feat: Project cleanup
- feat: Ignore zip files in repo
- Merge pull request #2 from lndgalante/feat/api-file-structure
- chore(api): rename readme file to conventional uppercase
- feat(api): set project type to esm
- feat(api): add @subtis prefix to project name + to root project also
- chore(api): un-ignore subtitles submodule
- revert: do not use @subtis prefix as project name
- chore(api): remove unused folder
- feat(api): apply new arquitecture
- feat: add video file name schema + minor adjustments to pass tests
- revert(api): use previous variable name for consistency
- refactor(api): return successful status code instead of redirection status code
- refactor(api): use nullable instead of null schema validator
- feat(api/subtitle): replace all types with validation schemas + remove try catch
- docs: Add explanation about Bun versioning
- fix: Fix release group detection in getMovieMetadata function to be dynamic
- feat: Add new Edith release group
- feat: Replace invariant with Zod
- fix: Find torrents by movie name and year
- feat: Bump project dependencies
- docs: Add access database section to get access to Supabase
- fix: ESLint issues on new files
- feat: Add scripts to run packages in parallel with the API running. Bump dependencies.
- docs: Improve CLI docs for development
- feat: Add dev:cli:demo script
- docs: Add collection to import in a HTTP client
- feat: Update monorepo dependencies
- fix: Taze broken dep by fixing it to a specific version.
- feat: Update bun lockfile
- feat: Add Helmet and Rate-limit to API
- docs: Add ESLint guide to root readme
- test: Fix broken API endpoint tests
- feat: Disable curly bracets rule to keep consistency
- fix: Style fix
- feat: Sort test scripts in root package json
- fix: Not detecting cinema strings
- feat: Switch warn to error log
- fix: Avoid parallelization of subitle providers call
- feat: Download subtitle to subtitles folder only if it\'s a compressed file. Improve logs.
- feat: Support for Flux. Switch logs to spanish.
- feat: Filter torrents with cinema recordings
- fix: Replace AMZN by FLUX release group
- feat: Add AMZN release group to indexer
- feat: Add log when indexer began searching for subtitles
- docs: Improve main readme
- feat: Update bun lockfile
- feat: Fix .srt files downloaded for OpenSubtitles. Display providers that didn\'t get any match for logs.
- fix: Remove unnused dotenv global dependency
- feat: Replace npx by bunx for main package json scripts
- feat: Update project lockfile
- feat: Get author from subtitle file and save it to DB
- feat: Add README to update database
- fix: Update TMDB schema when backdrop_path is not defined
- fix: Lint warnings and errors fixed
- feat: Bump project dependencies
- fix: CLI  broken tests and make it work separately from all tests
- feat: Bump project dependencies
- feat: Add movies endpoint. Add missing tests.
- feat: Bump project lockfile
- fix: Fix comment ticks for consistency
- feat: Add endpoint to get all subtitles from a movie id
- feat: Improve type definition to getRedisInstance
- feat: Add prefix /v1 to API subtitles POST endpoint
- feat: Move getEnabledSubtitleProviders to feature. Add test to it.
- feat: Update node types deps. Remove extra write flag.
- docs: Add section to install specific Bun version
- feat: Improve logs for indexer
- feat: Add console table support for Bun
- feat: Improve provider getSubtitle fn naming
- feat: Bump project dependencies
- feat: Bump project dependencies. Add single script to update and install deps.
- feat: Remove legacy subtitles indexer. Clean up scripts on root package.json
- feat: Bump project dependencies using taze
- feat: Add script to bump all monorepo dependencies
- fix: Broken tests due to new param changes
- feat: Move buffer utility to shared
- feat: Bump dependencies
- feat: Improve indexer logs. Add fn to toggle subtitle providers.
- fix: Catch errors when torrent is not parseable
- feat: Add isSupported key to each RELASE_GROUP
- feat: Add getSubtitle key in SUBTITLE_GROUPS to map later on
- fix: Remove unnecesary nullish coalescing operator
- feat: Modify core provider subtitle getter to have the same signature across providers
- feat: Add boolean to check if release group is supported or not
- feat: remove ignores
- feat: update bun lockfile
- fix: Broken type definition on test
- fix: Broken import comments. Use type as default syntax.
- feat: Bump redis dependency
- fix: Update dev:cli script
- feat: Bumps project dependencies. Add new global ESLint config.
- feat: Update bun lockfile
- feat: Split TMDB logic into a different file
- feat: Add TMDB value to env template
- feat: Remove unused dependency
- feat: Add script to run new indexer
- feat: Bump project dependencies
- feat: Add new indexer
- feat: Update project subtitle
- feat: Add dependencies for new indexer
- feat: Add disclaimer for indexer
- feat: Use HEAD method to check if link is alive instead of downloading the whole link
- feat: Improve code comments
- feat: General code cleanup
- feat: Update bun lockfile
- feat: Use pattern-matching for getMessageFromStatusCode
- feat: Update bun lockfile
- feat: Rename test coverage global script
- feat: Bump web dependencies.
- feat: Fix indexer tests. Bump indexer dependencies.
- feat: Fix shared tests. Bump dependencies.
- feat: Call getSubtitle without a static zod schema
- feat: Improve code comment over CLI
- feat: Bump raycast dependencies.
- feat: Add tests for supabase. Bump dependencies.
- feat: Update bun lockfile
- feat: Rename subtitle by description key in getMessageFromStatusCode util
- feat: Improve CLI codebase. Add tests for all different scenarios.
- feat: Cleanup CLI dependencies
- feat: Add missing zod dependency over API
- feat: Add API tests. General cleanup.
- feat: Add initial tests for API. Bump dependencies.
- docs: Add fix for sharp dependency over macOS
- feat: Remove template from indexer
- feat: Add Raycast link
- feat: Decrease delay value
- feat: Add root dev script for raycast
- fix: Lint using raycast linter options
- feat: General web cleanup
- refactor: General code cleanup and renaming
- feat: Code cleanup for type definitions
- docs: Add Endpoints section in API readme
- feat: Update Bun lockfile
- feat: Add Upstash support in API
- feat: Add comment sections for each env variable group
- feat: Bump project dependencies
- feat: Add Raycast extension package
- feat: Move error messages to shared package
- fix: Return message key for API error response
- feat: Use the same error naming for CLI
- feat: Improve CLI outro message
- feat: Add dotenv to run indexer with Node due to issues with Bun
- feat: Add drag and drop functionality to UI
- feat: Save short and full subtitle link to DB.
- feat: Support for 480p quality
- fix: Main title on documentation readme
- fix: Links on main readme
- feat: Add TODO in API
- feat: Improve CLI user messages
- feat: Remove old logs
- feat: Add union query to query movies, release group, and subtitle group
- feat: Bump project dependencies
- feat: Prefer type inference over getSubtitleLink
- feat: Short subtitle link directly from indexer
- feat: Clear cache every 1 day. Improve invariant not found conditional.
- feat: Add TODO in API
- feat: Bump dependencies
- feat: Improve subtitle link to download with the same name as movie
- feat: Move type definition file to project root
- feat: Use recommended TS configuration by Bun
- feat: Add TODO to CLI
- feat: Fix task using constant value
- feat: Improve error messages handling in UI
- feat: Use a single type definition source for subtitles
- feat: Improve error messages in API
- fix: Return proper error status code from API
- docs: Fix bun upgrade command
- feat: Improve main readme
- feat: Improve wording on drag and drop subtitle
- feat: Split nav links in 2 sections
- feat: Move fetch logic to action and loaders
- feat: Updaate Bun lockfile
- feat: Bump project dependencies
- feat: Improve shared utils naming for consistency
- feat: Use type imports across the codebase
- feat: Improve code comment in API
- feat: Remove old delay from CLI
- feat: Improve CLI code comments
- feat: Translate CLI to spanish. Improve invariant helpers.
- feat: Improve invariant error handle
- docs: Add readme files for all packages
- docs: improve cli comment
- docs: Replace core fn by core only for simplicity
- feat: Promise.all delay and subtitle fetch
- feat: Improve set handler type definition
- feat: Everything working !!
- feat: Add tests for CLI
- feat: Add web, shared, and api packages
- feat: Update TODOs
- feat: Improve test coverage
- feat: Add breadcrumb errors for each subtitle provider
- feat: Refactor project into Bun and workspaces
- feat: add pnpm support
- feat: Add new TODO item
- feat: add confirmation step to debug through providers
- feat: display movie year on CLI tool
- feat: add new TODO
- feat: Bump project dependencies
- fix: Move @type library to dev dependencies
- docs: Add support table to main readme
- feat: Use prettier for markdown files
- feat: Decrease random delay between 4s and 6s
- test: Increase test timeout for vitest
- refactor: Improve warn log for missing realease group
- feat: Add new TODO for another
- feat: Add vitest coverage needed dependencies
- fix: Remove console logs
- feat: Add coverage folder to gitignore
- fix: Change vitest config filename
- fix: Double up testTimeout to fix YTS get movie test call
- fix: Rename test file to match underlying fn call
- feat: Clean lockfile. Decrease project version. Add nvmrc use script
- test: Fix os tests to check if subtitleLink is a string since this always changes
- feat: Add file to use recommended node version
- feat: Fix fn name calls. Export fn supabase env variables
- feat: Add mock service worker dependency
- test: Add tests for file name extension
- feat: Short fn naming
- test: Add tests for release and subtitle groups
- feat: Play sound when a subtitle is found
- test: Add extra unit test for open subtitles
- feat: Add OpenSubtitles unit tests. Rename subtitle getters fns.
- refactor: Comment url shortener to a minute
- fix: Change getFullImdbId parameters type definitions to number
- fix: Format test files through Rome
- test: Add imdb helpers unit tests
- refactor: Add code comments and missing type definitions
- feat: Improve OpenSubtitles environment variables parsing
- feat: Improve environment variable parsing for supabase
- feat: Add TODO to indexer
- feat: Add missing dev dependency. Bump dependencies.
- feat: Improve CLI by a lot
- fix: Avoid supabase warning by disabling session persist
- feat: Enable back subdivx and argenteam for indexing
- feat: Ignore video mp4 files
- feat: Add clack prompts. Bump dependencies.
- feat: Add new TODO
- feat: Create a single instance of supabase client
- feat: Add new support table
- feat: Return specific searchableOpenSubtitlesName for each release group
- feat: Use new getImdbLink helper
- feat: Improve filtering OS subtitles by release group and resolution
- feat: Add searchable OS name
- feat: Add helper to create imdb full link
- feat: Handle downloading SRT files
- fix: Remove try/catch block from OpenSubtitles
- feat: Add zod schemas for OpenSubtitles
- feat: Use subtitle group name instead of hardcoding it
- feat: Add OpenSubtitles data
- feat: Add new TODO
- feat: Use stripped down version of imdbId
- fix: dev script in package json
- feat: Bump dependencies
- feat: Rename app to indexer. Add cli file.
- feat: Add initial support for OpenSubtitles
- feat: remove downloaded files when are no longer needed. return file to download from supabase
- refactor: single-line type definitions
- feat: add fileName and fileNameExtension to Subtitles table
- feat: Add TODO comment to App
- feat: add new TODOs to app
- feat: Add TODO. Add console warning when release group is not supported.
- refactor: General refactor to the whole project
- feat: added support table in Notion
- feat: added support table in Notion
- feat: added support table in Notion
- feat: added support table in Notion
- feat: bump timeout for vitest
- feat: use HTTPS for argenteam API
- feat: use HTTPS for argenteam API
- feat: use HTTPS for argenteam API
- feat: use HTTPS for argenteam API
- feat: Add type checking, ts-reset. Fix type definitions.
- feat: Bump dependencies. Add TODOs.
- feat: Integrate Argenteam into indexer
- feat: improve argenteam to integrate later on into indexer. add support to rightnow.
- feat: add TODOs to argenteam
- feat: add Argenteam subtitle getter function
- fix: YTS movie and torrent date uploaded schemas are optional
- fix: save movie name without year in it
- feat: add zod schemas for YTS-MX API. bump dependencies
- feat: add TODO for zod schemas
- feat: add new TODO
- feat: avoid getting subtitles for movies already fetched
- feat: add Rome for linting and formatting
- fix: lint-staged with vitest
- feat: add supabase type definitions. bump dependencies
- feat: Add SubtitleGroups table
- feat: Add Release Groups data
- feat: Update vitest dependency
- fix: Update lockfile
- feat: Add unit tests. Separate logic into specific files.
- feat: demo husky
- feat: demo husky
- feat: demo husky
- feat: demo husky
- feat: demo husky
- feat: demo husky
- feat: run test on any filechange
- feat: run test on any filechange
- feat: run test on any filechange
- feat: add lint-staged to test on precommit
- docs: Add diagrams links
- refactor: Replace lodash for custom array utility
- feat: Rename indexer for specific release group
- feat: Add npm libraries
- feat: Add TODOs items
- feat: Re-organize TODOs
- feat: Improve type definitions for all fns
- feat: Add TypeScript and missing type definitions
- feat: Add complete TSConfig file
- feat: Add support for replaceAll for tsconfig
- feat: Add more tests for getMovieData
- feat: Add initial tests for getMovieData
- feat: Handle more than one page in subdivx
- feat: Add code comments
- feat: Improve code comments for indexer
- feat: Add initial MVP for indexer
- feat: Add initial MVP
- Initial commit
  • Loading branch information
lndgalante committed Oct 17, 2024
1 parent ddaaed6 commit 4496562
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 0 deletions.
23 changes: 23 additions & 0 deletions extensions/subtis/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Supabase
SUPABASE_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InllbGhzbW52Znl5anVhbXhib2JzIiwicm9sZSI6ImFub24iLCJpYXQiOjE2ODY2MTg5MzQsImV4cCI6MjAwMjE5NDkzNH0.WqFO7dB6HzRjwJkeUwW-fNM730TMQ2Dy3IGCOhKplq8
SUPABASE_BASE_URL=https://yelhsmnvfyyjuamxbobs.supabase.co

# OpenSubtitles
OPEN_SUBTITLES_API_KEY=Slewkfq9HLFn8Xnl8bYqElDNsuWJymnG

# YouTube
YOUTUBE_API_KEY=AIzaSyAg0myBo7ZbDuwvVF8rAEqf3TJ9W-NYens

# TMDB
TMDB_API_KEY=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI1OWQzMTc0MjM1OTUzYzUzMmNhZjUzZjIzYzJkNGMzMCIsInN1YiI6IjViZDY3OTA5OTI1MTQxMDM5NjAzN2U1MyIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.Jgt15vr7N0PFptDVWYaHD_wIkJvxs9-YeMkePZR4AJM

# Resend
RESEND_API_KEY=re_99999999999999999999999999999999

# Subtis API
PUBLIC_API_BASE_URL_DEVELOPMENT=http://localhost:58602
PUBLIC_API_BASE_URL_PRODUCTION=https://api.subt.is

# Subtis WebSocket
PUBLIC_WEBSOCKET_BASE_URL_DEVELOPMENT=ws://localhost:3000
PUBLIC_WEBSOCKET_BASE_URL_PRODUCTION=https://socketdex.subt.is
3 changes: 3 additions & 0 deletions extensions/subtis/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"root": true
}
10 changes: 10 additions & 0 deletions extensions/subtis/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules

# Raycast specific files
raycast-env.d.ts

# misc
.DS_Store
3 changes: 3 additions & 0 deletions extensions/subtis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Subtis Changelog

## [Initial Version] - 2023-10-08
1 change: 1 addition & 0 deletions extensions/subtis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Subtis
Binary file added extensions/subtis/assets/command-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions extensions/subtis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$schema": "https://www.raycast.com/schemas/extension.json",
"name": "subtis",
"title": "Subtis",
"description": "El subtítulo que buscabas",
"author": "lndgalante",
"license": "MIT",
"icon": "command-icon.png",
"version": "0.3.0",
"commands": [
{
"name": "index",
"title": "Buscar subtítulo",
"description": "Encontra el subtítulo que buscas",
"mode": "view"
}
],
"scripts": {
"build": "ray build -e dist",
"dev": "ray develop",
"fix-lint": "ray lint --fix",
"lint": "ray lint",
"publish": "npx @raycast/api@latest publish"
},
"dependencies": {
"@raycast/api": "^1.84.3",
"node-fetch": "^3.3.2",
"ws": "^8.18.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@raycast/eslint-config": "1.0.11",
"@types/bun": "^1.1.11",
"@types/node": "22.7.6",
"@types/node-fetch": "^2.6.11",
"@types/react": "18.3.11",
"typescript": "^5.6.3"
}
}
237 changes: 237 additions & 0 deletions extensions/subtis/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
import { Action, ActionPanel, Form, Toast, open, showToast } from "@raycast/api";
import { stat } from "fs/promises";
import fetch from "node-fetch";
import WebSocket from "ws";
import { z } from "zod";

// api
import { type SubtisSubtitle, subtitleSchema } from "@subtis/api/shared/schemas";

// shared
import { getFilenameFromPath, getMessageFromStatusCode, getVideoFileExtension } from "@subtis/shared";

// types
type Values = {
filePicker: string[];
};

// constants
const isProduction = process.env.NODE_ENV === "production";
const API_URL = isProduction ? "https://api.subt.is" : "http://localhost:58602";

// schemas
const wsMessageSchema = z.object({
total: z.number(),
message: z.string(),
});

const wsOkSchema = z.object({
ok: z.boolean(),
});

// types
type WsOk = z.infer<typeof wsOkSchema>;

// helpers
async function getPrimarySubtitle({
bytes,
fileName,
}: {
bytes: string;
fileName: string;
}): Promise<SubtisSubtitle | null> {
const response = await fetch(`${API_URL}/v1/subtitle/file/name/${bytes}/${fileName}`);

if (response.status === 404) {
return null;
}

if (!response.ok) {
throw new Error("Failed to fetch primary subtitle", { cause: response.status });
}

const data = await response.json();
const primarySubtitle = subtitleSchema.parse(data);

fetch(`${API_URL}/v1/metrics/download`, {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ bytes, titleFileName: fileName }),
});

return primarySubtitle;
}

export async function getAlternativeSubtitle({ fileName }: { fileName: string }): Promise<SubtisSubtitle> {
const response = await fetch(`${API_URL}/v1/subtitle/file/alternative/${fileName}`);

if (!response.ok) {
throw new Error("Failed to fetch alternative subtitle", { cause: response.status });
}

const data = await response.json();
const alternativeSubtitle = subtitleSchema.parse(data);

fetch(`${API_URL}/v1/metrics/download`, {
method: "PATCH",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ bytes: alternativeSubtitle.bytes, titleFileName: alternativeSubtitle.title_file_name }),
});

return alternativeSubtitle;
}

async function downloadSubtitle(toast: Toast, subtitle: SubtisSubtitle) {
Object.assign(toast, {
message: "Descargando subtitulo...",
style: Toast.Style.Animated,
title: "Subtitulo encontrado!",
});

await open(subtitle.subtitle_link);

Object.assign(toast, {
message: "Encontralo en Descargas",
style: Toast.Style.Success,
title: "Subtitulo descargado!",
});
}

export default function Command() {
// handlers
async function handleSubmit(values: Values) {
const toast = await showToast({
style: Toast.Style.Animated,
title: "Buscando subtítulos",
});

try {
const [file] = values.filePicker;

const fileStats = await stat(file);
const bytes = fileStats.size;

const fileName = getFilenameFromPath(file);
const videoFileExtension = getVideoFileExtension(fileName);
const videoFileExtensionParsed = z.string().safeParse(videoFileExtension);

if (!videoFileExtensionParsed.success) {
Object.assign(toast, {
message: "Extension de video no soportada.",
style: Toast.Style.Failure,
title: "Error de extensión",
});
return;
}

const primarySubtitle = await getPrimarySubtitle({ bytes: String(bytes), fileName });

if (primarySubtitle) {
return await downloadSubtitle(toast, primarySubtitle);
}

const websocketData = await new Promise<WsOk>((resolve) => {
const ws = new WebSocket("https://socketdex.subt.is");

ws.on("open", () => {
Object.assign(toast, {
style: Toast.Style.Animated,
title: "Buscando subtítulo en tiempo real",
});

const message = {
subtitle: {
bytes: Number(bytes),
titleFileName: fileName,
},
};

ws.send(JSON.stringify(message));
});

ws.on("message", (messageEvent: Buffer) => {
const data = messageEvent.toString();
const parsedData = JSON.parse(data);

const okSafeParsed = wsOkSchema.safeParse(parsedData);
const messageSafeParsed = wsMessageSchema.safeParse(parsedData);

if (okSafeParsed.success && okSafeParsed.data.ok === true) {
resolve(okSafeParsed.data);
}

if (okSafeParsed.success && okSafeParsed.data.ok === false) {
Object.assign(toast, {
message: "",
style: Toast.Style.Failure,
title: "Falla en tiempo real",
});
resolve(okSafeParsed.data);
}

if (messageSafeParsed.success) {
Object.assign(toast, {
message: `${messageSafeParsed.data.total * 100}%`,
style: Toast.Style.Animated,
title: "Buscando subtítulo...",
});
}
});

ws.on("error", () => {
resolve({ ok: false });
});
});

if (websocketData.ok === true) {
const primarySubtitle = await getPrimarySubtitle({ bytes: String(bytes), fileName });

if (primarySubtitle) {
return await downloadSubtitle(toast, primarySubtitle);
}
}

const alternativeSubtitle = await getAlternativeSubtitle({ fileName });

if (alternativeSubtitle) {
return await downloadSubtitle(toast, alternativeSubtitle);
}

Object.assign(toast, {
message: "Estamos trabajando en ello.",
style: Toast.Style.Failure,
title: "Subtitulo no encontrado",
});
} catch (error) {
if (error instanceof Error && typeof error.cause === "number") {
const { description, title } = getMessageFromStatusCode(error.cause);
Object.assign(toast, {
title,
message: description,
style: Toast.Style.Failure,
});
return;
}

if (error instanceof Error) {
Object.assign(toast, {
message: error.message,
style: Toast.Style.Failure,
title: "Error interno",
});
}
}
}

return (
<Form
actions={
<ActionPanel>
<Action.SubmitForm onSubmit={handleSubmit} />
</ActionPanel>
}
>
<Form.FilePicker allowMultipleSelection={false} id="filePicker" title="Buscar subtitulo para" />
</Form>
);
}
17 changes: 17 additions & 0 deletions extensions/subtis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Node 18",
"compilerOptions": {
"target": "es2021",
"jsx": "react-jsx",
"lib": ["es2021"],
"module": "commonjs",
"resolveJsonModule": true,
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src/**/*", "raycast-env.d.ts"]
}

0 comments on commit 4496562

Please sign in to comment.