Release - After Watch

  Thread Rating:
  • 3 Votes - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hairy Hippy Offline
Senior Member
Posts: 118
Joined: Dec 2010
Reputation: 0
Post: #136
Shame about this imdb business. Is there no work around?
find quote
raynerape Offline
Junior Member
Posts: 23
Joined: Dec 2008
Reputation: 0
Post: #137
Hello, has anyone figured out how to enable After Watch delete of SMB shares on Windows?
find quote
randomjohn Offline
Junior Member
Posts: 1
Joined: Dec 2014
Reputation: 0
Post: #138
(2014-05-13 18:20)bobrap Wrote:  
(2014-05-01 18:29)AlexVallat Wrote:  This appears to be just the plugin I'm looking for, so thank you for writing it!

Unfortunately, there seems to be a small bug in it, when it comes to network shares. It doesn't appear to be able to delete any files accessed through smb.

Doing a little digging, I've tracked this down to the use of os.path.normpath. When Movie or Episode (in service.py) gets the file path from the json API, it will have a path something like "smb://server/share/folder", which is then passed through os.path.normpath before being assigned to self.path. Normpath then completely mangles it, producing "smb:\server\share\folder" which isn't going to work for anyone!

I tried simply replacing the line
Code:
self.path = os.path.normpath(p)
with
Code:
self.path = p
and that makes it work (for my particular case!), using the alternative deletion method (so using xbmcvfs for the file operations). Also, make sure in file management - episodes (or movies I guess) you have it set for single folder, if that's how you're set up.

Ideally, it would be nice if the plugin could simply request xbmc to remove the video from the library, and let its default handling do the deletion (rather than delete and request full cleaning). Unfortunately, as far as I can tell from a cursory inspection of the API, it's completely impossible to remove an item from the library using the API. Which is a shame.

Tried this and still won't delete a file for me.

I just sorted this out. First, make sure using the context menu - Manage - remove - delete works. I also have my passwords.xml file set up to re-path smb files to smb://username:password@ipaddress/ ... the key wasn't the changes in service.py for me. It was making sure to use xbmcvfs is set - go into after watch - settings - advanced and tick on "alternate file management method". I only know that because I first tried changing service.py but forgot to do the xbmcvfs thing and it didn't work. then i backed out the service.py changes and did make the alternate file management and now it works as intended.

Now I just need to figure out how to make it work more like the context menu functionality (i.e., doesn't run a full clean and re-scan of the library).

Anyway hope that helps.
(This post was last modified: 2014-12-10 03:51 by randomjohn.)
find quote
Post Reply