Jump to content


Photo

Emby Sweeper


  • Please log in to reply
34 replies to this topic

#21 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 20 March 2020 - 03:34 PM

Upping the log level to trace (-l trace) and running the delete command (in dry run mode of course) might give you some hints.  But off the top of my head, my best guess would be that the movie is visible in another library that you did not exclude.  The exclude lists prevent a library from being scanned, it does not mark items in an excluded library from never being deleted (though this is an interesting alternative to the current behaviour).  So if an item is in both an excluded lib and one that isn't, the file is still eligible for deletion as it will be found in the lib that was not excluded.

 

In my env, no item is ever visible in more than one lib so that's why I ended up implementing it the way I did.


Edited by Slugger, 20 March 2020 - 03:45 PM.


#22 tropicaljoe OFFLINE  

tropicaljoe

    Member

  • Members
  • 26 posts
  • Local time: 09:42 PM

Posted 20 March 2020 - 05:00 PM

The files are definitely not listed in another library ,the user only has access to two libraries and one is currently empty along with one TV folder that does have items to delete. I will do some more testing and report my findings back to you on this 



#23 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 20 March 2020 - 09:31 PM

I updated the latest image on docker hub.  It adds some extra trace logging that will print the names of all the libraries it has decided to scan.  And trace logging already dumps all of the items it found in each lib so with those two pieces of info, you should be able to see where this file is being found.  Trace logging + the delete command (in dry run mode) should tell you which lib the file is being found in.  You'll need to pull and replace you existing latest docker image to get these changes.



#24 tropicaljoe OFFLINE  

tropicaljoe

    Member

  • Members
  • 26 posts
  • Local time: 09:42 PM

Posted 20 March 2020 - 10:51 PM

Slugger

Can you supply a command line with the delete ( dry run ) and extra logging in it, I dont see it in your examples



#25 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 20 March 2020 - 10:59 PM

/usr/bin/docker run --rm slugger/embysweeper:latest -s 192.168.1.2 -u admin -p password -e Kid1 -e Kid2 -e Wifey -b Movies -b "Home Videos" --ignore-fav-series --filter IsPlayed=true --filter IsFavorite=false -l trace delete

 

Dry run is the default for the delete action.  You must specifiy the -d option after delete otherwise it will not try to delete anything, it will just print out what it would like to delete.  And then the -l trace will dump a bunch of extra info about what it's doing to find the files it wants to delete.  And then finally, if the above doesn't provide the answers then you can add --lib-log-level debug before the delete action and that will also log the raw api calls made to the emby server.  Shouldn't need that, -l trace should be enough to figure out why a file isn't being excluded by the given lib exclusion options.


Edited by Slugger, 20 March 2020 - 11:04 PM.


#26 tropicaljoe OFFLINE  

tropicaljoe

    Member

  • Members
  • 26 posts
  • Local time: 09:42 PM

Posted 21 March 2020 - 12:30 AM

I configured and ran again, log attached, but it did not shed any new light. line 6 (in the attached log) lists the filtered libraries properly, however if you look at anything in D:/emby/Movies, that shows in the log, that is part of the library that is excluded. So it does not appear that its scanning the directory, but still lists those files for deletion for some reason. I dont see anything goofy with the particular library either

Attached Files



#27 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 21 March 2020 - 08:44 AM

So the D:/emby/Movies/ are being returned by the scan of the 'Live TV' library.  I've updated the latest docker again to tweak the logging a little more.  Specifically, run the same command as you did except add --lib-log-level debug before -l trace

 

Basically, this will log the raw api req/response received from emby (warning: the produced log file will contain your emby id/password in the raw http output; please be careful if posting the log file).  This will let us confirm that those movies are being returned by the scan of the Live TV lib.  Assuming they are then that's as far as I can go, the rest is up to you to figure out why scanning Live TV is returning unexpected movies.  If I were to guess, my first guess is that this movie lib is somehow defined as a child of Live TV.  All of my scans use the recursive flag in the api call.  So if a lib is somehow defined as a child of another then scanning the parent is also going to return all the items from the child lib.  I'm not really sure if that's even possible, but that's just my off the top of my head guess.  The --lib-log-level debug output should answer that question though.



