Update gh-pages.yml
This commit is contained in:
parent
fdb7d03d18
commit
7feebd701f
|
@ -17,12 +17,21 @@ jobs:
|
|||
- uses: FedericoCarboni/setup-ffmpeg@v1
|
||||
id: setup-ffmpeg
|
||||
|
||||
- name: Run script file
|
||||
- name: Run shell
|
||||
run: |
|
||||
chmod +x "${GITHUB_WORKSPACE}/scripts/duration-length.sh"
|
||||
"${GITHUB_WORKSPACE}/scripts/duration-length.sh"
|
||||
shell: sh
|
||||
|
||||
file="./scripts/duration-length.txt"
|
||||
if [ ! -f "$file" ]
|
||||
then
|
||||
for i in $(cat $file); do
|
||||
mp3=$(cat "$i" | grep "^mp3 =" | awk -F= '{print $2}')
|
||||
duration=$(ffprobe -i "$mp3" -show_entries format=duration -v quiet -of csv="p=0" -sexagesimal)
|
||||
length=$(ffprobe -i "$mp3" -show_entries format=size -v quiet -of csv="p=0")
|
||||
sed -i 's/^duration = .*/duration = \"($duration)\"/g' "$i"
|
||||
sed -i 's/^length = .*/length = ($length)/g' "$i"
|
||||
cat "$i"
|
||||
done
|
||||
fi
|
||||
|
||||
# - run: ffprobe -i "https://ting.shufang.org/shitsurakuen/lost-paradise_01-v2.mp3" -show_entries format=duration -v quiet -of csv="p=0" -sexagesimal
|
||||
# - run: ffprobe -i "https://ting.shufang.org/shitsurakuen/lost-paradise_01-v2.mp3" -show_entries format=size -v quiet -of csv="p=0"
|
||||
|
||||
|
|
Loading…
Reference in New Issue