Delete Movie folder when deleting a movie from xbmc.
#16
It's targeted for V12...if it will happen is not clear, yet
Image

- - - Tribute to Metallica - - -

If I managed to help you, please click my reputation
Reply
#17
Any progress on this? I'd really like to be able to use a feature like this. For movies, that is. I collect my TV shows, but am currently cleaning up my movies folder every few months. This option, or an automatic delete prompt after watching a movie would make life much easier Smile
TV: Panasonic L32E5
AVR: Panasonic BTT282
HTPC: Antec Fusion 430 Silver - Antec Earthwatts EA-500D Green - Asrock A75M-HVS - AMD A8-3870K - Scythe Ninja Rev. B - Kingston 2x4 GB 1866Mhz - Crucial M4 SSD 64GB - OS: Windows 8 x64
REMOTE: Logitech Harmony 555
STORAGE: Synology DS211 [2TB]
GAMING: PS3 Classic 80GB
Reply
#18
Here's a link to a batch file I've created to remove orphaned movie folders. You'll have to tweak it to meet your specific needs. Hopefully it will help out until XBMC implements an official folder removal feature. Cool

http://jdsworld.com/tech-support/xbmc-or...r-remover/

My requirements:
1) check only the first level of directories off my movie folder. (To enable the batch file to look into all sub-folders just add a “/r” after “for” in the batch file.)
2) Ignore folders that contain at least one example of the various movie files ex avi, iso, mkv.
3) ignore “movie sets“. Movies that are sequels or are apart of a directly related movie series. To facilitate this I add the file “folder.ignore” to the top directory of a “movie set.”
4) Prompt me to delete the orphaned folders.
Reply
#19
@techstacey - Thanks for that - saves me having to do it manually Smile

Lets hope this gets implemented soon
Reply
#20
(2013-06-29, 18:26)jaysel Wrote: @techstacey - Thanks for that - saves me having to do it manually Smile

Lets hope this gets implemented soon
I've updated the batch file to better handle long file names and have added some additional media types. I would recommend updating at your earliest convenience.
Reply
#21
I use a Mac with OSX, can someone write this as a shel script?

And why the ticket is closed? This is still a fucking issue, and sucks really http://trac.xbmc.org/ticket/12227#comment:5
Reply
#22
(2013-12-08, 02:11)fritte Wrote: And why the ticket is closed? This is still a fucking issue, and sucks really http://trac.xbmc.org/ticket/12227#comment:5

We no longer use Trac for feature requests, and this was a feature request. We're actually evaluating possible alternatives to Trac (or at least upgrading our version of Trac) in the Team right now, and that might possibly include a better system for feature requests.

It's not a rejection of the idea. Better "garbage collection" for files that XBMC generates is an issue in other places as well, and Team XBMC definitely knows this.
Reply
#23
Is there a solution for this within XBMC now? Is one of the few things preventing the switch from WMC!
Reply
#24
(2013-06-27, 23:12)techstacy Wrote: Here's a link to a batch file I've created to remove orphaned movie folders. You'll have to tweak it to meet your specific needs. Hopefully it will help out until XBMC implements an official folder removal feature. Cool

http://jdsworld.com/tech-support/xbmc-or...r-remover/

My requirements:
1) check only the first level of directories off my movie folder. (To enable the batch file to look into all sub-folders just add a “/r” after “for” in the batch file.)
2) Ignore folders that contain at least one example of the various movie files ex avi, iso, mkv.
3) ignore “movie sets“. Movies that are sequels or are apart of a directly related movie series. To facilitate this I add the file “folder.ignore” to the top directory of a “movie set.”
4) Prompt me to delete the orphaned folders.

EDIT: For future ref if anyone else is struggling with this code the filename has to be the same as the folder name for it to work! I have different names for each and it didn't ignore folders where this was the case.
Reply
#25
(2012-04-15, 13:42)DLeavy Wrote: It isn't necessary for each movie to be in its own folder. Ultimately, XBMC doesn't create the folder structures of your sources, so I'm not sure if giving XBMC this ability makes sense.

Perhaps a plugin to manage files/folders would be a better fit?


However XBMC does know (at least now) if the movies are in separate folders because when you add the movie source you check "movies are in separate folders that match the movie title" if that's the case. So I think it would make sense for XBMC to be able to remove the movie folder as well if this option is checked. Just the same as it removes the folder if you remove a tv show.
Reply
#26
I noticed the other day that Add-on:XBMC File Cleaner (wiki) has the ability to delete related files.
Reply
#27
Only by setting up automation or manually when going in to the menu of a movie as well? I appreciate all these add-on for users to tweak their setups but I think this is standard feature material. If "movies are in separate folders that match the movie title" is ticked, then there should be only one movie in each folder and deletion of that folder would be safe. Additional to make it even more fail-safe there could be another check box to "allow deletion of movie folders" as well. On a side note, scheduled scanning for movies in sources and cleaning library should also be a standard feature, it's a must have if you have a box that is on 24/7. These are the two only features I miss from default.
Reply
#28
Considering only just in the last 24 hours a major bug was fixed where deleting a VIDEO_TS DVD folder could delete an entire library, no, I don't think it should be a standard feature. XBMC is not meant to be used to move, manage, or rename your files. Adding more settings as a failsafe makes the code more complex, on top of the additional logic used to delete the supporting files, which increases the support burden for the developers.