#28 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 3941 posts
  • Local time: 03:42 AM
  • LocationWarrington,UK

Posted 21 March 2020 - 10:06 AM

Something to check/change/investigate

 

in the dvr settings

 

if you dont set the optional paths for tv and movies - emby uses the default path or the server default dir - so movies and tv can end up in the same directory/library

 

if you specify the optional paths and remove the default path under dvr then going forward the movies and tv will be separate

 

Might be related to the issue you are seeing



#29 tropicaljoe OFFLINE  

tropicaljoe

    Member

  • Members
  • 26 posts
  • Local time: 09:42 PM

Posted 21 March 2020 - 12:07 PM

Wow! thats the issue, I see in the log that Live TV library see's 26 items. I have no idea why live tv is tied to my movie collection library. the paths are no where close to each other. Penkethboy, thanks for the suggestion, I tried it but no luck in this issue

 

Thanks again slugger for helping me with this, looks like nothing to do with your project, but something with my libraries. I did even remove the library and that had no effect, the meantime, if I remove Live TV from the user, items in my movie collection no longer show up for deletion. I will post any updates if I can figure out why this is happening



#30 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 21 March 2020 - 01:16 PM

If there's no obvious setting issue with your libs then you'll have to start heading down the road of enabling debug logging on emby itself to see why it's finding movies in your live tv lib.



#31 Kurosh OFFLINE  

Kurosh

    Advanced Member

  • Members
  • 69 posts
  • Local time: 02:42 AM

Posted 25 March 2020 - 05:41 AM

Hey Slugger,

 

Just wanted to say Embysweeper v1.0.7 is working perfectly. Initially I couldn't tell why some series weren't deleteing but over the coarse of a week they all deleted so my guess is that someone recently manually marked them all as watched.

 

Should I (can I?) update to v2? I'm on Windows 10 and from what I can see from GitHub you only have Docker images and now batch files (with corresponding jar java files)? Not really keen on installing Docker etc just to run a delete script as want to keep my server as lightweight as possible.


Edited by Kurosh, 25 March 2020 - 05:42 AM.


#32 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 25 March 2020 - 10:33 AM

Yeah, I haven't done a release for v2 yet (but you may have noticed I've updated the docs on the github wiki for it as it's imminent), so just the docker is auto created from the development branch on each code push.  When I tag the v2 release, it will also generate the zip with the jar, etc. like the 1.x releases so you'll be able to download the binary release if you're not using docker.  The release is done, I'm just running it in my env for a week or so to make sure nothing obvious is wrong then when I have a free moment prob this weekend, I'll tag and release it.  Be aware the command line format does change in v2 so you'll have to rework any command line you're using in scheduled tasks, etc.

 

Should you update?  If 1.0.7 is working fine for you then probably not -- if it ain't broke, don't fix it.  If you do run into problems, however, the first thing I'd ask you to do is upgrade to latest version, as I can't support every version.  v2 adds some additional logging to help with support and adds the new audit action, which helps determine why a file you think should be deleted isn't being deleted.  It also adds some different library filtering options (you can exclude libraries from scanning or explicitly include libraries for scanning).  But if 1.0.7 is working perfectly fine for you then I would probably just leave it for now, but up to you. :)


Edited by Slugger, 25 March 2020 - 10:35 AM.

  • Kurosh likes this

#33 Kurosh OFFLINE  

Kurosh

    Advanced Member

  • Members
  • 69 posts
  • Local time: 02:42 AM

Posted 25 March 2020 - 10:37 AM

Cool, I'll leave it for now then as all is well. If I run into any issues I'll update.



#34 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 28 March 2020 - 10:01 AM

v2.0.0 released: https://github.com/S...eases/tag/2.0.0

 

Download the binary release from github or if using docker, pull the new 2.0.0 label.



#35 Slugger OFFLINE  

Slugger

    Member

  • Members
  • 20 posts
  • Local time: 10:42 PM

Posted 01 April 2020 - 07:28 AM

v2.0.1 released: https://github.com/S...eases/tag/2.0.1

 

Fixes a few bugs, details at github.  Binary release available at github, new docker release on docker hub.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users