Skip to content

tollywood#3

Open
sanjaysargam wants to merge 1 commit intouwumilabs:mainfrom
sanjaysargam:tollywood
Open

tollywood#3
sanjaysargam wants to merge 1 commit intouwumilabs:mainfrom
sanjaysargam:tollywood

Conversation

@sanjaysargam
Copy link
Copy Markdown

@sanjaysargam sanjaysargam commented Feb 13, 2026

Pull Request Description

Please provide a clear and concise description of the changes introduced by this pull request. Explain the what and why behind your changes.

Closes #[issue_number] (if applicable)


Type of Change

Please check the type of change your PR introduces:

  • Bugfix (A change that fixes an issue)
  • New Feature (A change that adds new functionality)
  • New Provider (A change that adds a new content provider)
  • Code Style Update (Formatting, semicolons, etc.; no code change)
  • Refactoring (A change that neither fixes a bug nor adds a feature)
  • Build-related changes (Changes to build scripts, dependencies, etc.)
  • Documentation Update (Changes to documentation files)
  • Other (Please describe below)

Breaking Change

Does this PR introduce a breaking change?

  • Yes
  • No

If 'Yes', please describe the impact and migration path for existing applications:


How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Unit tests (e.g., yarn test)
  • Manual testing on:
    • iOS
    • Android
  • Other (Please describe below)

Test Configuration:

  • React Native Version: [e.g., 0.72.0]
  • Device/Emulator: [e.g., iPhone 14 Pro, Android Emulator API 33]

Screenshots / Gifs (Optional)

If your changes include UI updates or visual enhancements, please provide screenshots or GIFs here.


PR Checklist

Before submitting your pull request, please ensure the following:

  • My code follows the style guidelines of this project (run yarn lint and yarn format).
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where necessary.
  • My changes generate no new warnings or errors.
  • I have added tests that prove my fix is effective or that my feature works.
  • All existing and new tests pass.
  • I have run the build process (yarn build) and confirmed no issues.

Further Comments / Notes (Optional)

Add any additional context or notes about the pull request here.

Summary by CodeRabbit

  • New Features
    • Added Tollywood movie provider supporting Telugu, Hindi, and English language content
    • Search movies by title to discover Tollywood films
    • Browse featured and yearly categorized movie collections
    • Multi-server streaming support with integrated extraction options
    • Fetch detailed movie information including descriptions, genres, and release dates

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

This pull request adds a new Tollywood (Telugu-language movies) provider to the registry. The implementation includes provider factory function, wrapper class, registry entry, index exports, provider map configuration, and test files covering search, featured content, and media information fetching.

Changes

Cohort / File(s) Summary
Registry & Configuration
src/extension-registry.json, src/utils/provider-maps.ts
Added Tollywood extension entry with metadata (author, version, category, extractors, servers) and lazy-loaded provider getter in movie providers map.
Provider Index & Exports
src/providers/movies/index.ts
Imported and exported Tollywood provider class and createTollywood factory function to expose at module level.
Provider Implementation
src/providers/movies/tollywood/create-tollywood.ts
Implemented createTollywood factory function with core provider methods (search, fetchMediaInfo, fetchEpisodeServers, fetchEpisodeSources, fetchLatestMovies) and Tollywood-specific methods (fetchTeluguFeatured, fetchTeluguByYear) including HTML scraping, parsing, and server enumeration logic.
Provider Wrapper
src/providers/movies/tollywood/tollywood.ts
Added Tollywood class for backward compatibility that wraps the factory function instance and delegates all provider methods and metadata.
Tests
src/providers/movies/tollywood/test.ts, test-tollywood.js
Created TypeScript and JavaScript test files exercising latest movies, featured content search, and media information fetching with structured logging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A hop through the Telugu tales unfolds,
Tollywood's magic now in our hands,
With featured films and searches so bold,
New servers bloom across digital lands,
From MovieRulz to our code it stands!

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'tollywood' is extremely vague and generic, providing no meaningful information about what the changeset accomplishes. Rename the title to something descriptive like 'Add Tollywood movie provider' or 'Implement Tollywood provider with search and fetch capabilities' to clearly communicate the main change.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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: 8

