mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 15:13:31 -04:00
mpv-plugin/mpv_thumbnail_script: add multiple thumbnailer threads
Signed-off-by: Nicola Smaniotto <smaniotto.nicola@gmail.com>
This commit is contained in:
@@ -28,3 +28,27 @@ src_compile() {
|
||||
${EPYTHON} concat_files.py -r "cat_osc.json" || die
|
||||
${EPYTHON} concat_files.py -r "cat_server.json" || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
mpv-plugin_src_install
|
||||
|
||||
# add multiple threads
|
||||
THUMBNAIL_SERVER_THREADS="${THUMBNAIL_SERVER_THREADS:-1}"
|
||||
|
||||
if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then
|
||||
i=1
|
||||
while [[ ${i} -lt ${THUMBNAIL_SERVER_THREADS} ]]; do
|
||||
dosym -r "/etc/mpv/scripts/mpv_thumbnail_script_server.lua" \
|
||||
"/etc/mpv/scripts/mpv_thumbnail_script_server_${i}.lua" || die
|
||||
(( i++ ))
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst(){
|
||||
if [[ "${THUMBNAIL_SERVER_THREADS}" -gt 1 ]]; then
|
||||
elog "Created a total of ${THUMBNAIL_SERVER_THREADS} server threads. Setting this too high is not recommended"
|
||||
else
|
||||
elog "You can create multiple thumbnailing threads by setting THUMBNAIL_SERVER_THREADS"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user