Compare commits
108 commits
Author | SHA1 | Date | |
---|---|---|---|
Stephan | 150bac828c | ||
Stephan | 932b659859 | ||
Stephan | 3b9f44a1b8 | ||
Stephan | e9a70c4ff3 | ||
Stephan | 40924e9aba | ||
Stephan | 7560d819f3 | ||
Stephan | 5bedaf71dc | ||
Stephan | 6da954447d | ||
Stephan | ced8107114 | ||
Stephan | 686b8d88f2 | ||
Stephan | f37b2c4756 | ||
Stephan | 78b401d32e | ||
Stephan | 5d8ae58a7a | ||
Stephan | bb2c2cb935 | ||
Stephan | 9ac4b8a855 | ||
Stephan | dee0ddee50 | ||
Stephan | b39261798b | ||
Stephan | 94c592d92c | ||
Stephan | 94f43c5a91 | ||
Stephan | 4e8344d343 | ||
Stephan | 2e4d1a9ca3 | ||
Stephan | 9cb5527f5b | ||
Stephan | 6eb314477b | ||
Stephan | a08d72b21c | ||
Stephan | bd746ecc05 | ||
Stephan | 10b0e57a12 | ||
Stephan | df550c193e | ||
8535cf6016 | |||
Stephan | d7bec9ac84 | ||
Stephan | ca743e1e16 | ||
662d118a48 | |||
ef413686e2 | |||
f87f9ee7bb | |||
e8b6d06477 | |||
f43e22d297 | |||
ff10bb198b | |||
Stephan | 0d88baaeda | ||
Stephan | bb2fe9fd2b | ||
Stephan | 33856f91f3 | ||
Stephan | 8448b20b69 | ||
Stephan | b838b941a8 | ||
Stephan | b66e409a4e | ||
Stephan | bf72e7a38c | ||
Stephan | ac4afc618f | ||
Stephan | 4627bd4709 | ||
Stephan | 23617817b2 | ||
Stephan | d30483479f | ||
Stephan | 8534c781ca | ||
Stephan | 9605308f9d | ||
Stephan | 3ef02ad095 | ||
Stephan | 9c75014f94 | ||
Stephan | 9a91437033 | ||
Stephan | 9023f30109 | ||
Stephan | 9b921c884f | ||
Stephan | b6974b2b92 | ||
Stephan | 7bd55db43b | ||
Stephan | 3f6b4fdaaf | ||
Stephan | 38732abad3 | ||
Stephan | 68859bce24 | ||
Stephan | 3b7b812475 | ||
Stephan | d12ac3c2d8 | ||
Stephan | 36bcbe63e9 | ||
Stephan | c3cc4f4abe | ||
Stephan | 550a3f24ae | ||
Stephan | 2000613782 | ||
Stephan | a696611153 | ||
Stephan | 5a729fd927 | ||
Stephan | 8c18b93a6f | ||
Stephan | 157bf6d615 | ||
Stephan | 6a940792c7 | ||
Stephan | a8d5ccae78 | ||
Stephan | 01d08e3c3f | ||
Stephan | 9f42123b22 | ||
Stephan | 6a4d8d3f5f | ||
Stephan | 7e35c4de26 | ||
Stephan | 9f05e3ce9c | ||
Stephan | c26df36517 | ||
Stephan | d8a6b73755 | ||
Stephan | c9467bce5b | ||
Stephan | 5b7124de4b | ||
Stephan | d79671b75f | ||
Stephan | 16910b0af9 | ||
Stephan | d910bb171d | ||
Stephan | bf0e6813d7 | ||
Stephan | 32d6e749f8 | ||
Stephan | 130a1fa57b | ||
Stephan | f00be5e205 | ||
Stephan | b7067c7c61 | ||
Stephan | 26d933d428 | ||
Stephan | 417dfc2761 | ||
Stephan | dd34e39c43 | ||
Stephan | c0c8dbe7d8 | ||
Stephan | c4ed4b1543 | ||
Stephan | 4c7d8b0f12 | ||
Stephan | 547849360c | ||
Stephan | b461099171 | ||
Stephan | a39c4fbfed | ||
Stephan | 7393b24cb5 | ||
Stephan | a01f20f742 | ||
Stephan | 2ba1dbb292 | ||
Stephan | f12e1989d0 | ||
Stephan | 323d686acb | ||
Stephan | c72b993cd7 | ||
Stephan | 2340a050ac | ||
Stephan | 1a8471f21d | ||
Stephan | b8b87c3eaf | ||
Stephan | 2edb0272fc | ||
Stephan | 9893bb14f2 |
BIN
Build/app/bin/ionice32
Executable file
BIN
Build/app/bin/ionice64
Executable file
BIN
Build/app/bin/otrdecoder64_72
Normal file
BIN
Build/app/binARMv7l/ionice
Normal file
|
@ -51,6 +51,7 @@ dsmtextnotify="on"
|
|||
MessageTo="admin"
|
||||
dsmbeepnotify="on"
|
||||
LOGlevel="1"
|
||||
LOGmax=""
|
||||
reindex=1
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
".url": {
|
||||
"SYNO.SDS.synOTR.Application": {
|
||||
"type": "legacy",
|
||||
"allUsers": true,
|
||||
"allUsers": false,
|
||||
"allowMultiInstance": false,
|
||||
"grantPrivilege": "all",
|
||||
"advanceGrantPrivilege" : true,
|
||||
"configablePrivilege" : true,
|
||||
"title": "synOTR",
|
||||
"desc": "",
|
||||
"icon": "images/synOTR_{0}.png",
|
||||
|
|
|
@ -28,7 +28,9 @@ if [[ "$page" == "edit-save" ]]; then
|
|||
"$set_var" "$dir/app/etc/Konfiguration.txt" "dsmtextnotify" "$dsmtextnotify"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "MessageTo" "$MessageTo"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "dsmbeepnotify" "$dsmbeepnotify"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "PBTOKEN" "$PBTOKEN"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "LOGlevel" "$LOGlevel"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "LOGmax" "$LOGmax"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "endgueltigloeschen" "$endgueltigloeschen"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "reindex" "$reindex"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "cutlistat_ID" "$cutlistat_ID"
|
||||
|
@ -86,7 +88,9 @@ if [[ "$page" == "edit-import-query" ]] || [[ "$page" == "edit-import" ]]; then
|
|||
"$set_var" "$dir/app/etc/Konfiguration.txt" "dsmtextnotify" "$dsmtextnotify"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "MessageTo" "$MessageTo"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "dsmbeepnotify" "$dsmbeepnotify"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "PBTOKEN" "$PBTOKEN"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "LOGlevel" "$LOGlevel"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "LOGmax" "$LOGmax"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "endgueltigloeschen" "$endgueltigloeschen"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "reindex" "$reindex"
|
||||
"$set_var" "$dir/app/etc/Konfiguration.txt" "cutlistat_ID" "$cutlistat_ID"
|
||||
|
@ -358,24 +362,24 @@ if [[ "$page" == "edit" ]]; then
|
|||
# SMARTRENDERING
|
||||
echo '
|
||||
<p>
|
||||
<label>Smartrendering</label>
|
||||
<label>Art zu Schneiden</label>
|
||||
<select name="SMARTRENDERING">'
|
||||
if [[ "$SMARTRENDERING" == "off" ]]; then
|
||||
echo '<option value="off" selected>aus</option>'
|
||||
echo '<option value="off" selected>Cut an Keyframes</option>'
|
||||
else
|
||||
echo '<option value="off">aus</option>'
|
||||
echo '<option value="off">Cut an Keyframes</option>'
|
||||
fi
|
||||
if [[ "$SMARTRENDERING" == "on" ]]; then
|
||||
echo '<option value="on" selected>ein</option>'
|
||||
echo '<option value="on" selected>Smartrendering</option>'
|
||||
else
|
||||
echo '<option value="on">ein</option>'
|
||||
echo '<option value="on">Smartrendering</option>'
|
||||
fi
|
||||
echo '
|
||||
</select>
|
||||
<a class="helpbox" href="#HELP">
|
||||
<img src="images/icon_information_mini@geimist.svg" height="25" width="25"/>
|
||||
<span>Für das Schneiden an Keyframes wird avisplit/avimerge aus Transcode verwendet. Diese Art geht sehr schnell (fast wie das Kopieren der Dateien auf der Festplatte). Der Nachteil ist, dass die Schnittübergänge um mehrere Sekunden ungenau sind und nur avi-Quelldateien scheidbar sind.
|
||||
<br><br>Für das framegenaue Schneiden wird das Programm avcut verwendet. Avcut schneidet im Gegensatz zu avisplit framegenau, allerdings ergeben sich daraus erhöhte Anforderungen an die CPU und RAM (min. installiert: 1GB für HD-Aufnahmen und 500MB für HQ-Aufnahmen). Framegenaue Schnitte sind zeitintensiv.
|
||||
<br><br>Smartrendering: Für das framegenaue Schneiden wird das Programm avcut verwendet. Avcut schneidet im Gegensatz zu avisplit framegenau, allerdings ergeben sich daraus erhöhte Anforderungen an die CPU und RAM (min. installiert: 1GB für HD-Aufnahmen und 500MB für HQ-Aufnahmen). Framegenaue Schnitte sind zeitintensiv.
|
||||
<br><br>ACHTUNG: mit avcut geschnittene Filme werden derzeit sehr asynchron. Die Option der Konvertierung zu MP4 löst das Problem!</span></a>
|
||||
</p>'
|
||||
# WaitOfCutlist
|
||||
|
@ -466,7 +470,7 @@ if [[ "$page" == "edit" ]]; then
|
|||
echo '
|
||||
<a class="helpbox" href="#HELP">
|
||||
<img src="images/icon_information_mini@geimist.svg" height="25" width="25"/>
|
||||
<span>Frameversatz, um Cuts manuell zu justieren (positive Werte verschieben jeden Cut nach hinten, negative nach vorn)<br><br>=> dieser Wert verschiebt den <b>Beginn</b> der gewünschten Filmteile beim framegenauen Schneiden</span></a>
|
||||
<span>Frameversatz, um Cuts manuell zu justieren (positive Werte verschieben jeden Cut nach hinten, negative nach vorn)<br><br>=> dieser Wert verschiebt den <b>Beginn</b> der gewünschten Filmteile beim framegenauen Schneiden<br><br>(greift nur in Verbindung mit Smartrendering)</span></a>
|
||||
</p>'
|
||||
# FrameversatzEndeCut
|
||||
echo '
|
||||
|
@ -480,7 +484,7 @@ if [[ "$page" == "edit" ]]; then
|
|||
echo '
|
||||
<a class="helpbox" href="#HELP">
|
||||
<img src="images/icon_information_mini@geimist.svg" height="25" width="25"/>
|
||||
<span>Frameversatz, um Cuts manuell zu justieren (positive Werte verschieben jeden Cut nach hinten, negative nach vorn)<br><br>=> dieser Wert verschiebt das <b>Ende</b> der gewünschten Filmteile beim framegenauen Schneiden</span></a>
|
||||
<span>Frameversatz, um Cuts manuell zu justieren (positive Werte verschieben jeden Cut nach hinten, negative nach vorn)<br><br>=> dieser Wert verschiebt das <b>Ende</b> der gewünschten Filmteile beim framegenauen Schneiden<br><br>(greift nur in Verbindung mit Smartrendering)</span></a>
|
||||
</p>
|
||||
</fieldset>
|
||||
</p>
|
||||
|
@ -607,14 +611,14 @@ if [[ "$page" == "edit" ]]; then
|
|||
</p>
|
||||
</details>'
|
||||
|
||||
# -> Abschnitt .avi's in native MP4's (MAC OS tauglich) umwandeln
|
||||
# -> Abschnitt .avi's in native MP4's umwandeln
|
||||
|
||||
echo '<fieldset>
|
||||
<hr style="border-style: dashed; size: 1px;">
|
||||
<br />
|
||||
<details><p>
|
||||
<summary>
|
||||
<span class="detailsitem">AVI-Filme in native MP4-Filme (macOS tauglich) umwandeln</span>
|
||||
<span class="detailsitem">AVI-Filme in native MP4-Filme umwandeln</span>
|
||||
</summary></p>
|
||||
<p>'
|
||||
|
||||
|
@ -743,6 +747,22 @@ if [[ "$page" == "edit" ]]; then
|
|||
<br>Auf diese Art kann man sich in Verbindung mit dem Paket "Notification Forwarder" über synOTR-Ereignisse z.B. über einen Pushdienst benachrichtigen lassen.
|
||||
<br>Bleibt der Wert leer, so wird die Gruppe "administrators" benachrichtigt.
|
||||
</span></a></p>'
|
||||
# PushBullet-Token
|
||||
echo '
|
||||
<p>
|
||||
<label>PushBullet-Token</label>'
|
||||
if [ -n "$PBTOKEN" ]; then
|
||||
echo '<input type="text" name="PBTOKEN" value="'$PBTOKEN'" />'
|
||||
else
|
||||
echo '<input type="text" name="PBTOKEN" value="" />'
|
||||
fi
|
||||
echo '
|
||||
<a class="helpbox" href="#HELP">
|
||||
<img src="images/icon_information_mini@geimist.svg" height="25" width="25"/>
|
||||
<span>Dein persönlicher PushBullet-Token.
|
||||
<br>Benachrichtigungen werden an den entsprechenden Account gesendet.
|
||||
<br>Bei Nichtgebrauch leer lassen.
|
||||
</span></a></p>'
|
||||
# dsmbeepnotify
|
||||
echo '
|
||||
<p>
|
||||
|
@ -792,6 +812,22 @@ if [[ "$page" == "edit" ]]; then
|
|||
<span>0 => es wird keine Log-Datei erstellt<br>1 => normales Log (standard)<br>2 => erweitertes Log
|
||||
<br>Die Logs befinden sich im Dekodierverzeichnis/_LOGsynOTR/</span></a>
|
||||
</p>'
|
||||
# LOGmax
|
||||
echo '
|
||||
<p>
|
||||
<label>max. Anzahl LOGfiles</label>'
|
||||
if [ -n "$LOGmax" ]; then
|
||||
echo '<input type="text" name="LOGmax" value="'$LOGmax'" />'
|
||||
else
|
||||
echo '<input type="text" name="LOGmax" value="" />'
|
||||
fi
|
||||
echo '
|
||||
<a class="helpbox" href="#HELP">
|
||||
<img src="images/icon_information_mini@geimist.svg" height="25" width="25"/>
|
||||
<span>LOG-Files können automatisch gelöscht werden, indem hier die maximal gewünschte Anzahl angegeben wird.
|
||||
<br>Sobald hier ein Wert vergeben wird, werden grundsätzlich alle leeren LOGs gelöscht.
|
||||
<br>(Die Anzahl bezieht sich also nur auf LOGs mit Einträgen)
|
||||
</span></a></p>'
|
||||
# reindex
|
||||
echo '
|
||||
<p>
|
||||
|
|
|
@ -16,7 +16,8 @@ echo '
|
|||
<li>Um synOTR regelmäßig laufen zu lassen (was sich empfiehlt), erstelle als
|
||||
nächstes <br>einen automatisierten Programmaufruf.
|
||||
<div class="tab"><br>
|
||||
Dazu hast du 2 Möglichkeiten:<br>verwende den <a href="index.cgi?page=timer" style="'$synotrred';">Zeitplaner</a> für einen programmierten synOTR-Start.</p><hr>
|
||||
Dazu hast du 2 Möglichkeiten:<br>verwende den <a href="index.cgi?page=timer" style="'$synotrred';">Zeitplaner</a> für einen programmierten synOTR-Start.
|
||||
<br><br>Hierbei ist zu beachten, dass der DSM-Sicherheitsbereater den Zusätzlichen Croneintrag (da für DSM unbekannt) bemängelt!</p><hr>
|
||||
<p>Oder, erstelle alternativ im Aufgabenplaner einen neuen Task mit diesem
|
||||
Programmpfad<br>(zu empfehlen, sofern du kürzere Intervalle als "stündlich" benötigst):</p>
|
||||
<p style="margin-left: 40px;"><code>/usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh</code></p>
|
||||
|
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 50 KiB |
|
@ -1,2 +1,5 @@
|
|||
s/Qüen/Queen/g
|
||||
s/qüen/queen/g
|
||||
s/Trü/True/g
|
||||
s/trü/true/g
|
||||
s/beqüm/bequem/g
|
||||
|
|
|
@ -44,9 +44,9 @@
|
|||
an Daniel Dieth von otr-serien.de für das zur Verfügungstellen seiner Website und seine Unterstützung.
|
||||
Bitte unterstützt die Seite <a href="http://www.otr-serien.de" rel="external">www.otr-serien.de</a>.
|
||||
Über die Seite lässt es sich auch sehr einfach nach bestimmten
|
||||
Episoden suchen. Ihr habt eine ausgestrahlte Serienepisode, die dort
|
||||
Episoden suchen. <s>Ihr habt eine ausgestrahlte Serienepisode, die dort
|
||||
nicht automatisch erkannt wurde? Dann gebt doch bei der betroffenen
|
||||
Episode eine Rückmeldung ab.<br>
|
||||
Episode eine Rückmeldung ab.</s><br>
|
||||
<br>
|
||||
<img class="imageStyle"
|
||||
alt="LOGO_thetvdb.com"
|
||||
|
@ -59,11 +59,11 @@
|
|||
Bitte unterstützt diesen kostenlosen Service, indem ihr nach
|
||||
Möglichkeit Informationen und Grafiken beitragt und ergänzt.<br>
|
||||
<br>
|
||||
Sollten keine Serieninformationen zu einer Sendung gefunden worden
|
||||
<s>Sollten keine Serieninformationen zu einer Sendung gefunden worden
|
||||
sein, so wird die Standardumbenennung verwendet und die Infos in
|
||||
einer Datenbank gesichert. Werden entsprechende Informationen auf
|
||||
otr-serien.de ergänzt, so wird nachträglich die Standardumbenennung
|
||||
in die Serienumbenennung vorgenommen (Suchzeit derzeit 7 Tage).
|
||||
in die Serienumbenennung vorgenommen (Suchzeit derzeit 7 Tage).</s>
|
||||
</div>
|
||||
</li>
|
||||
<li><span style="color:#0086E5;font-weight:bold; ">Konvertieren
|
||||
|
|
|
@ -85,24 +85,18 @@ func_main_LastLog () {
|
|||
# Dateistatus auslesen:
|
||||
# ---------------------------------------------------------------------
|
||||
# .otrkey-Files:
|
||||
count_otrkey=0
|
||||
for i in $(find "$OTRkeydir" -maxdepth 1 -name "*.otrkey" -type f)
|
||||
do
|
||||
count_otrkey=$(( count_otrkey + 1 ))
|
||||
done
|
||||
count_otrkey=$( ls -t "${OTRkeydir}" | egrep -o '.*.otrkey$' | wc -l ) # wie viele Dateien
|
||||
|
||||
# wait of cutlist:
|
||||
count_waitofcutlist=0
|
||||
for i in $(find "$DECODIR" -maxdepth 1 -name "*.avi" -o -name "*.mp4" -type f)
|
||||
do
|
||||
count_waitofcutlist=$(( count_waitofcutlist + 1 ))
|
||||
done
|
||||
count_waitofcutlist=$( expr $( ls -t "${DECODIR}" | egrep -o '.*.avi$' | wc -l ) + $( ls -t "${DECODIR}" | egrep -o '.*.mp4$' | wc -l ) ) # wie viele Dateien
|
||||
|
||||
|
||||
# manueller synOTR-Start:
|
||||
# ---------------------------------------------------------------------
|
||||
if [[ "$page" == "status-run-synotr" ]]; then
|
||||
echo '
|
||||
<div class="Content_1Col_full">'
|
||||
/usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh
|
||||
/usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh GUI
|
||||
func_main_LastLog
|
||||
# echo $refreshtime
|
||||
echo '<meta http-equiv="refresh" content="2; URL=index.cgi?page=status"></div>'
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
#!/bin/sh
|
||||
# /usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh
|
||||
# wechselt in synOTR-Verzeichnis und startet synOTR mit bzw. ohne LOG (je nach Konfiguration)
|
||||
|
||||
# wurde das Skript von der GUI aufgerufen (Aufruf mit Parameter "GUI" für )?
|
||||
callFrom=$1
|
||||
if [ -z $callFrom ] ; then
|
||||
callFrom="shell"
|
||||
else
|
||||
callFrom="GUI"
|
||||
fi
|
||||
|
||||
# Arbeitsverzeichnis auslesen und hineinwechseln:
|
||||
APPDIR=$(cd $(dirname $0);pwd)
|
||||
cd ${APPDIR}
|
||||
|
@ -15,20 +24,29 @@
|
|||
# echo "synOTR läuft bereits!"
|
||||
# exit
|
||||
# fi
|
||||
synOTR_pid=`pidof synOTR.sh`
|
||||
synOTR_pid=$( /bin/pidof synOTR.sh )
|
||||
|
||||
if [ ! -z "$synOTR_pid" ] ; then
|
||||
echo '<p class="center"><span style="color: #BD0010;"><b>synOTR läuft bereits!</b><br>(Prozess-ID: '$synOTR_pid')</span></p>'
|
||||
echo '<br /><p class="center"><button name="page" value="status-kill-synotr" style="color: #BD0010;">(Beenden erzwingen?)</button></p><br />'
|
||||
if [ $callFrom = GUI ] ; then
|
||||
echo '<p class="center"><span style="color: #BD0010;"><b>synOTR läuft bereits!</b><br>(Prozess-ID: '$synOTR_pid')</span></p>'
|
||||
echo '<br /><p class="center"><button name="page" value="status-kill-synotr" style="color: #BD0010;">(Beenden erzwingen?)</button></p><br />'
|
||||
else
|
||||
echo "synOTR läuft bereits! (Prozess-ID: $synOTR_pid)"
|
||||
fi
|
||||
exit
|
||||
else
|
||||
echo '<p class="title">synOTR wurde gestartet ...</p><br><br><br><br>
|
||||
<center><table id="system_msg" style="width: 40%;table-align: center;">
|
||||
<tr>
|
||||
<th style="width: 20%;"><img class="imageStyle" alt="status_loading" src="images/status_loading.gif" style="float:left;"></th>
|
||||
<th style="width: 80%;"><p class="center"><span style="color: #424242;font-weight:normal;">Bitte warten, bis die Dateien<br>fertig abgearbeitet wurden.</span></p></th>
|
||||
</tr>
|
||||
</table></center>'
|
||||
if [ $callFrom = GUI ] ; then
|
||||
echo '<p class="title">synOTR wurde gestartet ...</p><br><br><br><br>
|
||||
<center><table id="system_msg" style="width: 40%;table-align: center;">
|
||||
<tr>
|
||||
<th style="width: 20%;"><img class="imageStyle" alt="status_loading" src="images/status_loading.gif" style="float:left;"></th>
|
||||
<th style="width: 80%;"><p class="center"><span style="color: #424242;font-weight:normal;">Bitte warten, bis die Dateien<br>fertig abgearbeitet wurden.</span></p></th>
|
||||
</tr>
|
||||
</table></center>'
|
||||
else
|
||||
echo "synOTR wurde gestartet ..."
|
||||
echo "Bitte warten, bis die Dateien fertig abgearbeitet wurden."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Variablenkorrektur für ältere Konfiguration.txt und Slash anpassen:
|
||||
|
@ -37,12 +55,12 @@
|
|||
fi
|
||||
|
||||
if [ -z $WORKDIR ] ; then
|
||||
# WORKDIR="${destdir%/}/"
|
||||
WORKDIR="${DESTDIR%/}/"
|
||||
# echo "Variable WORKDIR nicht gesetzt. Es wird im Ausgabeordner gearbeitet!"
|
||||
WORKDIR="${DESTDIR%/}/" # Variable WORKDIR nicht gesetzt. Es wird im Ausgabeordner gearbeitet!
|
||||
else
|
||||
WORKDIR="${WORKDIR%/}/"
|
||||
fi
|
||||
|
||||
umask 000 # damit Files auch von anderen Usern bearbeitet werden können / http://openbook.rheinwerk-verlag.de/shell_programmierung/shell_011_003.htm
|
||||
|
||||
# LOGlevel=0 => Logging inaktiv / 1 => normal / 2 => erweitert
|
||||
if [ $LOGlevel = "0" ] ; then
|
||||
|
@ -51,9 +69,14 @@
|
|||
DECODIR="${WORKDIR%/}/_decodiert"
|
||||
|
||||
if [ ! -d "$DESTDIR" ] || [ "$DESTDIR" = "/" ]; then
|
||||
echo '
|
||||
<p class="center"><span style="color: #BD0010;"><b>! ! ! Zielverzeichnis in der Konfiguration prüfen ! ! !</b><br>Programmlauf wird beendet.<br></span></p>'
|
||||
exit
|
||||
if [ $callFrom = GUI ] ; then
|
||||
echo '
|
||||
<p class="center"><span style="color: #BD0010;"><b>! ! ! Zielverzeichnis in der Konfiguration prüfen ! ! !</b><br>Programmlauf wird beendet.<br></span></p>'
|
||||
else
|
||||
echo "! ! ! Zielverzeichnis in der Konfiguration prüfen ! ! !"
|
||||
echo "Programmlauf wird beendet."
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $OTRcutactiv = "off" ] ; then
|
||||
|
|
302
Build/synOTR.sh
|
@ -8,8 +8,9 @@
|
|||
echo " -----------------------------------"
|
||||
echo -e
|
||||
|
||||
CLIENTVERSION="4.0.8" # [2018-12-17]
|
||||
DevChannel="Release" # beta
|
||||
CLIENTVERSION=$(get_key_value /var/packages/synOTR/INFO version)
|
||||
set -E -o functrace # for function failure()
|
||||
DevChannel="Release" # beta [2023-06-11]
|
||||
|
||||
# ---------------------------------------------------------------------------------
|
||||
# GRUNDKONFIGRUATIONEN / INDIVIDUELLE ANPASSUNGEN / Standardwerte |
|
||||
|
@ -53,6 +54,7 @@
|
|||
# Arbeitsverzeichnis auslesen und hineinwechseln:
|
||||
# ---------------------------------------------------------------------
|
||||
OLDIFS=$IFS # ursprünglichen Fieldseparator sichern
|
||||
UNIXTIME=$(date +%s)
|
||||
APPDIR=$(cd $(dirname $0);pwd)
|
||||
cd ${APPDIR}
|
||||
|
||||
|
@ -122,6 +124,7 @@
|
|||
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
||||
ffmpeg=`which ffmpeg` # mitgeliefertes ffmpeg läuft derzeit nicht korrekt
|
||||
avcut="${APPDIR}/app/bin/avcut64"
|
||||
ionice="${APPDIR}/app/bin/ionice64"
|
||||
elif [ `echo $machinetyp | grep "armv7" ` ] ; then
|
||||
synOTR_LD_LIBRARY_PATH=${APPDIR}/app/libARMv7l:$LD_LIBRARY_PATH
|
||||
synOTR_PATH=$PATH:${APPDIR}/app/binARMv7l:/opt/bin
|
||||
|
@ -129,10 +132,10 @@
|
|||
ffmpeg="${APPDIR}/app/binARMv7l/ffmpeg"
|
||||
avcut="${APPDIR}/app/binARMv7l/avcut"
|
||||
if [[ `uname -a | grep "armadaxp" ` ]] ; then
|
||||
#if [ $device = "ds214" ] || [ $device = "ds414" ] ; then
|
||||
echo " alternative avcut-Version ohne asm wird verwendet"
|
||||
avcut="${APPDIR}/app/binARMv7l/avcut_disable-asm"
|
||||
fi
|
||||
ionice="${APPDIR}/app/binARMv7l/ionice"
|
||||
elif [ $machinetyp = "i686" ] ; then
|
||||
bsy="${APPDIR}/app/bin/busybox"
|
||||
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
||||
|
@ -140,6 +143,7 @@
|
|||
avcut="${APPDIR}/app/bin/avcut32"
|
||||
synOTR_LD_LIBRARY_PATH=$SAVED_LD_LIBRARY_PATH
|
||||
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
||||
ionice="${APPDIR}/app/bin/ionice32"
|
||||
elif [ $machinetyp = "x86_64" ] ; then
|
||||
bsy="${APPDIR}/app/bin/busybox"
|
||||
# ffmpeg="${APPDIR}/app/bin/ffmpeg"
|
||||
|
@ -147,6 +151,7 @@
|
|||
avcut="${APPDIR}/app/bin/avcut64"
|
||||
synOTR_LD_LIBRARY_PATH=$SAVED_LD_LIBRARY_PATH
|
||||
synOTR_PATH=$PATH:${APPDIR}/app/bin
|
||||
ionice="${APPDIR}/app/bin/ionice64"
|
||||
else
|
||||
message="Deine CPU-Plattform [${machinetyp}] wird leider von synOTR nicht unterstützt oder ist nicht bekannt …"
|
||||
echo "$message"
|
||||
|
@ -164,6 +169,10 @@
|
|||
|
||||
synOTR_ENV
|
||||
|
||||
# alle Kommandos und Kindprozesse des Skriptes mit niedrigst möglicher Priorität ausgeführen:
|
||||
echo "Priorität anpassen: $(renice -n 19 -p $$)"
|
||||
echo " $($ionice -c 2 -n 7 -p $$)"
|
||||
|
||||
# Info der Datenbank auslesen:
|
||||
# ---------------------------------------------------------------------
|
||||
if [ -f "${APPDIR}/app/etc/synOTR.sqlite" ] ; then
|
||||
|
@ -285,10 +294,42 @@
|
|||
#################################################################################################
|
||||
|
||||
|
||||
failure()
|
||||
{
|
||||
# this function show error line
|
||||
# --------------------------------------------------------------
|
||||
# https://unix.stackexchange.com/questions/462156/how-do-i-find-the-line-number-in-bash-when-an-error-occured
|
||||
local lineno=$1
|
||||
local msg=$2
|
||||
echo "Failed at $lineno: $msg"
|
||||
}
|
||||
trap 'failure ${LINENO} "$BASH_COMMAND"' ERR
|
||||
|
||||
|
||||
sec_to_time()
|
||||
{
|
||||
#########################################################################################
|
||||
# diese Funktion wandelt einen Sekundenwert nach hh:mm #
|
||||
# Aufruf: sec_to_time "string" #
|
||||
# https://blog.jkip.de/in-bash-sekunden-umrechnen-in-stunden-minuten-und-sekunden/ #
|
||||
#########################################################################################
|
||||
local seconds=$1
|
||||
local sign=""
|
||||
if [[ ${seconds:0:1} == "-" ]]; then
|
||||
seconds=${seconds:1}
|
||||
sign="-"
|
||||
fi
|
||||
local hours=$(( seconds / 3600 ))
|
||||
local minutes=$(( (seconds % 3600) / 60 ))
|
||||
seconds=$(( seconds % 60 ))
|
||||
printf "%s%02d:%02d:%02d" "$sign" $hours $minutes $seconds
|
||||
}
|
||||
|
||||
|
||||
MovieDB_query()
|
||||
{
|
||||
#########################################################################################
|
||||
# Diese Funktion sucht auf theTVDB.com nach Serieninformationen #
|
||||
# Diese Funktion sucht auf MovieDB.com nach Filminformationen #
|
||||
#########################################################################################
|
||||
|
||||
echo -e
|
||||
|
@ -391,7 +432,7 @@ echo -e ;
|
|||
echo "Serverfehler (Zeitüberschreitung)"
|
||||
fi
|
||||
if jq -e . >/dev/null 2>&1 <<<"$episodeninfo"; then
|
||||
episodetitle=` echo $episodeninfo | jq '.data[].episodeName' | sed "s/\"//g ; s/://g ; s/\?//g ; s/\*//g ; s/\?//g" ` # | tr -d '"' `
|
||||
episodetitle=` echo $episodeninfo | jq '.data[].episodeName' | sed "s/\"//g ; s/://g ; s/\?//g ; s/\*//g ; s/\?//g ; s/\///g" ` # | tr -d '"' `
|
||||
description=` echo $episodeninfo | jq '.data[].overview' | sed "s/\"//g" ` # | tr -d '"' `
|
||||
else
|
||||
echo "Serverantwort konnte nicht verarbeitet werden (kein kompatibles JSON)"
|
||||
|
@ -519,7 +560,7 @@ elif [[ "$OTRID" =~ $regInt ]]; then # Ist die OTR-Id eine echte Zahl?
|
|||
season="$(printf '%02d' "$season")" # 2stellig mit führender Null
|
||||
episode=`echo "$serieninfo" | awk -F, '{print $4}' | awk -F: '{print $2}' | sed "s/\"//g"`
|
||||
episode="$(printf '%02d' "$episode")" # 2stellig mit führender Null
|
||||
episodetitle=`echo "$serieninfo" | jq -r '.Folgenname' | sed "s/://g" | sed "s/\?//g" | sed "s/\*//g" | sed "s/\?//g" `
|
||||
episodetitle=`echo "$serieninfo" | jq -r '.Folgenname' | sed "s/\"//g ; s/://g ; s/\?//g ; s/\*//g ; s/\?//g ; s/\///g" `
|
||||
description=`echo "$serieninfo" | jq -r '.Folgenbeschreibung' | sed "s/:/ -/g" `
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT_OTRSERIEN" >/dev/null 2>&1
|
||||
else
|
||||
|
@ -568,7 +609,7 @@ OTRdecoder()
|
|||
muxerror=0 # nur für Log
|
||||
if [ -f "${DECODIR}/${videosourcetitle}.avi" ]; then
|
||||
echo -e; echo "MUXING: ---> ${ac3filename}" #; echo -e
|
||||
muxingLOG=$(nice -n $niceness $ffmpeg -threads 2 -loglevel $ffloglevel -i "${DECODIR}/${videosourcetitle}.avi" -i "$i" -map 0:0 -map 1:0 -c:a copy -async 1 -c:v copy -sn -y "${DECODIR}/${videosourcetitle}.ac3tmp.avi" 2>&1)
|
||||
muxingLOG=$($ffmpeg -threads 2 -loglevel $ffloglevel -i "${DECODIR}/${videosourcetitle}.avi" -i "$i" -map 0:0 -map 1:0 -c:a copy -async 1 -c:v copy -sn -y "${DECODIR}/${videosourcetitle}.ac3tmp.avi" 2>&1)
|
||||
|
||||
if [ -f "${DECODIR}/${videosourcetitle}.ac3tmp.avi" ]; then
|
||||
# Original löschen / umbenennen:
|
||||
|
@ -619,11 +660,16 @@ if [ $decoderactiv = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
echo -n " "; date
|
||||
|
||||
if [ $machinetyp = "x86_64" ]; then
|
||||
otrdecoderLOG=$(nice -n $niceness otrdecoder64 -q -i "$i" -o "$DECODIR" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
if [ "$(synogetkeyvalue /etc.defaults/VERSION buildnumber)" -ge 60000 ]; then
|
||||
# verwende passenden Decoder ab DSM7.2:
|
||||
otrdecoderLOG=$(otrdecoder64_72 -q -i "$i" -o "$DECODIR" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
else
|
||||
otrdecoderLOG=$(otrdecoder64 -q -i "$i" -o "$DECODIR" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
fi
|
||||
elif [ $machinetyp = "i686" ]; then
|
||||
otrdecoderLOG=$(nice -n $niceness otrdecoder32 -q -i "$i" -o "$DECODIR" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
otrdecoderLOG=$(otrdecoder32 -q -i "$i" -o "$DECODIR" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
elif [ `echo $machinetyp | grep "armv" ` ] ; then
|
||||
otrdecoderLOG=$(nice -n $niceness otrpidecoder -d "$i" -O "${DECODIR}/${decofilename}" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
otrdecoderLOG=$(otrpidecoder -d "$i" -O "${DECODIR}/${decofilename}" -e "$OTRuser" -p "$OTRpw" 2>&1)
|
||||
fi
|
||||
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
|
@ -685,6 +731,18 @@ if [ $decoderactiv = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$filename] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
fi
|
||||
|
@ -808,18 +866,14 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
# ---------------------------------------------------------------------
|
||||
film="$i" # Der komplette Filmname und gegebenfalls der Pfad
|
||||
film_ohne_anfang="$i"
|
||||
# CUTLIST=`basename "$film"` # Filmname ohne Pfad
|
||||
# filmname=$CUTLIST
|
||||
# filmname=`basename "$film"`
|
||||
AC_nameLOG="Überprüfe um welches Aufnahmeformat es sich handelt --> "
|
||||
|
||||
|
||||
|
||||
# film_ohne_anfang nur hier
|
||||
# film_ohne_ende nur hier und in Rename auskommentiert
|
||||
# filmname nur hier
|
||||
# format nur hier im Sinn von Qualität
|
||||
|
||||
|
||||
# ToDo: Variablen streichen / vereinheitlichen:
|
||||
# film_ohne_anfang > nur hier
|
||||
# film_ohne_ende > nur hier und in Rename auskommentiert
|
||||
# filmname > nur hier
|
||||
# format > nur hier im Sinn von Qualität
|
||||
|
||||
|
||||
if echo "$film_ohne_anfang" | grep -q ".HQ."; then #Wenn es sich um eine "HQ" Aufnahme handelt
|
||||
|
@ -839,7 +893,6 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
AC_nameLOG="${AC_nameLOG}avi"
|
||||
fi
|
||||
|
||||
|
||||
if echo "$film" | grep / >> /dev/null; then # Wenn der Dateiname einen Pfad enthält
|
||||
film_ohne_anfang=${film##*/} # Filmname ohne Pfad
|
||||
if echo "$film_ohne_anfang" | grep -q ".HQ."; then #Wenn es sich um eine "HQ" Aufnahme handelt
|
||||
|
@ -854,7 +907,6 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
|
||||
if echo "$film_ohne_anfang" | grep -q ".HQ."; then
|
||||
outputfile="${WORKDIR}$film_ohne_ende.HQ-cut.avi"
|
||||
# outputfile="${WORKDIR}$film_ohne_ende.mpg.HQ-cut.avi"
|
||||
|
@ -880,8 +932,6 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
filesize=$(ls -l "$film" | awk '{ print $5 }') #Dateigröße des Filmes
|
||||
goodCount=0 #Passende Cutlists
|
||||
arraylocal=1 #Nummer des Arrays
|
||||
# vorhanden=no ## nehme erstmal an, es wurde keine Cutlist gefunden
|
||||
# continue=1
|
||||
for f in $local_cutlists; do
|
||||
echo -n "Überprüfe ob eine der gefundenen Cutlists zum Film passt --> "
|
||||
if [ -z $f ]; then
|
||||
|
@ -1049,9 +1099,6 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
sed -n '/<\/'$1'>/p' "$tmp/search.xml" | sed -n ''$2'p' | sed 's/<'$1'>//' | sed 's/<\/'$1'>//g' | sed 's/^[ \t]*//'
|
||||
}
|
||||
|
||||
# inputfilename="$filename" # < 2018-06-12
|
||||
# filmdateiname=`basename $film` # < 2018-06-12
|
||||
|
||||
continue=0
|
||||
filesize=$(ls -l "$film" | awk '{ print $5 }')
|
||||
filesizeMB=$(echo | gawk '{print '$filesize'/1000000}' | awk '{printf "%.2f\n", $1}')
|
||||
|
@ -1098,7 +1145,6 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
echo -e " L==> Es wurde leider keine Cutlist gefunden!"
|
||||
else
|
||||
sed -i 's/<rating><\/rating>/<rating>0.00<\/rating>/g' "$tmp/search.xml" # fehlendes rating durch 0.00 ersetzen / -i ändert die Quelldatei
|
||||
# sed -i 's/ //g' "$tmp/search.xml" # führende Tabs entfernen / brachte Parsing durcheinander - lag möglicherweise doch an Dos-Zeilenenden
|
||||
sed -i $'s/\r$//' "$tmp/search.xml" # convert Dos to Unix
|
||||
|
||||
cutlist_anzahl=$(grep --text -c '/cutlist' "$tmp/search.xml" | /usr/bin/tr -d "\r")
|
||||
|
@ -1329,7 +1375,7 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
usercomment=""
|
||||
CL_serieninfofound=0
|
||||
SuggestedMovieName=`cat "$tmp/$CUTLIST" | grep "SuggestedMovieName=" | sed "s/SuggestedMovieName\=//g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}[ _][0-9]\{2\}[\-][0-9]\{2\}/Datum_Zeit/g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}/Datum/g;s/_/ /g" | /usr/bin/tr -d "\r" ` #| awk -F. '{print $1}'` # Datum, Zeit im OTR-Format und Unterstriche werden entfernt
|
||||
usercomment=`cat "$tmp/$CUTLIST" | grep "usercomment=" | sed "s/usercomment\=//g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}[ _][0-9]\{2\}[\-][0-9]\{2\}/Datum_Zeit/g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}/Datum/g;s/_/ /g" | /usr/bin/tr -d "\r" ` #| awk -F. '{print $1}'`
|
||||
usercomment=`cat "$tmp/$CUTLIST" | grep "UserComment=" | sed "s/UserComment\=//g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}[ _][0-9]\{2\}[\-][0-9]\{2\}/Datum_Zeit/g;s/[0-9]\{2,4\}[.][0-9]\{1,2\}[.][0-9]\{1,2\}/Datum/g;s/_/ /g" | /usr/bin/tr -d "\r" ` #| awk -F. '{print $1}'`
|
||||
|
||||
if echo "$SuggestedMovieName" | grep -q "[sST]\?[0-9]\{1,2\}[.\-xX]\?[eE]\?[0-9]\{1,2\}" ; then # [[:space:]] # S01E01 / S01.E01 / 01-01 / 01x01 / teilweise ohne führende Null
|
||||
#CL_serieninfo=$(parseRegex "$SuggestedMovieName" ".[sST]?[0-9]{1,2}[.\-xX]?[eE]?[0-9]{1,2}" | head -n1) # head -n1: nur der erste Fund im String wird verwendet
|
||||
|
@ -1545,9 +1591,9 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
|
||||
# für ARMv7 unterstützt avcut noch nicht die Operanten -i & -o ==> Abhilfe: avcut-0.4 für ARMv7 kompilieren (ohne Nachteil)
|
||||
if [ $machinetyp = "x86_64" ] || [ $machinetyp = "i686" ]; then
|
||||
AVCUTLOG=$(time nice -n $niceness $avcut -p "${APPDIR}/includes/avcut_otr.profile" -i "$film" -o "$outputfile" $time 2>&1) # Befehl ausführen
|
||||
AVCUTLOG=$(time $avcut -p "${APPDIR}/includes/avcut_otr.profile" -i "$film" -o "$outputfile" $time 2>&1) # Befehl ausführen
|
||||
else
|
||||
AVCUTLOG=$(time nice -n $niceness $avcut "$film" "$outputfile" $time 2>&1) # noch avcut v0.2 mit entsprechender Parameterangabe
|
||||
AVCUTLOG=$(time $avcut "$film" "$outputfile" $time 2>&1) # noch avcut v0.2 mit entsprechender Parameterangabe
|
||||
fi
|
||||
|
||||
echo -e; echo -n "Die Schnittpunkte befinden sich"
|
||||
|
@ -1559,7 +1605,7 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
fi
|
||||
else
|
||||
echo "> Übergebe die Cuts an avisplit/avimerge"
|
||||
AVISPLITLOG=$(nice -n $niceness avisplit -i "$film" -o "$outputfile" -t $time -c 1>/dev/null) # Hier wird avisplit gestartet, avimerge wird on-the-fly über den Parameter -c gestartet
|
||||
AVISPLITLOG=$(avisplit -i "$film" -o "$outputfile" -t $time -c 1>/dev/null) # Hier wird avisplit gestartet, avimerge wird on-the-fly über den Parameter -c gestartet
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo "avisplit Command: avisplit -i $film -o $outputfile -t $time -c"
|
||||
echo "avisplit-LOG: $AVISPLITLOG"
|
||||
|
@ -1577,6 +1623,18 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
echo 2 > /dev/ttyS1 #short beep
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$filedestname] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
fi
|
||||
|
@ -1699,9 +1757,9 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
echo "okey"
|
||||
LOCAL_CUTLIST="${i}.cutlist"
|
||||
AC_getlocalcutlist_withoutCheck
|
||||
elif [ -f "${OTRkeydir}/${filename}.cutlist" ]; then # die Cutlist muss sich im Downloadordner / Quellordner befinden und den gleichen Namen wie der Film haben (inkl. Dateiendung .avi / .mp4 vor .cutlist)
|
||||
elif [ -f "${OTRkeydir}${filename}.cutlist" ]; then # die Cutlist muss sich im Downloadordner / Quellordner befinden und den gleichen Namen wie der Film haben (inkl. Dateiendung .avi / .mp4 vor .cutlist)
|
||||
echo "okey"
|
||||
LOCAL_CUTLIST="${OTRkeydir}/${filename}.cutlist"
|
||||
LOCAL_CUTLIST="${OTRkeydir}${filename}.cutlist"
|
||||
AC_getlocalcutlist_withoutCheck
|
||||
else
|
||||
echo -e "Keine lokale Cutlist gefunden!"
|
||||
|
@ -1749,7 +1807,7 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
if [ $dsmtextnotify = "on" ] ; then
|
||||
title=${filename%.*}
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$title] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$title] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -1757,6 +1815,18 @@ if [ $OTRcutactiv = "on" ] ; then
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$title] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
fi
|
||||
|
@ -1852,7 +1922,7 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
|
||||
# ------- DEMUX:
|
||||
# ------- Audio extrahieren / konvertieren:
|
||||
AUDIODEMUXINFO=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -i "$i" -c:a copy -vn "$audiofile" 2>&1)
|
||||
AUDIODEMUXINFO=$($ffmpeg -loglevel $ffloglevel -i "$i" -c:a copy -vn "$audiofile" 2>&1)
|
||||
if [ $LOGlevel = "2" ] ; then #aufgeblähtes LOG bei AC3-Audio …
|
||||
echo "ffmpeg-AudioDemux LOG: $AUDIODEMUXINFO"
|
||||
fi
|
||||
|
@ -1874,19 +1944,19 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
# ------- Audio normalisieren:
|
||||
volumeinfo=$(ffmpeg -i "$audiofile" -af "volumedetect" -f null - 2>&1 | awk '-F: ' '/max_volume/ { gsub(/ .*/, "", $2); print $2 }' | sed 's/-//g') # |grep max_volume | awk -F: '{ print $2 }' | sed 's/ dB//g' | sed 's/ -//g')
|
||||
echo "Lautstärkeanhebung um: $volumeinfo dB"
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -threads 2 -loglevel $ffloglevel -i "$audiofile" -c:a libfdk_aac -b:a "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -threads 2 -loglevel $ffloglevel -i "$audiofile" -c:a libfdk_aac -b:a "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
else
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -threads 2 -loglevel $ffloglevel -i "$audiofile" -c:a libfdk_aac -b:a "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -threads 2 -loglevel $ffloglevel -i "$audiofile" -c:a libfdk_aac -b:a "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
fi
|
||||
elif $(echo "$encoders" | grep -q "AAC (Advanced Audio Coding)" ) ; then # Native FFmpeg AAC encoder
|
||||
echo "Erkannter Encoder: nativ (ffmpeg > 3.0) [2.Wahl]"
|
||||
if [ $normalizeAudio = "on_" ] ; then
|
||||
if [ $normalizeAudio = "on" ] ; then
|
||||
# ------- Audio normalisieren:
|
||||
volumeinfo=$(ffmpeg -i "$audiofile" -af "volumedetect" -f null - 2>&1 | awk '-F: ' '/max_volume/ { gsub(/ .*/, "", $2); print $2 }' | sed 's/-//g') # |grep max_volume | awk -F: '{ print $2 }' | sed 's/ dB//g' | sed 's/ -//g')
|
||||
echo "Lautstärkeanhebung um: $volumeinfo dB"
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -c:a aac -strict -2 -b:a "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -c:a aac -strict -2 -b:a "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
else
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -c:a aac -strict -2 -b:a "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -c:a aac -strict -2 -b:a "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
fi
|
||||
elif $(echo "$encoders" | grep -q libfaac ) ; then # libfaac > syno-ffmpeg
|
||||
echo "Erkannter Encoder: libfaac [3.Wahl]"
|
||||
|
@ -1897,9 +1967,9 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
# ------- Audio normalisieren:
|
||||
volumeinfo=$(ffmpeg -i "$audiofile" -af "volumedetect" -f null - 2>&1 | awk '-F: ' '/max_volume/ { gsub(/ .*/, "", $2); print $2 }' | sed 's/-//g') # |grep max_volume | awk -F: '{ print $2 }' | sed 's/ dB//g' | sed 's/ -//g')
|
||||
echo "Lautstärkeanhebung um: $volumeinfo dB"
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -acodec libfaac -ab "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -acodec libfaac -ab "${OTRaacqal%k}k" -af "volume=$volumeinfo"dB "$audiofile.m4a" 2>&1)
|
||||
else
|
||||
convertLOG=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -acodec libfaac -ab "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
convertLOG=$($ffmpeg -loglevel $ffloglevel -threads 2 -i "$audiofile" -acodec libfaac -ab "${OTRaacqal%k}k" "$audiofile.m4a" 2>&1)
|
||||
fi
|
||||
else
|
||||
echo " finde keinen ffmpeg-Audioencoder!"; echo " Gebe den Pfad zu einer aac-kompatiblen ffmpeg-Version an."
|
||||
|
@ -1917,7 +1987,7 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
fi
|
||||
|
||||
# ------- Video extrahieren:
|
||||
VIDEODEMUXINFO=$(nice -n $niceness $ffmpeg -loglevel $ffloglevel -i "$i" -an -c:v copy "$videofile" 2>&1)
|
||||
VIDEODEMUXINFO=$($ffmpeg -loglevel $ffloglevel -i "$i" -an -c:v copy "$videofile" 2>&1)
|
||||
if [ $LOGlevel = "2" ] ; then #aufgeblähtes LOG bei AC3-Audio …
|
||||
echo "ffmpeg-VideoDemux LOG:"
|
||||
echo "$VIDEODEMUXINFO"
|
||||
|
@ -1944,9 +2014,9 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
echo "Audio-Video-Sync: Audio wird um ${AUDIODELAY}ms verzögert"
|
||||
videofiledelay="$videofile"
|
||||
fi
|
||||
nice -n $niceness mp4box $mp4boxloglevel -add "$videofiledelay" -add "$audiofiledelay" -fps $fps -tmp "$pfad" "${pfad}${title}.mp4"
|
||||
mp4box $mp4boxloglevel -add "$videofiledelay" -add "$audiofiledelay" -fps $fps -tmp "$pfad" "${pfad}${title}.mp4"
|
||||
else
|
||||
nice -n $niceness mp4box $mp4boxloglevel -add "$videofile" -add "$audiofile" -fps $fps -tmp "$pfad" "${pfad}${title}.mp4"
|
||||
mp4box $mp4boxloglevel -add "$videofile" -add "$audiofile" -fps $fps -tmp "$pfad" "${pfad}${title}.mp4"
|
||||
fi
|
||||
|
||||
# ------- Temp löschen:
|
||||
|
@ -1969,7 +2039,7 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
synoindex -a "${pfad}${title}.mp4"
|
||||
if [ $dsmtextnotify = "on" ] ; then
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$title] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$title] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -1977,6 +2047,18 @@ if [ $OTRavi2mp4active = "on" ] && [ ! -z "$filetest" ] ; then
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$title] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
fi
|
||||
|
@ -2166,7 +2248,7 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
|||
scantype="i"
|
||||
fi
|
||||
scantype="" # deaktiviert
|
||||
# echo "Scantype: ${scantype}"
|
||||
# echo "Scantype: ${scantype}"
|
||||
# ------------------ Auflösung:
|
||||
height=`echo "$ffprobeInfo" | jq '.streams[0].height' `
|
||||
echo "Auflösung Höhe: ${height}"
|
||||
|
@ -2247,7 +2329,7 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
|||
# --description
|
||||
# --artwork
|
||||
# --genre
|
||||
AtomicParsleyLOG=$(nice -n $niceness AtomicParsley "${WORKDIR}${NewName}" --overWrite --TVNetwork "$Channel" --TVShowName "$serietitle" --TVEpisode "$episodetitle" --TVSeasonNum "$season" --TVEpisodeNum "$episode" --title "$title" 2>&1)
|
||||
AtomicParsleyLOG=$(AtomicParsley "${WORKDIR}${NewName}" --overWrite --TVNetwork "$Channel" --TVShowName "$serietitle" --TVEpisode "$episodetitle" --TVSeasonNum "$season" --TVEpisodeNum "$episode" --title "$title" 2>&1)
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " AtomicParsleyLOG= $AtomicParsleyLOG"
|
||||
fi
|
||||
|
@ -2285,7 +2367,7 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
|||
synoindex -a "${WORKDIR}${NewName}"
|
||||
if [ $dsmtextnotify = "on" ] ; then
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$title] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$title] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -2293,6 +2375,18 @@ for i in $(find "$WORKDIR" -maxdepth 1 -name "*TVOON*avi" -o -name "*TVOON*mp4"
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Filme [$film] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo "PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n "PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo "PushBullet-TOKEN nicht erkannt"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
fi
|
||||
|
@ -2399,12 +2493,11 @@ if [ $OTRrenameactiv = "on" ] && [ $firstrunonday == "1" ] ; then
|
|||
echo " -> SQLupdate: $sSQLupdate"
|
||||
fi
|
||||
sqlite3 ${APPDIR}/app/etc/synOTR.sqlite "$sSQLupdate"
|
||||
# elif [ ! -z "$serieninfo" ] ; then # ist nicht zuverlässig < 2018-06-14
|
||||
elif [[ "$OTRID" =~ $regInt ]]; then # Ist die OTR-Id eine echte Zahl?
|
||||
if jq -e . >/dev/null 2>&1 <<<"$serieninfo"; then # prüfen, ob korrektes JSON-Format verarbeitet werden kann (https://stackoverflow.com/questions/46954692/check-if-string-is-a-valid-json-with-jq)
|
||||
echo -e "gefunden:"
|
||||
echo "OTRID: $OTRID"
|
||||
serietitle=`echo "$serieninfo" | jq -r '.Serie' | sed "s/://g" ` # jq ist ein Kommandozeilen-JSON-Parser
|
||||
serietitle=`echo "$serieninfo" | jq -r '.Serie' | sed "s/://g" `
|
||||
echo "serietitle: $serietitle"
|
||||
season=`echo "$serieninfo" | awk -F, '{print $3}' | awk -F: '{print $2}' | sed "s/\"//g"`
|
||||
season="$(printf '%02d' "$season")" # 2stellig mit führender Null
|
||||
|
@ -2480,7 +2573,7 @@ if [ $OTRrenameactiv = "on" ] && [ $firstrunonday == "1" ] ; then
|
|||
# --description
|
||||
# --artwork
|
||||
# --genre
|
||||
AtomicParsleyLOG=$(nice -n $niceness AtomicParsley "${DESTDIR}/$NewName" --overWrite --TVNetwork "$Channel" --TVShowName "$serietitle" --TVEpisode "$episodetitle" --TVSeasonNum "$season" --TVEpisodeNum "$episode" --title "$title" 2>&1)
|
||||
AtomicParsleyLOG=$(AtomicParsley "${DESTDIR}/$NewName" --overWrite --TVNetwork "$Channel" --TVShowName "$serietitle" --TVEpisode "$episodetitle" --TVSeasonNum "$season" --TVEpisodeNum "$episode" --title "$title" 2>&1)
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " AtomicParsleyLOG= $AtomicParsleyLOG"
|
||||
fi
|
||||
|
@ -2513,7 +2606,7 @@ if [ $OTRrenameactiv = "on" ] && [ $firstrunonday == "1" ] ; then
|
|||
|
||||
if [ $dsmtextnotify = "on" ] ; then
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$title] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$title] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -2546,7 +2639,6 @@ if [ $OTRrenameactiv = "on" ] && [ $firstrunonday == "1" ] ; then
|
|||
sqlite3 ${APPDIR}/app/etc/synOTR.sqlite "$sSQLupdate"
|
||||
fi
|
||||
sleep 15 # Wartezeit in Sekunden, um die Serverlast auf otr-serien.de zu reduzieren
|
||||
# date
|
||||
else
|
||||
echo " -> nicht gefunden: $file_rename"
|
||||
echo " L==> Datei liegt nicht mehr im Zielordner [$WORKDIR]"
|
||||
|
@ -2712,7 +2804,7 @@ if [ $useWORKDIR == "yes" ] && [ ! -z "$filetest" ]; then
|
|||
|
||||
if [ $dsmtextnotify = "on" ] ; then
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$filename] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$filename] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -2720,6 +2812,18 @@ if [ $useWORKDIR == "yes" ] && [ ! -z "$filetest" ]; then
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$filename] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
|
@ -2744,7 +2848,7 @@ if [ $useWORKDIR == "yes" ] && [ ! -z "$filetest" ]; then
|
|||
|
||||
if [ $dsmtextnotify = "on" ] ; then
|
||||
sleep 1
|
||||
synodsmnotify $MessageTo "synOTR" "[$filename] ist fertig"
|
||||
synodsmnotify $MessageTo "synOTR" "Film [$filename] ist fertig"
|
||||
sleep 1
|
||||
fi
|
||||
if [ $dsmbeepnotify = "on" ] ; then
|
||||
|
@ -2752,6 +2856,18 @@ if [ $useWORKDIR == "yes" ] && [ ! -z "$filetest" ]; then
|
|||
echo 2 > /dev/ttyS1 #short beep
|
||||
sleep 1
|
||||
fi
|
||||
if [ ! -z $PBTOKEN ] ; then
|
||||
PB_LOG=`curl $cURLloglevel --header "Access-Token:${PBTOKEN}" https://api.pushbullet.com/v2/pushes -d type=note -d title="synOTR" -d body="Film [$filename] ist fertig."`
|
||||
if [ $LOGlevel = "2" ] ; then
|
||||
echo " PushBullet-LOG:"
|
||||
echo "$PB_LOG"
|
||||
elif echo "$PB_LOG" | grep -q "error"; then # für Loglevel 1 nur Errorausgabe
|
||||
echo -n " PushBullet-Error: "
|
||||
echo "$PB_LOG" | jq -r '.error_code'
|
||||
fi
|
||||
else
|
||||
echo " (PushBullet-TOKEN nicht gesetzt)"
|
||||
fi
|
||||
wget --timeout=30 --tries=2 -q -O - "http://${synotrdomain}/synOTR/synOTR_FILECOUNT" >/dev/null 2>&1
|
||||
needindex=1
|
||||
else
|
||||
|
@ -2781,6 +2897,73 @@ if [ -f "/usr/syno/bin/synoindex" ] && [ $firstrunonday == "1" ] && [ $reindex =
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
PURGELOG()
|
||||
{
|
||||
#########################################################################################
|
||||
# Diese Funktion löscht zu erst alle leeren Logs und anschließend die überzähligen #
|
||||
#########################################################################################
|
||||
|
||||
if [ -z $LOGmax ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
logdir="${DECODIR}/_LOGsynOTR/"
|
||||
|
||||
# leere Logs löschen:
|
||||
for i in $(ls -tr "${logdir}" | egrep -o '^synOTR.*.log$') # Auflistung aller LOG-Dateien
|
||||
do
|
||||
if [ $( cat "${logdir}$i" | tail -n9 | head -n4 | wc -c ) -le 15 ] && cat "${logdir}$i" | grep -q "synOTR ENDE" ; then
|
||||
if [ $endgueltigloeschen = "on" ] ; then
|
||||
rm "${logdir}$i"
|
||||
else
|
||||
mv "${logdir}$i" "$OTRkeydeldir"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# überzählige Logs löschen:
|
||||
count2del=$( expr $( ls -t "${logdir}" | egrep -o '^synOTR.*.log$' | wc -l ) - $LOGmax ) # wie viele Dateien sind überzählig
|
||||
if [ $count2del -ge 0 ]; then
|
||||
for i in `ls -tr "${logdir}" | egrep -o '^synOTR.*.log$' | head -n${count2del} `
|
||||
do
|
||||
if [ $endgueltigloeschen = "on" ] ; then
|
||||
rm "${logdir}$i"
|
||||
else
|
||||
mv "${logdir}$i" "$OTRkeydeldir"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# überzählige searches löschen:
|
||||
count2del=$( expr $(ls -t "${logdir}" | egrep -o '^search.*.xml$' | wc -l) - $LOGmax )
|
||||
if [ ${count2del} -ge 0 ]; then
|
||||
for i in `ls -tr "${logdir}" | egrep -o '^search.*.xml$' | head -n${count2del} `
|
||||
do
|
||||
if [ $endgueltigloeschen = "on" ] ; then
|
||||
rm "${logdir}$i"
|
||||
else
|
||||
mv "${logdir}$i" "$OTRkeydeldir"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# überzählige cutlists löschen:
|
||||
count2del=$( expr $(ls -t "${logdir}" | egrep -o '.*.cutlist$' | wc -l) - $LOGmax )
|
||||
if [ ${count2del} -ge 0 ]; then
|
||||
for i in `ls -tr "${logdir}" | egrep -o '.*.cutlist$' | head -n${count2del} `
|
||||
do
|
||||
if [ $endgueltigloeschen = "on" ] ; then
|
||||
rm "${logdir}$i"
|
||||
else
|
||||
mv "${logdir}$i" "$OTRkeydeldir"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
|
||||
# _______________________________________________________________________________
|
||||
# | |
|
||||
# | AUFRUF DER FUNKTIONEN |
|
||||
|
@ -2796,14 +2979,15 @@ fi
|
|||
OTRautocut
|
||||
OTRavi2mp4
|
||||
OTRrename
|
||||
OTRopenrename
|
||||
# OTRopenrename # 2019-10 deaktivert, da otr-serien.de die Pflege neuer Serien eingestellt hat
|
||||
MOVE2DESTDIR
|
||||
FRESHUPMEDIAINDEX
|
||||
|
||||
PURGELOG
|
||||
|
||||
echo -e; echo -e
|
||||
echo " -----------------------------------"
|
||||
echo " | ==> synOTR ENDE <== |"
|
||||
echo " -----------------------------------"
|
||||
echo -e; echo " Gesamtzeit: $(sec_to_time $(expr $(date +%s)-${UNIXTIME}) )"
|
||||
|
||||
exit
|
||||
|
|
|
@ -156,7 +156,8 @@ timer_scriptname="/usr/syno/synoman/webman/3rdparty/synOTR/synOTR-start.sh"
|
|||
<p> </p>
|
||||
<div class="title">Zeitplan einrichten</div>
|
||||
<div class="info">
|
||||
<h3>» 1. Wie oft soll synOTR pro Tag (pro Woche) ausgeführt werden?</h3>
|
||||
<h3>» 1. Wie oft soll synOTR pro Tag (pro Woche) ausgeführt werden?<br>
|
||||
<span style="color: #BD0010;">INFO: Der DSM-Sicherheitsbereater wird den zusätzlichen Croneintrag (da für DSM unbekannt) bemängeln!</span></h3>
|
||||
<div>
|
||||
<div>
|
||||
<input class="left" type="radio" id="radio-one" name="timer_times" value="one" '${checked_one:+checked}' '${disable_times:+disabled}'/>
|
||||
|
|
|
@ -28,9 +28,15 @@
|
|||
if ! cat ./$CONFIG | grep -q "dsmbeepnotify" ; then
|
||||
echo "dsmbeepnotify=\"on\"" >> ./$CONFIG
|
||||
fi
|
||||
if ! cat ./$CONFIG | grep -q "PBTOKEN" ; then
|
||||
echo "PBTOKEN=\"\"" >> ./$CONFIG
|
||||
fi
|
||||
if ! cat ./$CONFIG | grep -q "LOGlevel" ; then
|
||||
echo "LOGlevel=\"1\"" >> ./$CONFIG
|
||||
fi
|
||||
if ! cat ./$CONFIG | grep -q "LOGmax" ; then
|
||||
echo "LOGmax=\"1\"" >> ./$CONFIG
|
||||
fi
|
||||
if ! cat ./$CONFIG | grep -q "reindex" ; then
|
||||
echo "reindex=\"1\"" >> ./$CONFIG
|
||||
fi
|
||||
|
|
|
@ -49,8 +49,10 @@ MP4BOX_DELAY="100"
|
|||
#--------------------------------------------------------------------
|
||||
dsmtextnotify="on"
|
||||
MessageTo="admin"
|
||||
PBTOKEN=""
|
||||
dsmbeepnotify="on"
|
||||
LOGlevel="1"
|
||||
LOGmax=""
|
||||
reindex=1
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
@ -1,4 +1,35 @@
|
|||
Release Notes
|
||||
Release Notes
|
||||
|
||||
4.2.2 (2023-06-11)
|
||||
IMPLEMENTIERUNGEN:
|
||||
- OTR-Decoder (x86_64) für DSM7.2 ergänzt
|
||||
|
||||
4.2.1 (2021-05-11)
|
||||
IMPLEMENTIERUNGEN:
|
||||
- OTR-Decoder (x86_64) aktualisiert
|
||||
|
||||
4.2.0 (RELEASE)
|
||||
IMPLEMENTIERUNGEN:
|
||||
- die I/O-Priorität wurde herabgesetzt (möglicherweise nur auf x86_64 / i386 und ARMv7 ungetestet)
|
||||
- das nachträgliche Suchen von Serieninformationen auf otr-serien.de wurde deaktiviert, da die Informationspflege auf der Seite eingestellt wurde.
|
||||
BUGFIXES:
|
||||
- es wurde ein Fehler behoben, aufgrund dessen synOTR gestartet werden konnte, obwohl der vorhergehende Arbeitsablauf noch nicht abgeschlossen war
|
||||
- bestimmte Sonderzeichen im Episodentitel von thetvdb führten zu einer fehlerhaften Umbenennung
|
||||
|
||||
4.1.1 (RELEASE)
|
||||
IMPLEMENTIERUNGEN:
|
||||
- Die Berechtigung für das Paket synOTR kann in der DSM-Systemsteuerung > Berechtigung für einzelne User konfiguriert werden (bitte beachte, dass nur eine gemeinsame Konfiguration verwendet wird!).
|
||||
BUGFIXES:
|
||||
- es wurde ein Fehler behoben, aufgrund dessen aus dem Autorkommentar einer Cutlist keine Serieninformation abgeleitet werden konnte (der Parameter wurde scheinbar umbenannt).
|
||||
|
||||
4.1.0 (RELEASE)
|
||||
IMPLEMENTIERUNGEN:
|
||||
- PushBullet integriert. Dazu muss lediglich der persönliche Token in der Konfiguration hinterlegt werden
|
||||
- Die max. Anzahl von LOGs kann nun begrenzt werden. Dadurch werden zu erst alle leeren Logs und anschließend die überzähligen gelöscht
|
||||
BUGFIXES:
|
||||
- es wurde ein Fehler behoben, dass bei aktivem nativen aac-Encoder keine Normalisierung der Tonspur möglich war
|
||||
- Detailänderungen in der GUI
|
||||
- Detailänderungen der Benachrichtigungstexte
|
||||
|
||||
4.0.8 (RELEASE)
|
||||
BUGFIXES:
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
package="synOTR"
|
||||
displayname="synOTR"
|
||||
version="4.0.8"
|
||||
version="4.2.2"
|
||||
thirdparty="yes"
|
||||
description="SynOTR liefert einen Workflow für TV-Aufnahmen von onlineTVrecorder (OTR) auf Synology NAS. synOTR übernimmt *decodieren *AC3-muxing (BETA) *schneiden *MP4-Konvertierung und *umbenennung (inkl. Serieninformationen von www.thetvdb.com und www.otr-serien.de). onlineTVrecorder (OTR) ist der freie Videorecorder im Internet, der rund um die Uhr fast alle Sendungen von rund 100 TV-Sender aus Deutschland, USA, UK und anderen Lädern aufnimmt."
|
||||
description="SynOTR provides a workflow for TV recordings from onlineTVrecorder (OTR / https://onlinetvrecorder.com) for Synology NAS. synOTR performs *decoding *AC3-muxing (BETA) *cutting *MP4 conversion and *renaming (including Series information from www.thetvdb.com and www.otr-serien.de). onlineTVrecorder (OTR) is the free video recorder on the Internet that records almost all broadcasts from around 100 TV stations in Germany, USA, UK and other countries around the clock."
|
||||
description_enu="SynOTR provides a workflow for TV recordings from onlineTVrecorder (OTR / https://onlinetvrecorder.com) for Synology NAS. synOTR performs *decoding *AC3-muxing (BETA) *cutting *MP4 conversion and *renaming (including Series information from www.thetvdb.com and www.otr-serien.de). onlineTVrecorder (OTR) is the free video recorder on the Internet that records almost all broadcasts from around 100 TV stations in Germany, USA, UK and other countries around the clock."
|
||||
description_ger="SynOTR liefert einen Workflow für TV-Aufnahmen von onlineTVrecorder (OTR / https://onlinetvrecorder.com) auf Synology NAS. synOTR übernimmt *decodieren *AC3-muxing (BETA) *schneiden *MP4-Konvertierung und *umbenennung (inkl. Serieninformationen von www.thetvdb.com und www.otr-serien.de). onlineTVrecorder (OTR) ist der freie Videorecorder im Internet, der rund um die Uhr fast alle Sendungen von rund 100 TV-Sender aus Deutschland, USA, UK und anderen Lädern aufnimmt."
|
||||
maintainer="geimist"
|
||||
admin_port=""
|
||||
arch="noarch"
|
||||
firmware="6.0-7321"
|
||||
startable="yes"
|
||||
reloadui="yes"
|
||||
silent_install="no"
|
||||
silent_install="yes"
|
||||
silent_upgrade="yes"
|
||||
silent_uninstall="no"
|
||||
dsmappname=SYNO.SDS.synOTR.Application
|
||||
|
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 50 KiB |
|
@ -3,8 +3,7 @@
|
|||
"step_title" : "Wichtiger Hinweis bei einem Upgrade!",
|
||||
"items" : [
|
||||
{
|
||||
"desc" : "<p>Aufgrund eines Problems im DiskStationManager kann synOTR nach einem Upgrade nicht geöffnet werden. Daher <u>ist es nach einem Upgrage notwenig die DSM-Seite zu aktualisieren / neuzuladen (F5)</u> oder synOTR in einem neuen Fenster zu öffnen.</p><br>
|
||||
<p>Eine Neuinstallation sollte davon nicht betroffen sein.</p>"
|
||||
"desc" : "<p>Aufgrund eines Problems im DiskStationManager kann synOTR nach einem Upgrade nicht geöffnet werden. Daher <u>ist es nach einem Upgrage notwenig die DSM-Seite zu aktualisieren / neuzuladen (F5)</u> oder synOTR in einem neuen Fenster zu öffnen.</p>"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
178
build_spk.sh
|
@ -3,7 +3,7 @@
|
|||
# Scriptaufruf:
|
||||
#----------------------------------------------------------------------------------------
|
||||
# erstellt das SPK aus dem aktuellen master-branch vom Server:
|
||||
# sh ./build_spk.sh
|
||||
# sh ./build_spk.sh
|
||||
#
|
||||
# erstellt das SPK aus dem als Parameter übergebenen Release vom Server:
|
||||
# sh ./build_spk.sh 4.0.7
|
||||
|
@ -11,141 +11,133 @@
|
|||
#----------------------------------------------------------------------------------------
|
||||
# Ordnerstruktur:
|
||||
#----------------------------------------------------------------------------------------
|
||||
# ./[NAME-DES-SPK]/Build --> Arbeitsumgebung (erstellen/editieren/verschieben)
|
||||
# ./[NAME-DES-SPK]/Pack --> Archivordner zum Aufbau des SPK (Startscripte etc.)
|
||||
# ./APP / Build --> Arbeitsumgebung (erstellen/editieren/verschieben)
|
||||
# ./PKG / Pack --> Archivordner zum Aufbau des SPK (Startscripte etc.)
|
||||
#
|
||||
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
build_tmp=$(mktemp -d -t tmp.XXXXXXXXXX)
|
||||
|
||||
function finish {
|
||||
git worktree remove --force "$build_tmp"
|
||||
rm -rf "$build_tmp"
|
||||
}
|
||||
trap finish EXIT
|
||||
|
||||
#######
|
||||
|
||||
project="synOTR"
|
||||
|
||||
#######
|
||||
|
||||
skriptuser=`whoami`
|
||||
if [ ${skriptuser} != "root" ]; then
|
||||
echo "Dieses Skript muss von Root ausgeführt werden!"
|
||||
exit 1
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
echo 'Error: git is not installed.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gitpath=`which git`
|
||||
if [ -z ${gitpath} ]; then
|
||||
echo "Das Programm git konnte nicht gefunden werden."
|
||||
exit 1
|
||||
if ! [ -x "$(command -v fakeroot)" ]; then
|
||||
if [ $(whoami) != "root" ]; then
|
||||
echo "WARNUNG: fakeroot ist nicht installiert und du bist auch nicht root!" >&2
|
||||
exit 1
|
||||
else
|
||||
FAKEROOT=""
|
||||
fi
|
||||
else
|
||||
FAKEROOT=$(command -v fakeroot)
|
||||
fi
|
||||
|
||||
# Arbeitsverzeichnis auslesen und hineinwechseln:
|
||||
# ---------------------------------------------------------------------
|
||||
APPDIR=$(cd $(dirname $0);pwd)
|
||||
cd ${APPDIR}
|
||||
# shellcheck disable=SC2086
|
||||
APPDIR=$(cd "$(dirname $0)";pwd)
|
||||
cd "${APPDIR}"
|
||||
|
||||
build_tmp="${APPDIR}/build_tmp"
|
||||
dir=${APPDIR}
|
||||
git pull # aktualisieren
|
||||
|
||||
# Ausführung: Erstellen des SPK
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " git holt die aktuelle Version ..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
buildversion=${1:-latest}
|
||||
taggedversions=$(git tag)
|
||||
|
||||
if [ -d "./${project}" ] ; then
|
||||
cd ${project}
|
||||
git pull
|
||||
versions=`git tag`
|
||||
branches=`git branch -a`
|
||||
cd ${APPDIR}
|
||||
echo " - INFO: Erstelle den temporären Buildordner und kopiere Sourcen hinein ..."
|
||||
|
||||
git worktree add --force "$build_tmp" "$(git rev-parse --abbrev-ref HEAD)"
|
||||
pushd "$build_tmp"
|
||||
#set_spk_version="latest-$(date +%s)-$(git log -1 --format="%h")"
|
||||
set_spk_version="$(git branch --show-current)_latest_($(date +%Y)-$(date +%m)-$(date +%d)_$(date +%H)-$(date +%M))_$(git log -1 --format="%h")"
|
||||
|
||||
if echo "$taggedversions" | egrep -q "$buildversion"; then
|
||||
echo "git checkout zu $buildversion"
|
||||
git checkout "$buildversion"
|
||||
set_spk_version="$buildversion"
|
||||
else
|
||||
git clone https://geimist.eu:30443/geimist/${project}.git
|
||||
cd ${project}
|
||||
versions=`git tag`
|
||||
branches=`git branch -a`
|
||||
cd ${APPDIR}
|
||||
echo "ACHTUNG: Die gewünschte Version wurde im Repository nicht gefunden!"
|
||||
echo "Die $(git rev-parse --abbrev-ref HEAD)-branch wird verwendet!"
|
||||
fi
|
||||
|
||||
# welche Version soll gebaut werden:
|
||||
if [ -z $1 ]; then # wurde keine gewünschte Version angegeben:
|
||||
echo "git checkout zu master-branch"
|
||||
cd ${project}
|
||||
git checkout master
|
||||
cd ${APPDIR}
|
||||
# build_version=`cat "${APPDIR}/${project}/Pack/INFO" | grep version | awk -F '"' '{print $2}'`
|
||||
build_version=`get_key_value "${APPDIR}/${project}/Pack/INFO" version`
|
||||
set_spk_version="latest_(`date +%Y`-`date +%m`-`date +%d`_`date +%H`-`date +%M`)"
|
||||
# fallback to old app dir
|
||||
if [ -d "$build_tmp"/Build ]; then
|
||||
APP=Build
|
||||
else
|
||||
if echo "$versions" | egrep -q "$1" || echo "$branches" | egrep -q "$1"; then # wurde eine gewünschte Version angegeben:
|
||||
echo "git checkout zu $1"
|
||||
cd ${project}
|
||||
git checkout "$1"
|
||||
set_spk_version="v${1}"
|
||||
cd ${APPDIR}
|
||||
build_version=`get_key_value "${APPDIR}/${project}/Pack/INFO" version`
|
||||
else # ist die gewünschte Version nicht vorhanden:
|
||||
echo "ACHTUNG: Die gewünschte Version wurde im Repository nicht gefunden!"
|
||||
echo "Der master-branch wird verwendet!"
|
||||
cd ${project}
|
||||
git checkout master
|
||||
cd ${APPDIR}
|
||||
build_version=`get_key_value "${APPDIR}/${project}/Pack/INFO" version`
|
||||
set_spk_version="latest_v${build_version}_(`date +%Y`-`date +%m`-`date +%d`_`date +%H`-`date +%M`)"
|
||||
fi
|
||||
APP=APP
|
||||
fi
|
||||
|
||||
# fallback to old pkg dir
|
||||
if [ -d "$build_tmp"/Pack ]; then
|
||||
PKG=Pack
|
||||
else
|
||||
PKG=PKG
|
||||
fi
|
||||
|
||||
build_version=$(grep version "$build_tmp/$PKG/INFO" | awk -F '"' '{print $2}')
|
||||
#set_spk_version=$build_version
|
||||
|
||||
echo " - INFO: Es wird foldende Version geladen und gebaut: $set_spk_version - BUILD-Version (INFO-File): $build_version"
|
||||
|
||||
echo " - INFO: Erstelle den temporären Buildordner und kopiere Sourcen hinein ..."
|
||||
if [ -d "./build_tmp" ] ; then
|
||||
rm -rf "./build_tmp"
|
||||
fi
|
||||
mkdir "${build_tmp}"
|
||||
|
||||
cp -r "${APPDIR}/${project}"/* "${build_tmp}/"
|
||||
|
||||
# Ausführung: Erstellen des SPK
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " SPK wird erstellt..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " SPK wird erstellt..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
|
||||
# Falls versteckter Ordners /.helptoc vorhanden, diesen nach /helptoc umbenennen
|
||||
if test -d "${build_tmp}/.helptoc"; then
|
||||
echo ""
|
||||
echo " - INFO: Versteckter Ordner /.helptoc wurde lokalisiert und nach /helptoc umbenannt"
|
||||
mv ${build_tmp}/.helptoc ${build_tmp}/helptoc
|
||||
fi
|
||||
if test -d "${build_tmp}/.helptoc"; then
|
||||
echo ""
|
||||
echo " - INFO: Versteckter Ordner /.helptoc wurde lokalisiert und nach /helptoc umbenannt"
|
||||
mv "${build_tmp}/.helptoc" "${build_tmp}/helptoc"
|
||||
fi
|
||||
|
||||
# Rechte anpassen
|
||||
echo ""
|
||||
echo " - INFO: Dateirechte anpassen ..."
|
||||
for i in $(find "${build_tmp}/Pack/" -type f)
|
||||
for i in $(find "${build_tmp}/$APP/" -type f)
|
||||
do
|
||||
# echo "ändere $APP: $i"
|
||||
chmod 755 "$i"
|
||||
chown root:root "$i"
|
||||
done
|
||||
|
||||
for i in $(find "${build_tmp}/Build/" -type f)
|
||||
for i in $(find "${build_tmp}/$PKG/" -type f)
|
||||
do
|
||||
# echo "ändere $PKG: $i"
|
||||
chmod 755 "$i"
|
||||
chown root:root "$i"
|
||||
done
|
||||
|
||||
# Packen und Ablegen der aktuellen Installation in den entsprechenden /Pack - Ordner
|
||||
echo ""
|
||||
echo " - INFO: Das Archiv package.tgz wird erstellt..."
|
||||
|
||||
tar -C ${build_tmp}/Build -czf ${build_tmp}/Pack/package.tgz .
|
||||
|
||||
echo ""
|
||||
echo " - INFO: Das Archiv package.tgz wird erstellt..."
|
||||
|
||||
$FAKEROOT tar -C "${build_tmp}"/"$APP" -czf "${build_tmp}"/"$PKG"/package.tgz .
|
||||
|
||||
# Wechsel in den Ablageort von package.tgz bezüglich Aufbau des SPK's
|
||||
cd ${build_tmp}/Pack
|
||||
cd "${build_tmp}"/"$PKG"
|
||||
|
||||
# Erstellen des eigentlichen SPK's
|
||||
echo ""
|
||||
echo " - INFO: Das SPK wird erstellt..."
|
||||
tar -cf ${project}_$set_spk_version.spk *
|
||||
mv ${project}_$set_spk_version.spk ${APPDIR}
|
||||
|
||||
# Löschen der temporären Daten
|
||||
echo ""
|
||||
echo " - INFO: Der temporäre Ordner wird wieder geschlöscht ..."
|
||||
cd ${APPDIR}
|
||||
if [ -d "./build_tmp" ] ; then
|
||||
rm -rf "./build_tmp"
|
||||
fi
|
||||
echo ""
|
||||
echo " - INFO: Das SPK wird erstellt..."
|
||||
$FAKEROOT tar -cf "${project}"_"$set_spk_version".spk *
|
||||
cp -f "${project}"_"$set_spk_version".spk "${APPDIR}"
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
|
|
178
build_spk_[v1].sh
Executable file
|
@ -0,0 +1,178 @@
|
|||
#!/bin/bash
|
||||
#----------------------------------------------------------------------------------------
|
||||
# Scriptaufruf:
|
||||
#----------------------------------------------------------------------------------------
|
||||
# erstellt das SPK aus dem aktuellen master-branch vom Server:
|
||||
# sh ./build_spk.sh
|
||||
#
|
||||
# erstellt das SPK aus dem als Parameter übergebenen Release vom Server:
|
||||
# sh ./build_spk.sh 4.0.7
|
||||
#
|
||||
#----------------------------------------------------------------------------------------
|
||||
# Ordnerstruktur:
|
||||
#----------------------------------------------------------------------------------------
|
||||
# ./[NAME-DES-SPK]/Build --> Arbeitsumgebung (erstellen/editieren/verschieben)
|
||||
# ./[NAME-DES-SPK]/Pack --> Archivordner zum Aufbau des SPK (Startscripte etc.)
|
||||
#
|
||||
|
||||
project="synOTR"
|
||||
|
||||
skriptuser=`whoami`
|
||||
if [ ${skriptuser} != "root" ]; then
|
||||
echo "Dieses Skript muss von Root ausgeführt werden!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Arbeitsverzeichnis auslesen und hineinwechseln:
|
||||
# ---------------------------------------------------------------------
|
||||
APPDIR=$(cd $(dirname $0);pwd)
|
||||
cd ${APPDIR}
|
||||
|
||||
build_tmp="${APPDIR}/build_tmp"
|
||||
dir=${APPDIR}
|
||||
buildversion=$1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -d "./${project}" ] ; then
|
||||
rm -rf "./${project}"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
gitpull()
|
||||
{
|
||||
|
||||
gitpath=`which git`
|
||||
if [ -z ${gitpath} ]; then
|
||||
echo "Das Programm git konnte nicht gefunden werden."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ausführung: Erstellen des SPK
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " git holt die aktuelle Version ..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
|
||||
if [ -d "./${project}" ] ; then
|
||||
cd ${project}
|
||||
git pull
|
||||
versions=`git tag`
|
||||
cd ${APPDIR}
|
||||
else
|
||||
git clone https://geimist.eu:30443/geimist/${project}.git
|
||||
cd ${project}
|
||||
git pull
|
||||
versions=`git tag`
|
||||
cd ${APPDIR}
|
||||
fi
|
||||
|
||||
|
||||
#build_version=`cat "${APPDIR}/${project}/Pack/INFO" | grep version | awk -F '"' '{print $2}'`
|
||||
|
||||
# welche Version soll gebaut werden:
|
||||
if [ -z $buildversion ]; then
|
||||
echo "git checkout zu master-branch"
|
||||
cd ${project}
|
||||
git checkout master
|
||||
cd ${APPDIR}
|
||||
set_spk_version="latest_(`date +%Y`-`date +%m`-`date +%d`_`date +%H`-`date +%M`)"
|
||||
else
|
||||
if echo "$versions" | egrep -q "$buildversion"; then
|
||||
echo "git checkout zu $buildversion"
|
||||
cd ${project}
|
||||
git checkout "$buildversion"
|
||||
set_spk_version="$buildversion"
|
||||
cd ${APPDIR}
|
||||
else
|
||||
echo "ACHTUNG: Die gewünschte Version wurde im Repository nicht gefunden!"
|
||||
echo "Der master-branch wird verwendet!"
|
||||
cd ${project}
|
||||
git checkout master
|
||||
cd ${APPDIR}
|
||||
set_spk_version="latest_(`date +%Y`-`date +%m`-`date +%d`_`date +%H`-`date +%M`)"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
gitpull
|
||||
|
||||
build_version=$(get_key_value "${APPDIR}/${project}/Pack/INFO" version )
|
||||
|
||||
|
||||
echo " - INFO: Es wird foldende Version geladen und gebaut: $set_spk_version - BUILD-Version (INFO-File): $build_version"
|
||||
|
||||
echo " - INFO: Erstelle den temporären Buildordner und kopiere Sourcen hinein ..."
|
||||
if [ -d "./build_tmp" ] ; then
|
||||
rm -rf "./build_tmp"
|
||||
fi
|
||||
mkdir "${build_tmp}"
|
||||
|
||||
cp -r "${APPDIR}/${project}"/* "${build_tmp}/"
|
||||
|
||||
# Ausführung: Erstellen des SPK
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " SPK wird erstellt..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
|
||||
# Falls versteckter Ordners /.helptoc vorhanden, diesen nach /helptoc umbenennen
|
||||
if test -d "${build_tmp}/.helptoc"; then
|
||||
echo ""
|
||||
echo " - INFO: Versteckter Ordner /.helptoc wurde lokalisiert und nach /helptoc umbenannt"
|
||||
mv ${build_tmp}/.helptoc ${build_tmp}/helptoc
|
||||
fi
|
||||
|
||||
# Rechte anpassen
|
||||
echo ""
|
||||
echo " - INFO: Dateirechte anpassen ..."
|
||||
for i in $(find "${build_tmp}/Pack/" -type f)
|
||||
do
|
||||
# echo "ändere Pack: $i"
|
||||
chmod 755 "$i"
|
||||
chown root:root "$i"
|
||||
done
|
||||
|
||||
for i in $(find "${build_tmp}/Build/" -type f)
|
||||
do
|
||||
# echo "ändere Build: $i"
|
||||
chmod 755 "$i"
|
||||
chown root:root "$i"
|
||||
done
|
||||
|
||||
# Packen und Ablegen der aktuellen Installation in den entsprechenden /Pack - Ordner
|
||||
echo ""
|
||||
echo " - INFO: Das Archiv package.tgz wird erstellt..."
|
||||
|
||||
tar -C ${build_tmp}/Build -czf ${build_tmp}/Pack/package.tgz .
|
||||
|
||||
# Wechsel in den Ablageort von package.tgz bezüglich Aufbau des SPK's
|
||||
cd ${build_tmp}/Pack
|
||||
|
||||
# Erstellen des eigentlichen SPK's
|
||||
echo ""
|
||||
echo " - INFO: Das SPK wird erstellt..."
|
||||
tar -cf ${project}_$set_spk_version.spk *
|
||||
mv ${project}_$set_spk_version.spk ${APPDIR}
|
||||
|
||||
# Löschen der temporären Daten
|
||||
echo ""
|
||||
echo " - INFO: Der temporäre Ordner wird wieder geschlöscht ..."
|
||||
cd ${APPDIR}
|
||||
if [ -d "./build_tmp" ] ; then
|
||||
rm -rf "./build_tmp"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo " Das SPK wurde erstellt und befindet sich unter..."
|
||||
echo "-----------------------------------------------------------------------------------"
|
||||
echo ""
|
||||
echo " ${APPDIR}/${project}_$set_spk_version.spk"
|
||||
echo ""
|
||||
|
||||
exit 0
|