🤖 Fix all issues with AI agents
In `@src/extension-registry.json`:
- Around line 158-179: The tollywood extension entry (id "tollywood") marks a
frequently changing MovieRulz domain as "stable"; change "status" to "beta" or
"alpha" to reflect fragility and add a small metadata flag like
"domainStability": "volatile" or "note": "baseUrl may change frequently" so
consumers know to expect updates, and ensure any future domain rotations update
"baseUrl" and "lastUpdated" when you replace the endpoint.

In `@src/providers/movies/tollywood/create-tollywood.ts`:
- Around line 396-430: The current server-branch handlers in create-tollywood.ts
return serverData.url directly (notably the vcdnlare, uperbox, dropress branches
inside the code that checks serverData.url) and even hard-code isM3U8: true for
vcdnlare; implement proper source extraction for each of these hosters (parse
their actual embed/player URLs, fetch and resolve m3u8 or direct stream links,
and set isM3U8 correctly) inside the same conditional blocks that now return raw
URLs, or if you cannot support them, update the provider metadata (the registry
flag haveMultiServers) and add clear fallback behavior/logging so consumers know
only StreamTape is supported rather than returning non-playable URLs.
- Around line 339-344: The fallback that always pushes a StreamTape entry inside
fetchEpisodeServers makes the servers array never empty and thus renders the
servers.length === 0 guard in fetchEpisodeSources unreachable; remove the
unconditional fallback from fetchEpisodeServers (the block that pushes { name:
'StreamTape', url }) so fetchEpisodeServers can return an empty array when
nothing was found, and if you still want a fallback keep that logic inside
fetchEpisodeSources after calling fetchEpisodeServers (i.e., check if servers is
empty there and then insert the StreamTape fallback) so callers can distinguish
"no real servers found" from "fallback used."
- Around line 59-88: Extract the repeated movie-parsing block into a single
helper function, e.g. parseMovieListings($: CheerioAPI, baseUrl: string):
IMovieResult[], and replace the duplicated code in search, fetchTeluguFeatured,
fetchTeluguByYear, and fetchLatestMovies with calls to this helper; the helper
should iterate $('div[id^="post-"]'), find h2/a/img, extract title, url and
image, normalize image to absolute only when it startsWith('http'), derive
movieId by stripping baseUrl and leading/trailing slashes, parse a four-digit
year with /\((\d{4})\)/, apply a consistent cleaning regex that includes
HDRip|DVDScr|BRRip|DVDRip|WebRip|CAM|HDTS|Telugu|Hindi|Dubbed|Movie|Watch Online
Free, trim the title, set releaseDate to the parsed year and type to
TvTypeEnum.MOVIE, and return the IMovieResult[] so callers push/assign the
results instead of duplicating parsing logic.
- Line 370: The code unconditionally constructs serverUrl from serverData.url
which can throw for non-StreamTape servers; move the URL construction into the
StreamTape branch so serverUrl is only created when calling
streamTapeExtractor.extract(serverUrl). Update the branch that calls
streamTapeExtractor.extract to build const serverUrl = new URL(serverData.url)
just before that call and remove the unconditional const serverUrl declaration.

In `@src/providers/movies/tollywood/test.ts`:
- Line 3: The import createProviderContext is unused in the test file; remove
the unused import statement (the import of createProviderContext) from the top
of src/providers/movies/tollywood/test.ts, or if it was intended for setup,
replace the unused import by invoking createProviderContext where needed (e.g.,
in your test setup or beforeEach) so the symbol is actually used; ensure no
other references remain to avoid lint errors.

