Skip to content

Commit

Permalink
Merge branch 'imputnet:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrapulse authored Nov 19, 2024
2 parents e24ac7c + 26e051f commit 7698011
Show file tree
Hide file tree
Showing 41 changed files with 1,778 additions and 1,823 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- id: checkServices
run: pnpm i --frozen-lockfile && echo "service_list=$(node api/src/util/test-ci get-services)" >> "$GITHUB_OUTPUT"
run: pnpm i --frozen-lockfile && echo "service_list=$(node api/src/util/test get-services)" >> "$GITHUB_OUTPUT"

test-services:
needs: check-services
Expand All @@ -30,4 +30,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- run: pnpm i --frozen-lockfile && node api/src/util/test-ci run-tests-for ${{ matrix.service }}
- run: pnpm i --frozen-lockfile && node api/src/util/test run-tests-for ${{ matrix.service }}
1 change: 0 additions & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ this list is not final and keeps expanding over time. if support for a service y
| twitch clips ||||||
| twitter/x ||||||
| vimeo ||||||
| vine ||||||
| vk videos & clips ||||||
| youtube ||||||

Expand Down
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@imput/cobalt-api",
"description": "save what you love",
"version": "10.3.1",
"version": "10.3.3",
"author": "imput",
"exports": "./src/cobalt.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion api/src/misc/run-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ export async function runTest(url, params, expect) {
if (result.body.status === 'tunnel') {
// TODO: stream testing
}
}
}
2 changes: 1 addition & 1 deletion api/src/processing/cookie/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const setupMain = async (cookiePath) => {
cluster.broadcast({ cookies });

console.log(`${Green('[✓]')} cookies loaded successfully!`);
} catch(e) {
} catch (e) {
console.error(`${Yellow('[!]')} failed to load cookies.`);
console.error('error:', e);
}
Expand Down
1 change: 0 additions & 1 deletion api/src/processing/match-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export default function({ r, host, audioFormat, isAudioOnly, isAudioMuted, disab
break;

case "facebook":
case "vine":
case "instagram":
case "tumblr":
case "pinterest":
Expand Down
7 changes: 0 additions & 7 deletions api/src/processing/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import tumblr from "./services/tumblr.js";
import vimeo from "./services/vimeo.js";
import soundcloud from "./services/soundcloud.js";
import instagram from "./services/instagram.js";
import vine from "./services/vine.js";
import pinterest from "./services/pinterest.js";
import streamable from "./services/streamable.js";
import twitch from "./services/twitch.js";
Expand Down Expand Up @@ -175,12 +174,6 @@ export default async function({ host, patternMatch, params }) {
})
break;

case "vine":
r = await vine({
id: patternMatch.id
});
break;

case "pinterest":
r = await pinterest({
id: patternMatch.id,
Expand Down
6 changes: 1 addition & 5 deletions api/src/processing/service-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const services = {
"reel/:id",
"share/:shareType/:id"
],
subdomains: ["web"],
subdomains: ["web", "m"],
altDomains: ["fb.watch"],
},
instagram: {
Expand Down Expand Up @@ -143,10 +143,6 @@ export const services = {
subdomains: ["mobile"],
altDomains: ["x.com", "vxtwitter.com", "fixvx.com"],
},
vine: {
patterns: ["v/:id"],
tld: "co",
},
vimeo: {
patterns: [
":id",
Expand Down
3 changes: 0 additions & 3 deletions api/src/processing/service-patterns.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ export const testers = {
pattern.id?.length <= 11
&& (!pattern.password || pattern.password.length < 16),

"vine": pattern =>
pattern.id?.length <= 12,

"vk": pattern =>
pattern.userId?.length <= 10 && pattern.videoId?.length <= 10,

Expand Down
13 changes: 10 additions & 3 deletions api/src/processing/services/bluesky.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@ import { cobaltUserAgent } from "../../config.js";
import { createStream } from "../../stream/manage.js";

const extractVideo = async ({ media, filename, dispatcher }) => {
const urlMasterHLS = media?.playlist;
if (!urlMasterHLS) return { error: "fetch.empty" };
if (!urlMasterHLS.startsWith("https://video.bsky.app/")) return { error: "fetch.empty" };
let urlMasterHLS = media?.playlist;

if (!urlMasterHLS || !urlMasterHLS.startsWith("https://video.bsky.app/")) {
return { error: "fetch.empty" };
}

urlMasterHLS = urlMasterHLS.replace(
"video.bsky.app/watch/",
"video.cdn.bsky.app/hls/"
);

const masterHLS = await fetch(urlMasterHLS, { dispatcher })
.then(r => {
Expand Down
15 changes: 0 additions & 15 deletions api/src/processing/services/vine.js

This file was deleted.

Loading

0 comments on commit 7698011

Please sign in to comment.