sureshfizzy / CineSync

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

Random folders on root dir #7

Closed eoghan2t9 closed 5 months ago

eoghan2t9 commented 5 months 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 5 months ago

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

eoghan2t9 commented 5 months ago

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

sureshfizzy commented 5 months 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.

sureshfizzy commented 5 months ago

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

Something like this ?

sureshfizzy commented 5 months 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.

sureshfizzy commented 5 months 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

sureshfizzy commented 5 months 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?

sureshfizzy commented 5 months 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..

sureshfizzy commented 5 months 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.

sureshfizzy commented 5 months ago

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

sureshfizzy commented 5 months ago

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

sureshfizzy commented 5 months ago

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

sureshfizzy commented 5 months ago

Closing this issue since all were resolved.