Move container image to my registry

This commit is contained in:
Neale Pickett 2022-11-06 10:34:43 -07:00
parent c15681a51c
commit 39c26fffa6
6 changed files with 14 additions and 15 deletions

View File

@ -7,19 +7,13 @@ RUN true \
&& sed -i 's/main$/main contrib non-free/' /etc/apt/sources.list \
&& apt-get -y update \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
dvdbackup \
libdvd-pkg libdvdcss2 \
handbrake-cli libavcodec-extra \
dvdbackup lsdvd libdvd-pkg libdvdcss2 \
cd-discid cdparanoia lame \
python3 \
python3-slugify \
handbrake-cli libavcodec-extra \
python3 python3-slugify \
&& true
RUN dpkg-reconfigure libdvd-pkg
RUN true \
&& DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install \
cowsay
COPY src/* /app/
COPY abcde.conf httpd.conf /etc/
COPY --chown=linuxserver:linuxserver www /www

View File

@ -2,7 +2,7 @@
set -e
tag=registry.gitlab.com/dartcatcher/media-sucker/media-sucker
tag=git.woozle.org/neale/media-sucker
docker build --tag $tag .
case "$1" in

View File

@ -14,7 +14,7 @@ MINUTE = 60 * SECOND
HOUR = 60 * MINUTE
def scan(state, device):
# Get disc ID
logging.info("Scanning CD to get disc ID")
p = subprocess.run(
[
"cd-discid",
@ -27,7 +27,7 @@ def scan(state, device):
state["discid"] = discid
cddb_id = discid.split()[0]
# Look it up in cddb
logging.info("Looking disc up on CDDB")
email = os.environ.get("EMAIL") # You should really set this variable, tho
if not email:
user = "user"
@ -49,6 +49,8 @@ def scan(state, device):
state["title"] = "Unknown CD - %s" % cddb_id
state["tracks"] = ["Track %02d" % (i+1) for i in range(num_tracks)]
logging.info("CD scan complete")
def copy(state, device, directory):
# cdparanoia reports completion in samples
@ -59,7 +61,7 @@ def copy(state, device, directory):
track_num = 1
for track_name in state["tracks"]:
logging.debug("Ripping track %d of %d", track_num, len(state["tracks"]))
logging.info("Ripping track %d of %d", track_num, len(state["tracks"]))
p = subprocess.Popen(
[
"cdparanoia",
@ -99,7 +101,7 @@ def encode(state, directory):
tag_script.write("\n")
for track_name in state["tracks"]:
logging.debug("Encoding track %d (%s)" % (track_num, track_name))
logging.info("Encoding track %d (%s)" % (track_num, track_name))
duration = durations[track_num-1]
argv = [
"lame",

View File

@ -88,6 +88,8 @@ class Reader(worker.Worker):
time.sleep(i * 5)
def handle(self, video):
logging.info("Handling media, video=%r" % video)
self.status["video"] = video
self.status["state"] = "reading"

View File

@ -9,7 +9,7 @@ docker run \
-v /dev:/hdev \
-v /srv/ext/incoming/sucker:/incoming/sucker \
--cpu-shares 256 \
registry.gitlab.com/dartcatcher/media-sucker/media-sucker \
git.woozle.org/neale/media-sucker \
-incoming /incoming/sucker \
-drive /hdev/sr0 /hdev/sr1 /hdev/sr2

View File

@ -4,6 +4,7 @@
<title>Media Sucker</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
<link rel="icon" href="cd-dvd.svg">
<script src="sucker.mjs" type="module"></script>
</head>
<body>