Skip to content

Commit

Permalink
fix(scene): fix remove scene function
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanCarollo committed Mar 17, 2024
1 parent bfb4578 commit 26a4318
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official Python runtime as the base image
FROM python:3.9
FROM python:3.8-slim

# Set the working directory in the container
WORKDIR /usr/src/app
Expand All @@ -11,13 +11,20 @@ COPY . .
RUN apt-get update && apt-get install -y \
libmagic-dev \
youtube-dl \
ffmpeg
ffmpeg \
libpulse-mainloop-glib0 \
libxcb-xinerama0

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

# Set the QT_QPA_PLATFORM environment variable to xcb
ENV QT_QPA_PLATFORM=xcb
ENV QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms

# Make port 80 available to the world outside this container
EXPOSE 80


# Run app.py when the container launches
CMD ["python", "main.py"]
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ services:
build: .
ports:
- "4000:80"
environment:
- DISPLAY=${DISPLAY}
2 changes: 1 addition & 1 deletion window/SceneManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def removeScene(self):
# Remove other scenes from memory but keep 1 scene in the stacked widget, in that manner, we can
# keep the thread from the widget before the first one !
if self.stacked_widget.count() > 1:
removed_widget = self.stacked_widget.currentWidget()
removed_widget = self.stacked_widget.widget(0)
self.stacked_widget.removeWidget(removed_widget)
removed_widget.deleteLater()

Expand Down

0 comments on commit 26a4318

Please sign in to comment.