diff --git a/add_absolute_ep_to_monogatari.sh b/add_absolute_ep_to_monogatari.sh deleted file mode 100755 index 2e04384..0000000 --- a/add_absolute_ep_to_monogatari.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -# Find all .nfo files in the directory tree -find -type f -name "*.nfo" | while read -r file; do - # Extract the directory path - dir_path=$(dirname "$file") - - # Extract the filename - filename=$(basename "$file") - - # Skip specific filenames - if [[ "$filename" == "tvshow.nfo" || "$filename" == "season.nfo" ]]; then - continue - fi - - # Extract season and episode numbers using regex - if [[ "$filename" =~ S([0-9]+)E([0-9]+) ]]; then - season=${BASH_REMATCH[1]} - episode=${BASH_REMATCH[2]} - - # Convert season and episode to integers - season_num=$((10#$season)) - episode_num=$((10#$episode)) - - # Calculate absolute episode number - abs_episode=$episode_num - - # Sum episodes of previous seasons - for ((s=1; s $dir_path/$new_filename" - fi -done diff --git a/detect_missing_subtitles.sh b/detect_missing_subtitles.sh new file mode 100755 index 0000000..7b96f55 --- /dev/null +++ b/detect_missing_subtitles.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Check if a directory is provided, otherwise use the current directory +dir="${1:-.}" + +# Find all .mkv files recursively +find "$dir" -type f -name "*.mkv" | while read -r file; do + # Check for subtitle tracks using mkvinfo + if ! mkvinfo "$file" | grep -q "Track type: subtitles"; then + echo "$file" + fi +done