Skip to content

Commit 2cba217

Browse files
authored
Merge pull request #40 from cinepro-org/dev
2 parents 57b315c + 3435797 commit 2cba217

10 files changed

Lines changed: 439 additions & 190 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
done <<< "$HASHES"
252252
253253
NOTES="## Release $CURRENT_TAG"$'\n\n'
254-
NOTES="${NOTES}Released at commit [\`${{ needs.prepare.outputs.app_version }}\`](https://github.com/${{ github.repository }}/commit/${{ github.event.workflow_run.head_sha || github.sha }}). ..."
254+
NOTES="${NOTES}Release commit: [\`${{ github.event.workflow_run.head_sha || github.sha }}\`](https://github.com/${{ github.repository }}/commit/${{ github.event.workflow_run.head_sha || github.sha }})."$'\n\n'"
255255
256256
if [ -n "$BREAKING" ]; then
257257
NOTES="${NOTES}### ⚠️ Breaking Changes"$'\n'"$(echo -e "$BREAKING")"$'\n'
@@ -277,25 +277,12 @@ jobs:
277277
NOTES="${NOTES}### 📦 Other Changes"$'\n'"$(echo -e "$OTHERS")"$'\n'
278278
fi
279279
280-
# Append your Docker image info + quick start
281-
NOTES="${NOTES}"$'\n'"## Docker images"$'\n\n'
282-
NOTES="${NOTES}The following multi-arch images (linux/amd64, linux/arm64) were published to GitHub Container Registry:"$'\n\n'
283-
NOTES="${NOTES}- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:${{ needs.prepare.outputs.app_version }}"$'\n'
284-
NOTES="${NOTES}- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:main"$'\n'
285-
NOTES="${NOTES}- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"$'\n\n'
286-
287280
NOTES="${NOTES}## Quick start"$'\n\n'
288-
NOTES="${NOTES}Pull the latest image:"$'\n\n'
281+
NOTES="${NOTES}Start the latest version:"$'\n\n'
289282
NOTES="${NOTES}\`\`\`bash"$'\n'
290-
NOTES="${NOTES}docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"$'\n'
283+
NOTES="${NOTES}docker run --name cinepro-core-${{ needs.prepare.outputs.app_version }} -p 3000:3000 -e TMDB_API_KEY=your-tmdb-key ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"$'\n'
291284
NOTES="${NOTES}\`\`\`"$'\n\n'
292285
293-
NOTES="${NOTES}Run the newest API locally:"$'\n\n'
294-
NOTES="${NOTES}\`\`\`bash"$'\n'
295-
NOTES="${NOTES}docker run -p 3000:3000 \\"$'\n'
296-
NOTES="${NOTES} -e TMDB_API_KEY=your-tmdb-key \\"$'\n'
297-
NOTES="${NOTES} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:latest"$'\n'
298-
NOTES="${NOTES}\`\`\`"$'\n'
299286
NOTES="${NOTES}## For more details, check the [CinePro documentation](https://docs.cinepro.cc) and the [Version History](https://docs.cinepro.cc/core/versions)."
300287
301288
{

src/providers/peachify/peachify.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ export class PeachifyProvider extends BaseProvider {
146146
const sources: ProviderResult['sources'] = parsed.map((s) => ({
147147
url: this.createProxyUrl(s.url, s.headers ?? this.HEADERS),
148148
type: s.type,
149-
quality: s.quality ? `${s.quality}p` : 'unknown',
149+
quality: s.quality?.toString() ?? 'Auto',
150150
audioTracks: [
151151
{
152152
label: s.dub,
153-
language: 'en'
153+
language: s.dub.toLowerCase().substring(0, 2)
154154
}
155155
],
156156
provider: {
@@ -274,7 +274,7 @@ export class PeachifyProvider extends BaseProvider {
274274
const url = raw.url ?? raw.file ?? raw.src;
275275
if (!url) return null;
276276

277-
const label = raw.label ?? raw.name ?? raw.language ?? 'Unknown';
277+
const label = raw.label ?? raw.name ?? raw.language ?? 'Auto';
278278
const lang = raw.langCode ?? raw.lang ?? raw.language;
279279

280280
return { url, label, lang, display: label, provider: providerName };

src/providers/rgshows/rgshows.ts

Lines changed: 0 additions & 162 deletions
This file was deleted.

src/providers/rgshows/rgshows.types.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/providers/streammafia/streammafia.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export class StreamMafiaProvider extends BaseProvider {
1717
readonly id = 'streammafia';
1818
readonly name = 'MafiaEmbed';
1919
readonly enabled = true;
20-
21-
readonly BASE_URL = 'https://sf.streammafia.to';
22-
20+
readonly BASE_URL = 'https://solve.streammafia.to';
2321
readonly HEADERS = {
2422
'User-Agent': '',
2523
Accept: 'application/json, text/javascript, */*; q=0.01',

src/providers/videasy/decryptor.ts

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// decryptor.ts
2+
// calls enc-dec.app to decrypt videasy's encrypted blob.
3+
// the blob is plain text hex returned directly from api.videasy.net.
4+
// enc-dec.app handles the wasm/cryptojs decryption server-side.
5+
6+
const DEC_API = 'https://enc-dec.app/api/dec-videasy';
7+
8+
// response shape from enc-dec.app
9+
interface DecApiResponse {
10+
status: number;
11+
result: {
12+
sources: Array<{ quality?: string; url: string; type?: string }>;
13+
subtitles: Array<{ url: string; lang?: string; language?: string }>;
14+
};
15+
}
16+
17+
export interface DecryptedPayload {
18+
sources: Array<{ quality?: string; url: string; type?: string }>;
19+
subtitles: Array<{ url: string; lang?: string; language?: string }>;
20+
}
21+
22+
// simple in-memory cache: key = `${tmdbId}:${blobHash}`, value = decrypted payload
23+
// avoids re-calling the api for the same blob within a server session
24+
const cache = new Map<string, DecryptedPayload>();
25+
26+
function blobKey(tmdbId: string, blob: string): string {
27+
// soo i think it's better to use first 32 chars of blob as a cheap fingerprint as blobs are unique per request
28+
return `${tmdbId}:${blob.slice(0, 32)}`;
29+
}
30+
31+
export async function decryptResponse(
32+
blob: string,
33+
tmdbId: string
34+
): Promise<DecryptedPayload | null> {
35+
if (!blob || blob.length < 10) return null;
36+
37+
const key = blobKey(tmdbId, blob);
38+
if (cache.has(key)) return cache.get(key)!;
39+
40+
try {
41+
const res = await fetch(DEC_API, {
42+
method: 'POST',
43+
headers: { 'Content-Type': 'application/json' },
44+
body: JSON.stringify({ text: blob, id: tmdbId })
45+
});
46+
47+
if (!res.ok) return null;
48+
49+
const json = (await res.json()) as DecApiResponse;
50+
51+
if (json.status !== 200 || !json.result?.sources) return null;
52+
53+
const payload: DecryptedPayload = {
54+
sources: json.result.sources ?? [],
55+
subtitles: json.result.subtitles ?? []
56+
};
57+
58+
cache.set(key, payload);
59+
return payload;
60+
} catch {
61+
return null;
62+
}
63+
}

0 commit comments

Comments
 (0)