In `@test-tollywood.js`:
- Around line 17-21: The console.log currently builds the printed image string
using optional chaining then concatenation which yields "undefined..." when
latest[0].image is undefined; update the formatting in the console.log (the
block that references latest[0].id, latest[0].title, latest[0].image) to
conditionally build the truncated image string—e.g., if latest[0].image is
present return latest[0].image.substring(0,50) + '...' otherwise return
null/empty string or a sentinel like '<no image>'—so you avoid concatenating
'...' to undefined.
- Around line 1-3: Remove the unused import createProviderContext from
test-tollywood.js: locate the require that destructures createProviderContext
(const { createProviderContext } =
require('./dist/utils/create-provider-context').default;) and delete that part
so only the Tollywood provider import remains (keep the Tollywood require). This
eliminates the unused symbol createProviderContext and avoids confusing dead
imports.
🧹 Nitpick comments (3)
src/providers/movies/tollywood/create-tollywood.ts (1)

298-323: Greedy URL regex may capture unintended URLs from inline scripts.

/https?:\/\/[^"'\s<>]+/gi will match every URL in every <script> block, then the filter relies on substring checks (streamtape, vcdnlare, etc.) to keep only streaming links. This is fragile — ad-network or analytics URLs containing those substrings would produce false-positive server entries. Consider anchoring to known iframe/embed patterns or at least validating the matched URL has a recognisable streaming path segment.

test-tollywood.js (1)

7-51: This is a manual console-log test script with no assertions — consider using a proper test framework instead.

The script only logs output and catches errors silently. It cannot fail a CI pipeline and provides no regression safety. If this is meant for local debugging only, it should live outside the repo root (or in a scripts/ directory); if it's meant as a test, it should use the project's test runner with real assertions.

src/providers/movies/tollywood/test.ts (1)

5-50: This file duplicates test-tollywood.js and has the same lack of assertions.

Both this file and test-tollywood.js are console-log-only scripts with no test framework assertions. "All tests passed!" on line 43 is misleading since nothing is actually validated. Consider consolidating into a single test file using the project's test framework with real assertions (expect/assert), or remove one of the duplicates.

Comment on lines +158 to 179
{
"id": "tollywood",
"name": "Tollywood",
"description": "Telugu and Tollywood movies streaming from MovieRulz with multiple servers",
"version": "1.0.0",
"author": {
"name": "RNConsumet Team",
"url": "https://github.com/uwumilabs"
},
"category": "movies",
"main": "https://raw.githubusercontent.com/uwumilabs/react-native-consumet/refs/heads/main/dist/providers/movies/tollywood/create-tollywood.js",
"factoryName": "createTollywood",
"baseUrl": "https://www.5movierulz.tires",
"logo": "https://www.5movierulz.tires/favicon.ico",
"languages": ["te", "hi", "en"],
"nsfw": false,
"status": "stable",
"lastUpdated": "2025-08-05T00:00:00Z",
"extractors": ["StreamTape"],
"isSourceEmbed": true,
"haveMultiServers": true
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Domain stability concern: 5movierulz.tires is likely to change frequently.

MovieRulz sites are well-known for frequent domain changes. Setting "status": "stable" may be premature — consider "alpha" or "beta" to signal the inherent fragility. The baseUrl will likely need updates soon.

🤖 Prompt for AI Agents
In `@src/extension-registry.json` around lines 158 - 179, The tollywood extension
entry (id "tollywood") marks a frequently changing MovieRulz domain as "stable";
change "status" to "beta" or "alpha" to reflect fragility and add a small
metadata flag like "domainStability": "volatile" or "note": "baseUrl may change
frequently" so consumers know to expect updates, and ensure any future domain
rotations update "baseUrl" and "lastUpdated" when you replace the endpoint.

Comment on lines +59 to +88
$('div[id^="post-"]').each((_idx, el) => {
const titleElement = $(el).find('h2');
const linkElement = $(el).find('a');
const imageElement = $(el).find('img');

const title = titleElement.text().trim();
const url = linkElement.attr('href');
const image = imageElement.attr('src') || imageElement.attr('data-src');

const yearMatch = title.match(/\((\d{4})\)/);
const year = yearMatch ? yearMatch[1] : undefined;

const cleanTitle = title
.replace(/\s*\(\d{4}\)\s*/g, '')
.replace(/\s*(HDRip|DVDScr|BRRip|DVDRip|WebRip|CAM|HDTS|Telugu|Hindi|Dubbed|Movie|Watch Online Free)\s*/g, '')
.trim();

if (url && cleanTitle) {
const movieId = url.replace(config.baseUrl, '').replace(/^\/+/, '').replace(/\/$/, '');

searchResult.results.push({
id: movieId,
title: cleanTitle,
url: url.startsWith('http') ? url : `${config.baseUrl}/${url}`,
image: image?.startsWith('http') ? image : undefined,
releaseDate: year,
type: TvTypeEnum.MOVIE,
});
}
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Extract the shared movie-parsing logic into a helper function.

The same parsing block (find h2/a/img, extract title, clean it, build IMovieResult) is duplicated nearly verbatim across search, fetchTeluguFeatured, fetchTeluguByYear, and fetchLatestMovies. The only differences are the title-cleaning regex (which itself is inconsistently missing "Hindi" and "Dubbed" in some methods).

A single parseMovieListings($: CheerioAPI, baseUrl: string): IMovieResult[] helper would eliminate ~80 lines of duplication and ensure consistent title cleaning everywhere.

♻️ Example helper extraction
+ /**
+  * Parse movie listings from a cheerio-loaded page.
+  */
+ function parseMovieListings($: ReturnType<typeof load>): IMovieResult[] {
+   const results: IMovieResult[] = [];
+   $('div[id^="post-"]').each((_idx, el) => {
+     const title = $(el).find('h2').text().trim();
+     const url = $(el).find('a').attr('href');
+     const image = $(el).find('img').attr('src') || $(el).find('img').attr('data-src');
+
+     const yearMatch = title.match(/\((\d{4})\)/);
+     const year = yearMatch ? yearMatch[1] : undefined;
+
+     const cleanTitle = title
+       .replace(/\s*\(\d{4}\)\s*/g, '')
+       .replace(/\s*(HDRip|DVDScr|BRRip|DVDRip|WebRip|CAM|HDTS|Telugu|Hindi|Dubbed|Movie|Watch Online Free)\s*/gi, '')
+       .trim();
+
+     if (url && cleanTitle) {
+       const movieId = url.replace(config.baseUrl, '').replace(/^\/+/, '').replace(/\/$/, '');
+       results.push({
+         id: movieId,
+         title: cleanTitle,
+         url: url.startsWith('http') ? url : `${config.baseUrl}/${url}`,
+         image: image?.startsWith('http') ? image : undefined,
+         releaseDate: year,
+         type: TvTypeEnum.MOVIE,
+       });
+     }
+   });
+   return results;
+ }

Also applies to: 114-143, 169-195, 456-485

🤖 Prompt for AI Agents
In `@src/providers/movies/tollywood/create-tollywood.ts` around lines 59 - 88,
Extract the repeated movie-parsing block into a single helper function, e.g.
parseMovieListings($: CheerioAPI, baseUrl: string): IMovieResult[], and replace
the duplicated code in search, fetchTeluguFeatured, fetchTeluguByYear, and
fetchLatestMovies with calls to this helper; the helper should iterate
$('div[id^="post-"]'), find h2/a/img, extract title, url and image, normalize
image to absolute only when it startsWith('http'), derive movieId by stripping
baseUrl and leading/trailing slashes, parse a four-digit year with
/\((\d{4})\)/, apply a consistent cleaning regex that includes
HDRip|DVDScr|BRRip|DVDRip|WebRip|CAM|HDTS|Telugu|Hindi|Dubbed|Movie|Watch Online
Free, trim the title, set releaseDate to the parsed year and type to
TvTypeEnum.MOVIE, and return the IMovieResult[] so callers push/assign the
results instead of duplicating parsing logic.

Comment on lines +339 to +344
if (servers.length === 0) {
servers.push({
name: 'StreamTape',
url,
});
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unreachable "no servers" check due to fallback.

The fallback at lines 339-344 in fetchEpisodeServers guarantees servers.length >= 1 on return. This makes the servers.length === 0 guard at line 363 in fetchEpisodeSources dead code — it will never throw.

If the intent is to surface a real "no servers found" error, the fallback should be removed (or moved into fetchEpisodeSources as a last resort), so that callers can distinguish between "found real servers" and "found nothing."

Also applies to: 362-365

🤖 Prompt for AI Agents
In `@src/providers/movies/tollywood/create-tollywood.ts` around lines 339 - 344,
The fallback that always pushes a StreamTape entry inside fetchEpisodeServers
makes the servers array never empty and thus renders the servers.length === 0
guard in fetchEpisodeSources unreachable; remove the unconditional fallback from
fetchEpisodeServers (the block that pushes { name: 'StreamTape', url }) so
fetchEpisodeServers can return an empty array when nothing was found, and if you
still want a fallback keep that logic inside fetchEpisodeSources after calling
fetchEpisodeServers (i.e., check if servers is empty there and then insert the
StreamTape fallback) so callers can distinguish "no real servers found" from
"fallback used."

const serverData =
servers.find(s => s.name.toLowerCase() === server.toLowerCase()) || servers[0]!;

const serverUrl = new URL(serverData.url);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

serverUrl is created but never used.

const serverUrl = new URL(serverData.url); allocates a URL object that is only passed to streamTapeExtractor.extract(serverUrl) on one branch, but it's constructed unconditionally. If serverData.url is malformed for non-StreamTape servers, this will throw an unhandled TypeError before reaching the correct branch.

🐛 Proposed fix: move URL construction inside the StreamTape branch
-     const serverUrl = new URL(serverData.url);
-
      if (serverData.url.includes('streamtape.com') || serverData.url.includes('streamtape')) {
        try {
          if (!StreamTape) {
            throw new Error('StreamTape extractor not available');
          }
          const streamTapeExtractor = new StreamTape();
-         const sources = await streamTapeExtractor.extract(serverUrl);
+         const sources = await streamTapeExtractor.extract(new URL(serverData.url));
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const serverUrl = new URL(serverData.url);
if (serverData.url.includes('streamtape.com') || serverData.url.includes('streamtape')) {
try {
if (!StreamTape) {
throw new Error('StreamTape extractor not available');
}
const streamTapeExtractor = new StreamTape();
const sources = await streamTapeExtractor.extract(new URL(serverData.url));
}
}
🤖 Prompt for AI Agents
In `@src/providers/movies/tollywood/create-tollywood.ts` at line 370, The code
unconditionally constructs serverUrl from serverData.url which can throw for
non-StreamTape servers; move the URL construction into the StreamTape branch so
serverUrl is only created when calling streamTapeExtractor.extract(serverUrl).
Update the branch that calls streamTapeExtractor.extract to build const
serverUrl = new URL(serverData.url) just before that call and remove the
unconditional const serverUrl declaration.

Comment on lines +396 to +430
if (serverData.url.includes('vcdnlare')) {
return {
headers: { Referer: config.baseUrl },
sources: [
{
url: serverData.url,
isM3U8: true,
},
],
};
}

if (serverData.url.includes('uperbox')) {
return {
headers: { Referer: config.baseUrl },
sources: [
{
url: serverData.url,
isM3U8: serverData.url.includes('.m3u8'),
},
],
};
}

if (serverData.url.includes('dropress')) {
return {
headers: { Referer: config.baseUrl },
sources: [
{
url: serverData.url,
isM3U8: serverData.url.includes('.m3u8'),
},
],
};
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

All non-StreamTape server branches return a raw page URL without actual source extraction.

For vcdnlare, uperbox, dropress, and the default fallback, the code returns serverData.url directly as a video source without any extraction logic. The vcdnlare branch additionally hard-codes isM3U8: true, which may not always be correct. These stubs mean the provider effectively only works for StreamTape; the other "servers" will likely yield non-playable URLs.

Consider either implementing extraction for the additional servers or clearly documenting that only StreamTape is functional (and adjusting haveMultiServers accordingly in the registry).

🤖 Prompt for AI Agents
In `@src/providers/movies/tollywood/create-tollywood.ts` around lines 396 - 430,
The current server-branch handlers in create-tollywood.ts return serverData.url
directly (notably the vcdnlare, uperbox, dropress branches inside the code that
checks serverData.url) and even hard-code isM3U8: true for vcdnlare; implement
proper source extraction for each of these hosters (parse their actual
embed/player URLs, fetch and resolve m3u8 or direct stream links, and set isM3U8
correctly) inside the same conditional blocks that now return raw URLs, or if
you cannot support them, update the provider metadata (the registry flag
haveMultiServers) and add clear fallback behavior/logging so consumers know only
StreamTape is supported rather than returning non-playable URLs.

@@ -0,0 +1,50 @@
// Test file for Tollywood provider
import Tollywood from './tollywood';
import { createProviderContext } from '../../../utils';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unused import: createProviderContext is imported but never used.

Proposed fix
 import Tollywood from './tollywood';
-import { createProviderContext } from '../../../utils';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { createProviderContext } from '../../../utils';
import Tollywood from './tollywood';
🤖 Prompt for AI Agents
In `@src/providers/movies/tollywood/test.ts` at line 3, The import
createProviderContext is unused in the test file; remove the unused import
statement (the import of createProviderContext) from the top of
src/providers/movies/tollywood/test.ts, or if it was intended for setup, replace
the unused import by invoking createProviderContext where needed (e.g., in your
test setup or beforeEach) so the symbol is actually used; ensure no other
references remain to avoid lint errors.

Comment on lines +1 to +3
// Simple test for Tollywood provider
const { createProviderContext } = require('./dist/utils/create-provider-context').default;
const Tollywood = require('./dist/providers/movies/tollywood/tollywood').default;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Unused import: createProviderContext is never referenced.

Line 2 destructures createProviderContext from the dist output but it's never used in the file. Remove it to avoid confusion.

Proposed fix
 // Simple test for Tollywood provider
-const { createProviderContext } = require('./dist/utils/create-provider-context').default;
 const Tollywood = require('./dist/providers/movies/tollywood/tollywood').default;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Simple test for Tollywood provider
const { createProviderContext } = require('./dist/utils/create-provider-context').default;
const Tollywood = require('./dist/providers/movies/tollywood/tollywood').default;
// Simple test for Tollywood provider
const Tollywood = require('./dist/providers/movies/tollywood/tollywood').default;
🤖 Prompt for AI Agents
In `@test-tollywood.js` around lines 1 - 3, Remove the unused import
createProviderContext from test-tollywood.js: locate the require that
destructures createProviderContext (const { createProviderContext } =
require('./dist/utils/create-provider-context').default;) and delete that part
so only the Tollywood provider import remains (keep the Tollywood require). This
eliminates the unused symbol createProviderContext and avoids confusing dead
imports.

Comment on lines +17 to +21
console.log(' First movie:', {
id: latest[0].id,
title: latest[0].title,
image: latest[0].image?.substring(0, 50) + '...',
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

String concatenation with potentially undefined value yields "undefined...".

When latest[0].image is undefined, the optional chain returns undefined, and undefined + '...' produces the string "undefined...".

Proposed fix
-        image: latest[0].image?.substring(0, 50) + '...',
+        image: latest[0].image ? latest[0].image.substring(0, 50) + '...' : 'N/A',
🤖 Prompt for AI Agents
In `@test-tollywood.js` around lines 17 - 21, The console.log currently builds the
printed image string using optional chaining then concatenation which yields
"undefined..." when latest[0].image is undefined; update the formatting in the
console.log (the block that references latest[0].id, latest[0].title,
latest[0].image) to conditionally build the truncated image string—e.g., if
latest[0].image is present return latest[0].image.substring(0,50) + '...'
otherwise return null/empty string or a sentinel like '<no image>'—so you avoid
concatenating '...' to undefined.

Copy link
Copy Markdown

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 pull request adds a new Tollywood movie provider to the react-native-consumet library, enabling users to stream Telugu, Hindi, and English movies from the 5movierulz.tires website. The provider follows the established architectural pattern used by other movie providers in the codebase, implementing both a functional factory pattern (create-tollywood.ts) and a wrapper class (tollywood.ts) for backward compatibility.

Changes:

  • Added new Tollywood provider supporting Telugu/Tollywood movie streaming with multi-server support (StreamTape, VcdnLare, UperBox, DoodStream, etc.)
  • Integrated provider into the existing infrastructure through provider maps, index files, and extension registry
  • Included test files demonstrating provider functionality (though not following established conventions)

Reviewed changes

Copilot reviewed 7 out of 33 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/providers/movies/tollywood/create-tollywood.ts Core provider implementation with search, media info, and streaming source extraction
src/providers/movies/tollywood/tollywood.ts Backward-compatible wrapper class extending MovieParser
src/providers/movies/tollywood/test.ts Test file demonstrating provider usage (non-standard location)
test-tollywood.js Root-level test script for provider validation
src/providers/movies/index.ts Added Tollywood imports and exports
src/utils/provider-maps.ts Registered Tollywood provider in movie providers map
src/extension-registry.json Added provider metadata for extension system
dist/* Compiled JavaScript output and type definitions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

};

/**
* Fetch Telugu featured movies
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The JSDoc comment is missing parameter descriptions. It should include @param page with a description following the codebase convention seen in other providers.

Suggested change
* Fetch Telugu featured movies
* Fetch Telugu featured movies
*
* @param page - The page number of featured movies to fetch

Copilot uses AI. Check for mistakes.
};

/**
* Fetch media info for a movie
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The JSDoc comment is missing parameter descriptions. It should include @param mediaId with a description following the codebase convention.

Suggested change
* Fetch media info for a movie
* Fetch media info for a movie
* @param mediaId Identifier or URL path for the movie whose media info should be fetched.

Copilot uses AI. Check for mistakes.
Comment on lines +352 to +359
/**
* Fetch episode sources (actual video URLs)
*/
const fetchEpisodeSources = async (
episodeId: string,
mediaId: string,
server: StreamingServers = StreamingServersEnum.StreamTape
): Promise<ISource> => {
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The JSDoc comment is missing parameter descriptions. It should include @param episodeId, @param mediaId, and @param server with descriptions following the codebase convention (e.g., himovies/create-himovies.ts lines 194-198).

Copilot uses AI. Check for mistakes.
match.includes('mixdrop') ||
match.includes('dood')
) {
const cleanUrl = match.replace(/[,\s"'"]$/, '');
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The regex pattern contains an error: it has both a single quote and a double quote character inside the character class, resulting in [,\s"'"] which includes an extra quote. This should be [,\s"'] to properly match commas, whitespace, single quotes, or double quotes at the end of the URL string.

Suggested change
const cleanUrl = match.replace(/[,\s"'"]$/, '');
const cleanUrl = match.replace(/[,\s"']$/, '');

Copilot uses AI. Check for mistakes.
const supportedTypes = new Set([TvTypeEnum.MOVIE]);

/**
* Search for Telugu/Tollywood movies
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The JSDoc comment is missing parameter descriptions. Based on patterns in the codebase (e.g., himovies/create-himovies.ts), JSDoc comments for provider methods should include parameter descriptions using @param tags. For example, this should include @param query and @param page with their descriptions.

Suggested change
* Search for Telugu/Tollywood movies
* Search for Telugu/Tollywood movies.
*
* @param query The search query string used to find matching Telugu/Tollywood movies.
* @param page The page number of search results to retrieve (defaults to 1).

Copilot uses AI. Check for mistakes.
}

/**
* Fetch episode servers (streaming sources)
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The JSDoc comment is missing parameter descriptions. It should include @param episodeId and @param _mediaId with descriptions following the codebase convention seen in other providers (e.g., himovies/create-himovies.ts lines 243-246).

Suggested change
* Fetch episode servers (streaming sources)
* Fetch episode servers (streaming sources)
* @param episodeId - Episode identifier or URL used to fetch streaming servers.
* @param _mediaId - Parent movie/media identifier (accepted for interface compatibility, not used).

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,50 @@
// Test file for Tollywood provider
import Tollywood from './tollywood';
import { createProviderContext } from '../../../utils';
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The import createProviderContext is unused in this test file. It should be removed to keep the imports clean.

Suggested change
import { createProviderContext } from '../../../utils';

Copilot uses AI. Check for mistakes.

$('iframe').each((_idx, el) => {
const src = $(el).attr('src');
if (src && (src.includes('streamtape') || src.includes('vcdnlare') || src.includes('uperbox') || src.includes('dropress'))) {
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The iframe server filtering is inconsistent with the script-based filtering above. The script-based filtering checks for 'vidshare', 'mixdrop', and 'dood' (lines 309-311), but the iframe filtering does not include these servers. This inconsistency means iframe sources for these servers will not be detected. Either add these servers to the iframe filtering condition, or document why they are intentionally excluded.

Suggested change
if (src && (src.includes('streamtape') || src.includes('vcdnlare') || src.includes('uperbox') || src.includes('dropress'))) {
if (
src &&
(
src.includes('streamtape') ||
src.includes('vcdnlare') ||
src.includes('uperbox') ||
src.includes('dropress') ||
src.includes('vidshare') ||
src.includes('mixdrop') ||
src.includes('dood')
)
) {

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +50
// Test file for Tollywood provider
import Tollywood from './tollywood';
import { createProviderContext } from '../../../utils';

async function testTollywood() {
console.log('Testing Tollywood Provider...');

const provider = new Tollywood();

try {
// Test 1: Fetch latest movies
console.log('\n=== Test 1: Fetch Latest Movies ===');
const latestMovies = await provider.fetchLatestMovies();
console.log(`Found ${latestMovies.length} movies`);
if (latestMovies.length > 0) {
console.log('First movie:', latestMovies[0]);
}

// Test 2: Fetch Telugu featured
console.log('\n=== Test 2: Fetch Telugu Featured ===');
const featured = await provider.fetchTeluguFeatured(1);
console.log(`Found ${featured.results.length} featured movies`);
console.log(`Has next page: ${featured.hasNextPage}`);

// Test 3: Search
console.log('\n=== Test 3: Search ===');
const searchResults = await provider.search('Baahubali');
console.log(`Found ${searchResults.results.length} search results`);

// Test 4: Fetch media info
if (latestMovies.length > 0) {
console.log('\n=== Test 4: Fetch Media Info ===');
const movieId = latestMovies[0]!.id;
console.log(`Fetching info for: ${movieId}`);
const mediaInfo = await provider.fetchMediaInfo(movieId);
console.log('Media info:', {
title: mediaInfo.title,
genres: mediaInfo.genres,
type: mediaInfo.type,
});
}

console.log('\n=== All tests passed! ===');
} catch (error) {
console.error('Test failed:', error);
}
}

// Run tests
testTollywood();
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Based on the codebase convention, provider test files should be located in the test/movies directory following the pattern used by other providers (e.g., test/movies/yflix.test.ts, test/movies/himovies.test.ts). The test files in src/providers/movies/tollywood/test.ts and the root test-tollywood.js don't follow this convention and should be moved/refactored to test/movies/tollywood.test.ts with proper Jest test structure using describe and test blocks.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,55 @@
// Simple test for Tollywood provider
const { createProviderContext } = require('./dist/utils/create-provider-context').default;
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

Unused variable createProviderContext.

Copilot uses AI. Check for mistakes.
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.

3 participants