Skip hardlinked files in transcode-hevc to avoid breaking seed links
Files with multiple hardlinks are likely linked from downloads/ where they are still being seeded. Transcoding would break the hardlink and cause both copies to take up disk space separately. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f431d1a5b0
commit
c8c7606eb7
1 changed files with 7 additions and 0 deletions
|
|
@ -152,6 +152,13 @@ while IFS= read -r -d '' file; do
|
|||
continue
|
||||
fi
|
||||
|
||||
# Skip files with hardlinks (likely still linked to downloads for seeding)
|
||||
link_count=$(stat -c%h "$file")
|
||||
if [[ "$link_count" -gt 1 ]]; then
|
||||
log "Skipping (hardlinked, likely still seeding): $file"
|
||||
continue
|
||||
fi
|
||||
|
||||
original_size=$(stat -c%s "$file")
|
||||
original_size_h=$(get_size_human "$file")
|
||||
original_duration=$(get_duration "$file")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue