Browse Source

fixed a few things and added renamer script

master
c? 7 months ago
parent
commit
96408c0629
2 changed files with 21 additions and 5 deletions
  1. 5
    0
      assist/renamer.sh
  2. 16
    5
      simulcaster.sh

+ 5
- 0
assist/renamer.sh View File

@@ -0,0 +1,5 @@
#!/bin/bash
for file in *.enc.mkv
do
mv "$file" "${file/.enc.mkv/.mkv}"
done

+ 16
- 5
simulcaster.sh View File

@@ -249,26 +249,35 @@ function simulcaster_mkvremux() {
SIMULCASTER_REMUX_TITLE_PARSED=$( simulcaster_core_parse_meta "$SIMULCASTER_REMUX_TITLE" )
if [ "$SIMULCASTER_REMUX_INPUT_SOURCE" = "crunchyroll" ] ; then
SIMULCASTER_REMUX_INPUT="--language 0:jpn --language 1:jpn *.mp4 --language 0:$SIMULCASTER_REMUX_CR_SUBLANG *.$SIMULCASTER_CRUNCHYROLL_SUB_LANG.ass"
SIMULCASTER_REMUX_CLEANUP="-- *.mp4 *.ass"
SIMULCASTER_REMUX_CLEANUP="*.mp4 *.ass"
"$SIMULCASTER_REMUX_BINARY" --title "$SIMULCASTER_REMUX_TITLE_PARSED" -o "$SIMULCASTER_REMUX_OUTPUT_PARSED" $SIMULCASTER_REMUX_INPUT
elif [ "$SIMULCASTER_REMUX_INPUT_SOURCE" = "handbrake" ] ; then
SIMULCASTER_REMUX_OUTPUT_PARSED_OG="$SIMULCASTER_REMUX_OUTPUT_PARSED"
SIMULCASTER_REMUX_INPUT=
SIMULCASTER_REMUX_INPUT_FILE="$SIMULCASTER_HANDBRAKE_OUTPUT_PARSED.tmp"
SIMULCASTER_REMUX_OUTPUT_PARSED="$SIMULCASTER_HANDBRAKE_OUTPUT_PARSED"
SIMULCASTER_REMUX_CLEANUP="--"
SIMULCASTER_REMUX_CLEANUP=
SIMULCASTER_REMUX_CLEANUP_FILE="$SIMULCASTER_HANDBRAKE_OUTPUT_PARSED.tmp"
"$SIMULCASTER_REMUX_BINARY" --title "$SIMULCASTER_REMUX_TITLE_PARSED" -o "$SIMULCASTER_REMUX_OUTPUT_PARSED" $SIMULCASTER_REMUX_INPUT "$SIMULCASTER_REMUX_INPUT_FILE"
else
fatal 185 "mkvremux: unsupported input source: $SIMULCASTER_REMUX_INPUT_SOURCE"
fi
#simulcaster_make_mkv "$SIMULCASTER_REMUX_OUTPUT_PARSED" "$SIMULCASTER_REMUX_INPUT"
"$SIMULCASTER_REMUX_BINARY" --title "$SIMULCASTER_REMUX_TITLE_PARSED" -o "$SIMULCASTER_REMUX_OUTPUT_PARSED" $SIMULCASTER_REMUX_INPUT "$SIMULCASTER_REMUX_INPUT_FILE"
#"$SIMULCASTER_REMUX_BINARY" --title "$SIMULCASTER_REMUX_TITLE_PARSED" -o "$SIMULCASTER_REMUX_OUTPUT_PARSED" $SIMULCASTER_REMUX_INPUT "$SIMULCASTER_REMUX_INPUT_FILE"

if [ "$SIMULCASTER_REMUX_CLEANUP" ] ; then
rm $SIMULCASTER_REMUX_CLEANUP "$SIMULCASTER_REMUX_CLEANUP_FILE"
rm $SIMULCASTER_REMUX_CLEANUP
SIMULCASTER_REMUX_CLEANUP=
fi

if [ "$SIMULCASTER_REMUX_CLEANUP_FILE" ] ; then
rm "$SIMULCASTER_REMUX_CLEANUP_FILE"
SIMULCASTER_REMUX_CLEANUP_FILE=
fi

if [ "$SIMULCASTER_REMUX_OUTPUT_PARSED_OG" ] ; then
SIMULCASTER_REMUX_OUTPUT_PARSED="$SIMULCASTER_REMUX_OUTPUT_PARSED_OG"
SIMULCASTER_REMUX_OUTPUT_PARSED_OG=
fi
}

@@ -294,6 +303,8 @@ function simulcaster_handbrake_uencode() {
# fatal 174 handbrake_uencode: not implemented
SIMULCASTER_UENCODE_OUTPUT_PARSED=$( simulcaster_core_parse_meta_files "$SIMULCASTER_UENCODE_OUTPUT" )
"$SIMULCASTER_UENCODE_BINARY" --preset-import-file "$SIMULCASTER_UENCODE_PRESET_FILE" --preset "$SIMULCASTER_UENCODE_PRESET_NAME" -i "$SIMULCASTER_REMUX_OUTPUT_PARSED" -o "$SIMULCASTER_UENCODE_OUTPUT_PARSED"
SIMULCASTER_REMUX_INPUT_SOURCE="uencode"
simulcaster_mkvremux
}

function simulcaster_filemgr() {
@@ -315,7 +326,7 @@ function simulcaster_upload() {
fatal 211 "upload_send_raw: partially implemented"
fi
if [ $SIMULCASTER_UPLOAD_SEND_ENC ] ; then
rsync -aP "$SIMULCASTER_HANDBRAKE_OUTPUT_PARSED" "$SIMULCASTER_UPLOAD_USER"@"$SIMULCASTER_UPLOAD_SERVER":"$SIMULCASTER_UPLOAD_PATH/$SIMULCASTER_UPLOAD_SNDIR/"
rsync -aP "$SIMULCASTER_HANDBRAKE_OUTPUT_PARSED" "$SIMULCASTER_UPLOAD_USER"@"$SIMULCASTER_UPLOAD_SERVER":"$SIMULCASTER_UPLOAD_PATH/'$SIMULCASTER_UPLOAD_SNDIR'/"
fi
if [ $SIMULCASTER_UPLOAD_SEND_UNC ] && [ -f $SIMULCASTER_UENCODE_OUTPUT_PARSED ] ; then
fatal 211 "upload_send_unc: partially implemented"

Loading…
Cancel
Save