sureshfizzy / CineSync

CineSync is a Python & Bash based library management tool designed to organize debrid & local libraries without the support of Sonarr & Radarr
33 stars 5 forks source link

Random folders on root dir #7

Closed eoghan2t9 closed 1 month ago

eoghan2t9 commented 1 month ago

This morning I logged into my server and randomly did an ls -la on my root folder / and noticed that there was 6 new folders made named Season 1-6 and looked inside them and found random symlinks for various different series in the one folder outside what I have set with in the library.sh file so not sure how they got made.

Screenshot_20240531-194206.png

Screenshot_20240531-193833.png

sureshfizzy commented 1 month ago

Which os are you using ? Also can you let me know if that happens with running library.sh.

eoghan2t9 commented 1 month ago

I'm using ubuntu 20.04 and I'll check the manual run shortly

sureshfizzy commented 1 month ago

Okay, I recognize something now, on my first modification, there was a problem where when the complete scan was run for the second time, it moved them to the / folder. It was later rectified and fixed, so the one you're viewing is most likely an older scan. Remove them, and it will not occur again.

scumball commented 1 month ago

This is how my first run of this script ended up. In my destination folder I had a _shows directory and then in that was Season 1 to Season 17 folders with the full series of each show inside just loose. What did I do wrong? Ubuntu 22.04

sureshfizzy commented 1 month ago

_destination_folder │ └── _shows │ ├── Season 1 ├── Season 2 ├── ... ├── Show A ├── Show B └── ...

Something like this ?

scumball commented 1 month ago

yes, but it was Shows_

cinesync

cinesync2

sureshfizzy commented 1 month ago

Uhh.. this is wierd. Can you create a new destination folder and try running the script again. Stop the script at the beginning itself and see the output of the files.

scumball commented 1 month ago

I tried it yesterday, and twice today with the same results

# Source directory for TV shows
show_source_dir="/user1/docker/zurg/mnt/realdebrid/shows_1080p"

# Destination directory
destination_dir="/user1/docker/cinesync"
sureshfizzy commented 1 month ago

That shouldn't happen. I hope you haven't touched this line

https://github.com/sureshfizzy/CineSync/blob/main/Scripts/library.sh#L90

Also can we connect over telegram, so that I can resolve this faster. ID: @Black_Serpent

scumball commented 1 month ago

I only changed the lines shown I don't use telegram, would prefer this method Maybe because my source folder has an _ in it

sureshfizzy commented 1 month ago

Not sure, my source folders don't have and haven't tested that. Did you try with any other folder which doesn't have in between?

scumball commented 1 month ago

No, as my source folders have _1080p and _4k as I split my library.

sureshfizzy commented 1 month ago

I'm just wondering how it worked for you earlier and causing issues now. Can you run library.sh directly and see the symlink directory which is being created over there. Before running it, do remove the files present on the destination directory.

Edit: delete the logs folder as well..

scumball commented 1 month ago

It never worked for me, I am not OP

sureshfizzy commented 1 month ago

Sorry Mb, i didn't check the name i thought it was eoghan 🥲 was busy in some other works.

So the problem might be with the which needs to be checked. If possible remove the from your org source directory and see if that works or I'll test from my end once I become available.

scumball commented 1 month ago

No rush, I don't want to change my rclone mounts so I'll see if you can test

sureshfizzy commented 1 month ago

Alright, I'll check the flow and let you know.

sureshfizzy commented 1 month ago

@scumball I'm able to reproduce this issue, the problem lies within the usage of _, I'll drop a fix asap

sureshfizzy commented 1 month ago

@scumball pull the code now and run the script, it will work.

scumball commented 1 month ago

yes, that works now. thanks

sureshfizzy commented 1 month ago

Closing this issue since all were resolved.