Jump to content

Server - Delete artifacts when deleting show/movie


mastrmind11

Recommended Posts

mastrmind11

I know I've seen it posted somewhere on here, but can't seem to find it.  *Please* cleanup artifacts when media gets removed via the UI.  So wherever the OP is, +1 to it.

Edited by mastrmind11
Link to comment
Share on other sites

mastrmind11

Sure.  When I delete a movie using the web interface, the movie gets deleted but the nfo and images remain.  I assume the same is true for episodes, though I'm not in front of my servers to check.  All of my movies (presently) are in a single folder, and the server is set to store images in the same location as the media.  Not a huge deal since I don't delete movies very often, but assuming this behavior is the same with episodes, that's a different story.  Can you confirm whether this is expected behavior?  If not I'll do some investigation when I get home from work and send over some logs.  Thanks for response.

Link to comment
Share on other sites

Happy2Play

I didn't have a problem with Emby deleting everything from one movie (Folder) when deleted.  I will test dumping a bunch of movies into a folder makes a difference.

2017-02-15 18:32:11.0261 Debug App: Deleting item, Type: Movie, Name: District 9, Path: C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\#9 (2009).disc, Id: d10ce447-d05e-614f-2e25-3e6fd76ceb1d
2017-02-15 18:32:11.0261 Debug App: Deleting path C:\Users\Media-Test\AppData\Roaming\Emby-Server\metadata\library\d1\d10ce447d05e614f2e253e6fd76ceb1d
2017-02-15 18:32:11.0261 Debug App: Deleting path C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0261 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\#9 (2009).disc
2017-02-15 18:32:11.0261 Debug LibraryMonitor: New file refresher created for C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0261 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\#9 (2009).nfo
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\banner.jpg
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\clearart.png
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\disc.png
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\fanart.jpg
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\landscape.jpg
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\logo.png
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\poster.jpg
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Changed to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)
2017-02-15 18:32:11.0471 Debug LibraryMonitor: Resetting file refresher from C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009) to C:\Users\Media-Test\Desktop\Video Test\unset test
2017-02-15 18:32:11.0541 Debug App: C:\Users\Media-Test\Desktop\Video Test\unset test\#Horror (2015) is not a series folder.
2017-02-15 18:32:11.0541 Debug App: C:\Users\Media-Test\Desktop\Video Test\unset test\2 Guns (2013) is not a series folder.
2017-02-15 18:32:11.0541 Debug BaseItem: Removed item: C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\#9 (2009).disc
2017-02-15 18:32:11.0541 Debug App: Deleting item, Type: Movie, Name: District 9, Path: C:\Users\Media-Test\Desktop\Video Test\unset test\#9 (2009)\#9 (2009).disc, Id: d10ce447-d05e-614f-2e25-3e6fd76ceb1d
2017-02-15 18:32:11.0541 Debug App: Deleting path C:\Users\Media-Test\AppData\Roaming\Emby-Server\metadata\library\d1\d10ce447d05e614f2e253e6fd76ceb1d
Edited by Happy2Play
Link to comment
Share on other sites

mastrmind11

So I did some more digging.  Movies and TV behave the same way, .nfo and .jpg are left behind.  I just deleted an episode and checked the dir.

