ComicStreamer can help you view your digital comic collection across your network. It is similar to Ubooquity but written in Python and only supports .cbr and .cbz files. ComicStreamer turns your Ubuntu home media server into a comic server that will stream your comic collection to your reading devices so you can sync your library with your e-reader or just view comics in a web browser. Couple ComicStreamer with nag free dynamic DNS and you can access your comics away from home as well. Have a look at Mylar for autofilling gaps in your comic collection. This tutorial was tested on Ubuntu 14.04.
Pi Unit | ||||||||
---|---|---|---|---|---|---|---|---|
Raspberry Pi 3 | Quad Core | |||||||
Raspberry Pi 2 | Quad Core | |||||||
Raspberry Pi | Single Core | |||||||
Banana Pi | Dual Core | |||||||
Banana Pi Pro | Dual Core |
The ComicStreamer interface is not especially attractive but it is functional, if you are interested in contributing some CSS to spice it up then get in touch with the current maintainer of the project.
Install ComicStreamer Ubuntu 14.x
Install the ComicStreamer dependencies, it uses python and some image processing utilities
sudo apt-get update
sudo apt-get install git python-pip python-tornado python-dev python-dateutil libavahi-compat-libdnssd-dev git libtiff*-dev libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libwebp-dev build-essential unzip -y
This command clones the latest ComicStreamer into the /opt/comicstreamer location. It is a fork which supports ComicStreamer behind a reverse proxy and has some additional fixes not in the original ComicStreamer.
sudo git clone https://github.com/davide-romanini/ComicStreamer /opt/comicstreamer
Change ownership of ComicStreamer folder to prevent permission issues, replace htpcguides with your username and its group which are almost always the same
sudo chown -R htpcguides:htpcguides /opt/comicstreamer
Enter the ComicStreamer folder to install the python dependencies and build unrar
cd /opt/comicstreamer
Install the pip packages using the requirements file
sudo pip install -r requirements.txt
Install pybonjour
sudo pip install https://pybonjour.googlecode.com/files/pybonjour-1.1.1.tar.gz
Run the paver command to compile unrar and the library
paver libunrar
Test if ComicStreamer runs
python /opt/comicstreamer/comicstreamer
ComicStreamer run on port 32500 so you can go check if it is working by going to a browser and entering http://ip.address:32500.
In the SSH terminal window hit Ctr+C to terminate Comicstreamer for now
Autostart ComicStreamer init.d Script
Let's make ComicStreamer start on boot with an init.d script adapted from here
sudo nano /etc/init.d/comicstreamer
Paste the ComicStreamer init.d script, replace htpcguides with the user you normall use and which owns the /opt/comicstreamer directory
#!/bin/sh
### BEGIN INIT INFO
# Provides: ComicStreamer
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: ComicStreamer
# Description: ComicStreamer shows your cbr and cbz files
### END INIT INFO
# Documentation available at
# http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
# Debian provides some extra functions though
. /lib/lsb/init-functions
DAEMON_NAME="ComicStreamer"
DAEMON_USER="htpcguides"
DAEMON_PATH="/usr/bin/python"
DAEMON_OPTS="/opt/comicstreamer/comicstreamer"
DAEMON_PWD="/opt/comicstreamer"
DAEMON_DESC=$(get_lsb_header_val $0 "Short-Description")
DAEMON_PID="/opt/comicstreamer/${DAEMON_NAME}.pid"
DAEMON_NICE=0
DAEMON_LOG='/var/log/comicstreamer.log'
[ -r "/etc/default/${DAEMON_NAME}" ] && . "/etc/default/${DAEMON_NAME}"
do_start() {
local result
pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null
if [ $? -eq 0 ]; then
log_warning_msg "${DAEMON_NAME} is already started"
result=0
else
log_daemon_msg "Starting ${DAEMON_DESC}" "${DAEMON_NAME}"
touch "${DAEMON_LOG}"
chown $DAEMON_USER "${DAEMON_LOG}"
chmod u+rw "${DAEMON_LOG}"
if [ -z "${DAEMON_USER}" ]; then
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
else
start-stop-daemon --start --quiet --oknodo --background \
--nicelevel $DAEMON_NICE \
--chdir "${DAEMON_PWD}" \
--pidfile "${DAEMON_PID}" --make-pidfile \
--chuid "${DAEMON_USER}" \
--exec "${DAEMON_PATH}" -- $DAEMON_OPTS
result=$?
fi
log_end_msg $result
fi
return $result
}
do_stop() {
local result
pidofproc -p "${DAEMON_PID}" "${DAEMON_PATH}" > /dev/null
if [ $? -ne 0 ]; then
log_warning_msg "${DAEMON_NAME} is not started"
result=0
else
log_daemon_msg "Stopping ${DAEMON_DESC}" "${DAEMON_NAME}"
killproc -p "${DAEMON_PID}" "${DAEMON_PATH}"
result=$?
log_end_msg $result
rm "${DAEMON_PID}"
fi
return $result
}
do_restart() {
local result
do_stop
result=$?
if [ $result = 0 ]; then
do_start
result=$?
fi
return $result
}
do_status() {
local result
status_of_proc -p "${DAEMON_PID}" "${DAEMON_PATH}" "${DAEMON_NAME}"
result=$?
return $result
}
do_usage() {
echo $"Usage: $0 {start | stop | restart | status}"
exit 1
}
case "$1" in
start) do_start; exit $? ;;
stop) do_stop; exit $? ;;
restart) do_restart; exit $? ;;
status) do_status; exit $? ;;
*) do_usage; exit 1 ;;
esac
Make the ComicStreamer init.d script executable
sudo chmod +x /etc/init.d/comicstreamer
Update the system to run ComicStreamer on boot
sudo update-rc.d comicstreamer defaults
Start the Comicstreamer service
sudo service comicstreamer start