jbilcke-hf HF Staff commited on
Commit
62cdc89
·
1 Parent(s): 92fa81d

fix the initial count

Browse files
Files changed (2) hide show
  1. scripts/audio.sh +3 -1
  2. scripts/video.sh +4 -1
scripts/audio.sh CHANGED
@@ -1,10 +1,12 @@
1
  #!/bin/bash
2
 
3
  echo "Starting the audio collection stream.."
4
- current_count=$(ls $WEBTV_AUDIO_STORAGE_PATH*.mp3 2> /dev/null | wc -l)
5
 
6
  while true; do
7
  new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH*.mp3 2> /dev/null | wc -l)
 
 
8
 
9
  if [ $new_count -ne $current_count ]; then
10
  echo "Updating audio playlists..."
 
1
  #!/bin/bash
2
 
3
  echo "Starting the audio collection stream.."
4
+ current_count=0
5
 
6
  while true; do
7
  new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH*.mp3 2> /dev/null | wc -l)
8
+
9
+ echo "there are $new_count audio files"
10
 
11
  if [ $new_count -ne $current_count ]; then
12
  echo "Updating audio playlists..."
scripts/video.sh CHANGED
@@ -1,11 +1,14 @@
1
  #!/bin/bash
2
 
3
  echo "Starting the video collection stream.."
4
- current_count=$(ls $WEBTV_VIDEO_STORAGE_PATH*.mp4 2> /dev/null | wc -l)
 
5
 
6
  while true; do
7
  new_count=$(ls $WEBTV_VIDEO_STORAGE_PATH*.mp4 2> /dev/null | wc -l)
8
 
 
 
9
  if [ $new_count -ne $current_count ]; then
10
  echo "Updating playlists..."
11
  current_count=$new_count
 
1
  #!/bin/bash
2
 
3
  echo "Starting the video collection stream.."
4
+ echo "listing files in $WEBTV_VIDEO_STORAGE_PATH*.mp4"
5
+ current_count=0
6
 
7
  while true; do
8
  new_count=$(ls $WEBTV_VIDEO_STORAGE_PATH*.mp4 2> /dev/null | wc -l)
9
 
10
+ echo "there are $new_count videos files"
11
+
12
  if [ $new_count -ne $current_count ]; then
13
  echo "Updating playlists..."
14
  current_count=$new_count