bill@FileServer:/storage/recorded/My 600-Lb. Life$ cd Season\ 3/
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ ls
My 600-Lb. Life S03E11 Marla's Story.mkv
My 600-Lb. Life S03E11 Marla's Story.nfo
My 600-Lb. Life S03E11 Marla's Story-thumb.jpg
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ ls -l
total 269
-rw-rw-r-- 1 bill bill   1787 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story.                                                                   nfo
-rw-rw-r-- 1 bill bill 149355 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story-                                                                   thumb.jpg
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ ls -l
total 269
-rw-rw-r-- 1 bill bill   1787 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story.                                                                   nfo
-rw-rw-r-- 1 bill bill 149355 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story-                                                                   thumb.jpg
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ ls -l
total 269
-rw-rw-r-- 1 bill bill   1787 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story.                                                                   nfo
-rw-rw-r-- 1 bill bill 149355 Feb 16 03:06 My 600-Lb. Life S03E11 Marla's Story-                                                                   thumb.jpg
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ cd ..
bill@FileServer:/storage/recorded/My 600-Lb. Life$ ls -l
total 215
-rw-rw-r-- 1 bill bill 119236 Feb  8 20:01 fanart.jpg
-rw-rw-r-- 1 bill bill  79147 Feb  8 20:01 poster.jpg
drwxrwxr-x 2 bill bill      4 Feb 16 17:12 Season 3
drwxrwxr-x 2 bill bill      9 Feb 15 22:06 Season 5
-rw-rw-r-- 1 bill bill   1249 Feb  8 20:01 tvshow.nfo
bill@FileServer:/storage/recorded/My 600-Lb. Life$ cd Season\ 3/
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$ ls
My 600-Lb. Life S03E11 Marla's Story.nfo
My 600-Lb. Life S03E11 Marla's Story-thumb.jpg
bill@FileServer:/storage/recorded/My 600-Lb. Life/Season 3$

Complete server log starting 2 mins before the delete: http://pastebin.com/23DjPuCL

 

Here's an count by file extension for my movies directory (I've never used anything but the web UI to remove movies):  

bill@FileServer:/storage/movies/Hi-Def$ find -type f | sed -e 's/.*\.//' | sort | uniq -c
      1 avi
    792 jpg
    258 mkv
      1 mp4
    277 nfo
    272 png
      7 tbn
      1 xml

Lemme know.  server 3.1.1.  Thanks

Link to comment
Share on other sites

Happy2Play

The only applies to this scenario of dumping everything into one folder (no movies folders).  All the addition same named metadata and images are left behind, when media is deleted.

2017-02-16 14:32:31.4283 Debug App: Deleting item, Type: Movie, Name: Big Game, Path: C:\Users\Media-Test\Desktop\Video Test\Singles\Big Game (2014) [Unknown] [PG-13] [voted 5.5] [Action-Adventure].mkv, Id: 4c9fac05-425a-0a61-655f-51cbdbf44d16
2017-02-16 14:32:31.4283 Debug App: Deleting path C:\Users\Media-Test\AppData\Roaming\Emby-Server\metadata\library\4c\4c9fac05425a0a61655f51cbdbf44d16
2017-02-16 14:32:31.4283 Debug App: Deleting path C:\Users\Media-Test\Desktop\Video Test\Singles\Big Game (2014) [Unknown] [PG-13] [voted 5.5] [Action-Adventure].mkv
2017-02-16 14:32:31.4283 Debug LibraryMonitor: Changed detected of type Deleted to C:\Users\Media-Test\Desktop\Video Test\Singles\Big Game (2014) [Unknown] [PG-13] [voted 5.5] [Action-Adventure].mkv
2017-02-16 14:32:31.4283 Debug LibraryMonitor: New file refresher created for C:\Users\Media-Test\Desktop\Video Test\Singles
2017-02-16 14:32:31.4283 Debug BaseItem: Removed item: C:\Users\Media-Test\Desktop\Video Test\Singles\Big Game (2014) [Unknown] [PG-13] [voted 5.5] [Action-Adventure].mkv
2017-02-16 14:32:31.4283 Debug App: Deleting item, Type: Movie, Name: Big Game, Path: C:\Users\Media-Test\Desktop\Video Test\Singles\Big Game (2014) [Unknown] [PG-13] [voted 5.5] [Action-Adventure].mkv, Id: 4c9fac05-425a-0a61-655f-51cbdbf44d16
2017-02-16 14:32:31.4283 Debug App: Deleting path C:\Users\Media-Test\AppData\Roaming\Emby-Server\metadata\library\4c\4c9fac05425a0a61655f51cbdbf44d16

Forgotten items

 

58a629916e1ec_forgotten.jpg

 

 

And yes Episode deletion does the same,  leaving nfo and episode thumb behind.

Edited by Happy2Play
Link to comment
Share on other sites

mastrmind11

Thanks @@Happy2Play.  Can you reproduce this when you have 1 episode in a Season folder and delete the episode?  I'll try a folder w/ multiple episodes and see if I can reproduce.  THanks

 