Some people store more than one version of a movie in the same folder, named after the movie (I don't know why, but they do). Some people have a movie in a folder, then a folder with other movies in that folder. We try to do as little second guessing as possible as to what the user wants to delete or keep. Guessing which files to be deleted is not something we're interested in doing.

Besides, most people don't delete movies that they've taken the time to add to the library, let along add extra files for. Why bother adding it to the library and sorting artwork if you're just going to delete it after watching it? Even if that was the norm, add-ons are not second-class citizens. Just because a function is an add-on doesn't make it any less of a feature. The goal is to make XBMC as module as possible, so eventually everything from the ability to use playlists, the language translations, the video codecs decoded, everything, will be an add-on.

Cleaning the library is not a must have. I'm a huge XBMC nerd (I'm not even a dev and they made me a team member) and I never turn cleaning on automatically. Not only is it something that just isn't needed most of the time (see above), but it's just too easy for things to get removed from the library when you don't intend for that to happen. That's why "clean library" is considered an "advanced" setting level, because it's not always safe. It's something that should be done when the user is sitting there and knows the condition of their file shares and other variables.

For the people who do want these things, there are perfectly good add-ons that handle the task. That's why XBMC supports add-ons, because one size doesn't fit all.
Reply
#29
I disagree, I don't see why handling movie folders would be that much different from handling tv shows, what if someone put a movie folder in a tv series folder?

No one is saying XBMC is meant to be used to move, manage, or rename our files. Just that it would be a nice feature to be able to delete the entire folder when deleting a movie if the user wants to. Just put one expert level setting which will allow to "Delete entire parent folder" and leave it off by default. Then the users that want this feature can enable it, I don't know if anyone else bothers anymore but I know a lot of people wanting this feature.

I agree that the current setting of deleting only the file is the correct one to use as default because it covers most scenarios. You can't possible know all the different library layouts people use, that's what settings are for.

Cleaning the library is a "must have" for me since I have automated file handling, replacing and removing files. UI quickly fills with none existing and duplicate content, most people may not need it but I do. There is a nice working add-on for this so this wasn't meant as a feature request or anything it's fine the way it is, verifying sources before running it saves you from headache. I only saw that from my own narrow perspective and for me it is indeed a must have, so you can ignore that whole comment (I blame the fever).

The only problem I have with to many add-ons is that they don't always get updated along with the main product, if they are then I am all for add-ons! That way you don't get UI clogged up with things you don't use, I am all for the module way of thinking.

Anyhow since I am a fan of automation I already deal with the left over folders so I don't personally need this feature. And since the first post about this was so long ago I guess it's not happening anyways so I opt out Smile
Reply
#30
(2013-06-27, 23:12)techstacy Wrote: Here's a link to a batch file I've created to remove orphaned movie folders. You'll have to tweak it to meet your specific needs. Hopefully it will help out until XBMC implements an official folder removal feature. Cool

http://jdsworld.com/tech-support/xbmc-or...r-remover/

My requirements:
1) check only the first level of directories off my movie folder. (To enable the batch file to look into all sub-folders just add a “/r” after “for” in the batch file.)
2) Ignore folders that contain at least one example of the various movie files ex avi, iso, mkv.
3) ignore “movie sets“. Movies that are sequels or are apart of a directly related movie series. To facilitate this I add the file “folder.ignore” to the top directory of a “movie set.”
4) Prompt me to delete the orphaned folders.

Thanks heaps for that, by the way the code didn't work at first and I had to add a \ in front of .mkv etc. so it would look like this ""if not exist %%f\*.mkv (""
Be careful that deleting this way deletes the files permanently and doesn't send them to the recycling bin
Also, when you finished going through the list it cycles back to the begining, this time asking you to delete the every folder even if it does meet the requirements. so don't get carried away.

So 2 things I think will make this script perfect and I hope someone can help.
1- When deleting folders, they move to recycling bin instead of a permanent delete
2- When finished going through the folders. End the scrip so it doesn't cycle back

Thanks again
Reply



Logout Mark Read Team Forum Stats Members Help
Delete Movie folder when deleting a movie from xbmc.1
This forum uses Lukasz Tkacz MyBB addons.