diff options
author | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:54:17 -0500 |
---|---|---|
committer | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:54:17 -0500 |
commit | 53796d1e45eebe73da9566eb2e4c4d2b9daae10b (patch) | |
tree | 80df63ae65e5d386e0b6d4837384f815c641298c | |
parent | 94790d96106e93aef6326febab5e9f06a87630be (diff) | |
download | sortunsorted-53796d1e45eebe73da9566eb2e4c4d2b9daae10b.tar.gz sortunsorted-53796d1e45eebe73da9566eb2e4c4d2b9daae10b.tar.bz2 sortunsorted-53796d1e45eebe73da9566eb2e4c4d2b9daae10b.zip |
-rwxr-xr-x | sortunsorted | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/sortunsorted b/sortunsorted index 2fd72b2..fe7eb6c 100755 --- a/sortunsorted +++ b/sortunsorted @@ -9,8 +9,7 @@ numofvids=1 playablevideo="$(find ~/Videos/unsorted/ -maxdepth 1 -type f | shuf | head -1)" -if [[ $# = 0 ]] -then +playvid() { if [[ "${playablevideo##*.}" == "png" || "${playablevideo##*.}" == "jpg" || "${playablevideo##*.}" == "jpeg" || "${playablevideo##*.}" == "webp" ]] then feh "$playablevideo" @@ -25,54 +24,33 @@ then touch "$playablevideo" if [[ "${playablevideo##*.}" == "gif" ]] then + ipfs-archive-manager shitpost-gifs "./$Name.${playablevideo##*.}" "$playablevideo" mv "$playablevideo" "/home/$USER/Pictures/gif/$Name.${playablevideo##*.}" elif [[ "${playablevideo##*.}" == "png" || "${playablevideo##*.}" == "jpg" || "${playablevideo##*.}" == "jpeg" || "${playablevideo##*.}" == "webp" ]] then + ipfs-archive-manager shitpost-pictures "./$Name.${playablevideo##*.}" "$playablevideo" mv "$playablevideo" "/home/$USER/Pictures/$Name.${playablevideo##*.}" else + ipfs-archive-manager shitpost-videos "./$Name.${playablevideo##*.}" "$playablevideo" mv "$playablevideo" "/home/$USER/Videos/$Name.${playablevideo##*.}" fi - - exit elif [ "$Choice" = 'n' ] then trash "$playablevideo" else echo "You did nothing..." fi - exit +} +if [[ $# = 0 ]] +then + playvid + exit fi while [[ "$numofvids" -le "$1" ]] do - if [[ "${playablevideo##*.}" == "png" || "${playablevideo##*.}" == "jpg" || "${playablevideo##*.}" == "jpeg" || "${playablevideo##*.}" == "webp" ]] - then - feh "$playablevideo" - else - mpv --ontop --geometry=50%:50% --autofit=50%x50% "$playablevideo" - fi - echo "Video played was: $playablevideo" - read -r -p "Was This quality? (y/n): " Choice - if [ "$Choice" = 'y' ] - then - read -r -p "What would you like to name the video?: " Name - touch "$playablevideo" - if [[ "${playablevideo##*.}" == "gif" ]] - then - mv "$playablevideo" "/home/$USER/Pictures/gif/$Name.${playablevideo##*.}" - elif [[ "${playablevideo##*.}" == "png" || "${playablevideo##*.}" == "jpg" || "${playablevideo##*.}" == "jpeg" || "${playablevideo##*.}" == "webp" ]] - then - mv "$playablevideo" "/home/$USER/Pictures/$Name.${playablevideo##*.}" - else - mv "$playablevideo" "/home/$USER/Videos/$Name.${playablevideo##*.}" - fi - elif [ "$Choice" = 'n' ] - then - trash "$playablevideo" - else - echo "You did nothing..." - fi + playvid playablevideo="$(find ~/Videos/unsorted/ -maxdepth 1 -type f | shuf | head -1)" numofvids=$numofvids+1 done |