edit: same holds for a Season folder w/ multiple episodes:

bill@FileServer:/storage/tv/The Affair/Season 3$ ls -l
total 16773540
-rw-rw-r-- 1 bill bill        353 Jan 31 18:24 season.nfo
-rwxr-xr-x 1 bill bill 2048705629 Nov 15 07:08 The.Affair.S03E01.Episode.1.WEBDL-720p.mkv
-rw-rw-r-- 1 bill bill       2227 Jan 31 18:24 The.Affair.S03E01.Episode.1.WEBDL-720p.nfo
-rw-rw-r-- 1 bill bill      37342 Dec  4 09:01 The.Affair.S03E01.Episode.1.WEBDL-720p-thumb.jpg
-rwxr-xr-x 1 bill bill 1624462250 Nov 25 11:43 The.Affair.S03E02.Episode.2.WEBDL-720p.mkv
-rw-rw-r-- 1 bill bill       2301 Jan 31 18:24 The.Affair.S03E02.Episode.2.WEBDL-720p.nfo
-rw-rw-r-- 1 bill bill      51132 Dec  4 09:02 The.Affair.S03E02.Episode.2.WEBDL-720p-thumb.jpg
-rwxr-xr-x 1 bill bill  732367070 Dec  4 22:09 The.Affair.S03E03.Episode.3.HDTV-720p.mkv
-rw-rw-r-- 1 bill bill       1967 Jan 31 18:24 The.Affair.S03E03.Episode.3.HDTV-720p.nfo
-rw-rw-r-- 1 bill bill      79295 Dec  4 23:51 The.Affair.S03E03.Episode.3.HDTV-720p-thumb.jpg

after delete of episode 1: 

bill@FileServer:/storage/tv/The Affair/Season 3$ ls -l
total 14770796
-rw-rw-r-- 1 bill bill        353 Jan 31 18:24 season.nfo
-rw-rw-r-- 1 bill bill       2227 Jan 31 18:24 The.Affair.S03E01.Episode.1.WEBDL-720p.nfo
-rw-rw-r-- 1 bill bill      37342 Dec  4 09:01 The.Affair.S03E01.Episode.1.WEBDL-720p-thumb.jpg
-rwxr-xr-x 1 bill bill 1624462250 Nov 25 11:43 The.Affair.S03E02.Episode.2.WEBDL-720p.mkv
-rw-rw-r-- 1 bill bill       2301 Jan 31 18:24 The.Affair.S03E02.Episode.2.WEBDL-720p.nfo
-rw-rw-r-- 1 bill bill      51132 Dec  4 09:02 The.Affair.S03E02.Episode.2.WEBDL-720p-thumb.jpg
-rwxr-xr-x 1 bill bill  732367070 Dec  4 22:09 The.Affair.S03E03.Episode.3.HDTV-720p.mkv
-rw-rw-r-- 1 bill bill       1967 Jan 31 18:24 The.Affair.S03E03.Episode.3.HDTV-720p.nfo
-rw-rw-r-- 1 bill bill      79295 Dec  4 23:51 The.Affair.S03E03.Episode.3.HDTV-720p-thumb.jpg

Edited by mastrmind11
Link to comment
Share on other sites

Happy2Play

Correct as I added above deleting episodes leave behind nfo and episode thumb.  Haven't tested season or series level though.  But my guess would be since they are actual folders it will work properly.

 

 

**Keep forgetting lots of people don't use season folders either so I will test deleting a season when there is no season folder also.

Edited by Happy2Play
Link to comment
Share on other sites

mastrmind11

I just tested Season level deletion and it smoked the whole folder, so that works.

 

@@Luke, @@ebr, maybe this should be moved to server and logged as a bug?  

Edited by mastrmind11
Link to comment
Share on other sites

Happy2Play

Correct as I added above deleting episodes leave behind nfo and episode thumb.  Haven't tested season or series level though.  But my guess would be since they are actual folders it will work properly.

 

 

**Keep forgetting lots of people don't use season folders either so I will test deleting a season when there is no season folder also.

 

And there appears to be no way to delete virtual Seasons.

Edited by Happy2Play
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...