Skip to content

Commit

Permalink
Implement unified endpoint
Browse files Browse the repository at this point in the history
Implement unified extraction

- Youtube handled by onesie requests
- Everything else handled by yt-dlp

Lets see how well that works.
  • Loading branch information
bcomnes committed Oct 5, 2024
1 parent 1755522 commit 0b24af7
Show file tree
Hide file tree
Showing 50 changed files with 2,185 additions and 567 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/ytdlp-server"
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,24 @@ jobs:
- name: Install Flake8
run: |
pip install flake8
working-directory: main-server
working-directory: ytdlp-server

- name: Run Flake8
run: |
flake8 . --max-line-length=120
working-directory: main-server
working-directory: ytdlp-server

- name: Set up Python virtual environment
- name: Install Protoc using apt-get
run: |
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
working-directory: main-server
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Verify protoc installation
run: protoc --version

- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- run: npm i
working-directory: ./bg-util-server

- run: npm test
working-directory: ./bg-util-server
19 changes: 15 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# Python related
venv/

*.pyc
__pycache__/

instance/

.pytest_cache/
.coverage
htmlcov/

# Build related
dist/
build/
*.egg-info/

node_modules
# Node.js related
node_modules/
package-lock.json
.nyc_output
sandbox.js

# Miscellaneous
coverage/
public/
./yt-dlp
.env
dependency-graph.html
*.dbml
.tap
20 changes: 20 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"cSpell.words": [
"bgutils",
"Botguard",
"dpjhg",
"filesize",
"googlevideo",
"initplayback",
"Itlu",
"JSPB",
"Luan",
"Protos",
"SABR",
"sjson",
"TVHTML",
"Ustreamer",
"ytdlp",
"ytpi"
]
}
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.20

RUN apk add --no-cache python3 py3-pip nodejs npm git tmux go
RUN apk add --no-cache python3 py3-pip nodejs npm git tmux go protobuf

WORKDIR /usr/src/app
COPY --link . .
Expand All @@ -11,21 +11,19 @@ ENV PATH="$PATH:$GOPATH/bin"
RUN go install github.com/DarthSim/overmind/v2@latest

# Set up Python Deps
WORKDIR /usr/src/app/main-server
WORKDIR /usr/src/app/ytdlp-server

ENV PYTHONUNBUFFERED=1 \
VIRTUAL_ENV=/usr/src/app/main-server/venv
VIRTUAL_ENV=/usr/src/app/ytdlp-server/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install --no-cache-dir -r requirements.txt

WORKDIR /usr/src/app/bg-util-server
WORKDIR /usr/src/app

RUN npm i --omit=dev

WORKDIR /usr/src/app

EXPOSE 8080
EXPOSE 5000

CMD ["overmind", "start"]
Loading

0 comments on commit 0b24af7

Please sign in to comment.