softworkz 5071 Posted September 17, 2015 Posted September 17, 2015 Hi, it took me hours to find this out and to finally identify Emby server as the culprit: My watch folder for auto-organize does not exclusively receive media files/folders Sometimes folders are added there, which contain e.g. two file like "setup.exe" and "setupinfo.txt" (or program.nfo) In my Auto-Organize configuration in Emby I have left the default setting for "Delete left over files with the following extensions", which is ".nfo;.txt" Now, the problem is, that any time that a file with an extension of nfo or txt is added to a subfolder of the configured watch folder, it gets deleted! --- no matter if the file is contained in a folder that was successfully processed by the Auto-Organize feature or not!! Once I had found that Emby server is deleting my files, I still couldn't believe why it would do that. So I downloaded the source code, and in fact this proofed, that TvFolderOrganizer.Organize is always deleting all files with extensions configured in options.LeftOverFileExtensionsToDelete, The expected behaviour should be instead: During Auto-Organize, Emby must maintain a list of folders which were processed successfully. Only these folders should be used with the DeleteLeftOverFiles and DeleteEmptyFolders functions. Regards, softworkz
AdrianW 1058 Posted September 17, 2015 Posted September 17, 2015 I can see your point - but you could prevent the problem occurring in the first place by only putting video content into the watched folder. If you're using something like uTorrent - then I'd suggest using labels and getting uTorrent to move the completed files to a folder using the label. Then get Emby to watch the labelled folder. 1
softworkz 5071 Posted September 17, 2015 Author Posted September 17, 2015 @AdrianW: It is not about finding a workaround. Now that I know what is going on, I can also just remove the default extensions from the "Delete leftover files..." configuration. But whatever one _can_ do to work around - it is still a bug. And as long as a user hasn't found out what is actually causing his files to disappear, he also won't know how to workaround.. softworkz
bluemonkey07 590 Posted September 17, 2015 Posted September 17, 2015 Well in your opinion it's a bug... For someone else it may be considered a feature 1
tarnalcock 4 Posted September 17, 2015 Posted September 17, 2015 I think the solution here might be to have better logging capabilities for auto organize, with an undo feature. And also maybe a "Trash" folder. I added an episode of Doctor Who "Doctor Who - 0x2 - The Five Doctors.avi" as well as "Doctor Who - 0x12 - The Five Doctors.avi". In my Library, I already had "Doctor Who/Season 0/..' so no problems there. When I clicked auto organize, the one file disappeared and the other was not added. I had to go search in the logs to find what happened to the file as I did not get a warning/error/success message in the onscreen log. It just remained blank. Log: 2015-09-17 14:00:35.6609 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x2 - The Five Doctors.avi 2015-09-17 14:00:35.7070 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x2 - The Five Doctors.avi into series d:\Personal\Watch\SortedSeries\Doctor Who (2005) 2015-09-17 14:00:35.7429 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x2 - The Five Doctors.avi to new path d:\Personal\Watch\SortedSeries\Doctor Who (2005)\Season 0\Doctor Who (2005) - 0x02 - The Christmas Invasion.avi 2015-09-17 14:00:35.7589 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x12 - The Five Doctors.avi 2015-09-17 14:00:35.7909 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x12 - The Five Doctors.avi into series d:\Personal\Watch\SortedSeries\Doctor Who (2005) 2015-09-17 14:00:35.8169 Info - App: Sorting file d:\Personal\Watch\toSortSeries\Doctor Who - 0x12 - The Five Doctors.avi to new path d:\Personal\Watch\SortedSeries\Doctor Who (2005)\Season 0\Doctor Who (2005) - 0x12 - Proms Special Behind The Scenes.avi 2015-09-17 14:00:35.8379 Info - App: Organize new media files Completed after 0 minute(s) and 0 seconds Despite the log saying that it had moved "Doctor Who - 0x2 - The Five Doctors.avi" to "Doctor Who (2005) - 0x02 - The Christmas Invasion.avi", this did not happen as the file already existed. No output onscreen. Although I am thankful that it did not overwrite the original! The other was moved as there was no such file in "Doctor Who (2005)\Season 0". I had to pull it out, rename it and manually paste it into "Doctor Who\Season 0". Thereafter I did a library refresh and the file was scraped and life is good!
softworkz 5071 Posted September 17, 2015 Author Posted September 17, 2015 Well in your opinion it's a bug... For someone else it may be considered a feature A feature, really? Deleting files in folders that Auto-Organize did not process? Of course it is not a critical or show-stopper bug - but at least it is an unexpected behaviour. At least the option is called "Delete left over files with the following extensions". "Left over" implies that some processing has been performed that has left some files over. It the behaviour would be a "feature", the option should be called "Always delete files with the following extensions". Wouldn't you agree? softworkz
bluemonkey07 590 Posted September 17, 2015 Posted September 17, 2015 (edited) Well your interpretation depends on how you use the watched folder...i only put in stuff i want organised so everything that is not a tv show (ie left over) can be deleted after the organise new media files task has run to keep the folder clean Edited September 17, 2015 by Vidman
softworkz 5071 Posted September 18, 2015 Author Posted September 18, 2015 OK, I think further arguing would lead to nowhere. I just wanted to share how I had a bad experience with the way the auto-organize feature is implemented currently. I hope that there won't be too many others getting deperate over this issue. Regards, softworkz
softworkz 5071 Posted September 29, 2015 Author Posted September 29, 2015 Just for anyone who may come accross this thread: The code I had suggested to fix this problem has been included into the project (https://github.com/MediaBrowser/Emby/pull/1201)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now