handle no results
This commit is contained in:
parent
2603d89271
commit
349393896d
1 changed files with 7 additions and 1 deletions
8
strm
8
strm
|
|
@ -16,7 +16,7 @@ function print_usage {
|
||||||
echo " strm -l . # List all available files"
|
echo " strm -l . # List all available files"
|
||||||
echo " strm Elephants Dream # Play files whose path contain 'elephants' and 'dream' in order"
|
echo " strm Elephants Dream # Play files whose path contain 'elephants' and 'dream' in order"
|
||||||
echo " strm e*phants # Play files whose path matches the wildcard 'e*phants'"
|
echo " strm e*phants # Play files whose path matches the wildcard 'e*phants'"
|
||||||
exit 0
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
function error {
|
function error {
|
||||||
|
|
@ -132,6 +132,12 @@ for media_directory in "${media_directories[@]}"; do
|
||||||
print_results=("${print_results[@]}" "${tmp_print_results[@]}")
|
print_results=("${print_results[@]}" "${tmp_print_results[@]}")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Exit if no results found
|
||||||
|
if [ "${#sftp_results[@]}" == 0 ]; then
|
||||||
|
echo "No files found with given query"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# List files
|
# List files
|
||||||
if [ "$list" == false ]; then
|
if [ "$list" == false ]; then
|
||||||
if [ "$shuffle" == true ]; then
|
if [ "$shuffle" == true ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue