Jump to content

Emby/Kodi beta auto-deleting watched videos


mobamoba
 Share

Recommended Posts

mobamoba

When I hit stop on a video in Kodi (Helix), Emby beta deletes it from the Kodi library without asking - hit stop and it's gone. This is new behavior so I'm guessing it had to do with a recent update and it's already happened twice to me today. The only way to avoid it is to configure the Emby playback to offer delete for watched videos. When this box is checked, a window comes up asking me if I want to delete; if I hit "no" then the video remains there, at which point I can remove it from both the Kodi library and Emby server (if I wish) by hitting the context menu.

 

When that playback box isn't checked, it just deletes it from the Kodi library on its own. I'm using Emby .1.81 and I've attached my log. Thanks.kodi.log

 

ETA: The file still exists on my hard drive and shows up on the Emby server when I go look in the Metadata Manager section. However, when I go look at the TV Shows section of the Emby server, the episode doesn't appear at all. It's as if hitting stop in Kodi deleted it from both the Kodi library and the Emby library while leaving the physical file on the drive.

Edited by mobamoba
  • Like 1
Link to comment
Share on other sites

xnappo

Are you sure you aren't filtering watched items?  Hit left on a list menu to change the filter.

Link to comment
Share on other sites

mobamoba

I've always had my filters set to only show unwatched and have never had this problme. But the behavior has changed. Up until today, I'd watch a video and, after hitting stop, would be returned to my episode list where the video I'd just watched (along with other unwatched videos) would be in the list; I'd then hit the context menu and manage my library by deleting the episode from both the library and the hard disk.

 

As of today, I hit stop and the episode vanishes from list. Since my filtering settings haven't been touched, something must be different with the plugin. Perhaps it's updating the "watched" status faster or something.

 

In any event, I much preferred the previous behavior because it allowed me to manipulate the video after viewing it. Is there a way to return to that? Or, if not, a way to leave the video marked as "unwatched" even if I've watched it? This current behavior of eliminating it from the list instantly upon hitting stop just forces me to jump through hoops in order to get it reappear so I can then delete it.

 

Thanks.

Link to comment
Share on other sites

xnappo

Yes - it updates the watched setting much faster now - this is a feature :).  What is it you want to do with it other than delete it?

 

xnappo

Link to comment
Share on other sites

mobamoba

I want to be able to hit the context menu where I can replay the video if I want or mark it unwatched in case someone else in the family is watching the same show and wants to be able to find it. The problem with the new behavior is that it eliminates the possibility for accessing the options in the context menu. Additionally, sometimes you make a mistake, like fast-forwarding too far or accidentally jumping to the end; before, if you hit stop after one of those events, it was easy to resume; now, you have to jump through hoops to find the video again.

 

I use the context menu all the time. If you're going to keep this feature, can you at least make it optional so those of us who use the context menu can turn it off?

Edited by mobamoba
Link to comment
Share on other sites

mobamoba

How was it working before? Is there a way to return to that? If not, is there a way to disable to make the automation optional so a video has to be manually marked as watched? Or a way to have the context menu automatically popup upon hitting stop?

 

While I'm sure some people who want their videos to be instantly marked watched and vanish from the list, what about those of us who don't? Kids, for example, like to watch the same thing over and over; this feature makes it for them to do that.

 

I hope you'll rethink this or at least put a configuration option to "never automatically mark videos watched" or something so won't render the context menu essentially functionless. For now I guess I can go into Kodi's advanced settings xml and set the watched time to 101, which will never mark something as watched, but that doesn't seem like the greatest workaround to me.

 

Thanks.

Edited by mobamoba
Link to comment
Share on other sites

xnappo

It was working before because the code was inefficient, you were enjoying our inefficient beta code. 

 

You watched something, you have the filter set to hide watched items... It is working like it should.  We don't actually control this here - Kodi and the Emby server do.

 

As you said - the Kodi setting to force it not to mark watched sounds like what you want.  The other option is to not filter watched items, and then set this option for easier navigation: "Settings -> Video -> Library -> Jump to first unwatched TV show season/episode"

 

Another option is to start using Users/Profiles for different users.

Edited by xnappo
Link to comment
Share on other sites

mobamoba

Yes I loved your ineffecient code! :) I understand the principle behind cleaning it up; my issue was that, at least with the skin I'm using (though maybe this is true for all skins I don't know), when I removed the filter and had it show All Videos in the episode list, it also showed All Videos in the series list, including a ton of empty folders - the filters were linked somehow meaning the only way to declutter my series list was to only show Unwatched - which then only showed Unwatched in my episode list.

 

I know that there's a "hide empty seres" setting in the advanced xml settings, but, based on other threads, I wasn't sure whether or not enabling this would screw up the Emby/Kodi library connection somehow so I left it alone. Would it?

Link to comment
Share on other sites

xnappo

I do hate how the 'Hide Watched' is not separate between Series and Episode views, but we have code that should be deleting anything that is really empty (not all watched, really empty).  Can you try that again?

 

Also no one has tried the "hide empty series" XML thing since the database access changes - you might try it again and see if it works now.

 

Also - see this advancedsettings option:

 <hideallitems>false</hideallitems>  <!-- removes the "*All" items from the video library --> <!-- This will be replaced in v15 with a GUI option. -->
Edited by xnappo
Link to comment
Share on other sites

mobamoba

Yes I'll give it a try later and report back. Since I delete all my videos upon watching, my "All Videos" and "Unwatched" filters should (theoretically) show the exact same thing. When I tried yesterday, it wasn't doing that, but I'll restart Kodi and try again.

 

Also, the Context menu distinguished between removing an item from the library and deleting a file from the server; with the Emby delete option that appears at the end of a video, am I actually doing both at once?

Link to comment
Share on other sites

xnappo

(1)Yes I'll give it a try later and report back. Since I delete all my videos upon watching, my "All Videos" and "Unwatched" filters should (theoretically) show the exact same thing. When I tried yesterday, it wasn't doing that, but I'll restart Kodi and try again.

 

(2)Also, the Context menu distinguished between removing an item from the library and deleting a file from the server; with the Emby delete option that appears at the end of a video, am I actually doing both at once?

(1) Okay.. If you normally delete everything, it really seems like you should just not filter watched, because you should not have many.

(2) Yes, we can't prevent the double question when deleted through the context menu/delete key - but the end of video one does both at the same time.

Link to comment
Share on other sites

SwanStream

 

I do hate how the 'Hide Watched' is not separate between Series and Episode views, but we have code that should be deleting anything that is really empty (not all watched, really empty).  Can you try that again?

 

@@xnappo - can you elaborate on this? Do you mean deleting directories or just the empty series/season from the view?

 

It's been a wild dream of mine that Emby/Kodi would delete left-over flak after/when deleting a file and keep things tidy. In my world every video has a .nfo and -thumb.jpg by the same name. It'd be sweet if these were also deleted when a show is deleted... and if it's the last show in the folder, delete the season.nfo and season directory as well. (if you're gonna dream, dream big... right?)

 

Maybe as simple as adding an 'extensions to be deleted' dialog for the 'offer to delete' check box?

Link to comment
Share on other sites

xnappo

That is an Emby server question.  In general, I really recommend you don't use nfo files etc at all with Emby, just turn created them off.  Much cleaner directories.

 

All we do is tell the server to delete, so any enhancements to what that means need to go there.

 

What I was referring to was cleaning up the local database, which we do do on full syncs.

Edited by xnappo
Link to comment
Share on other sites

mobamoba

So I set my filters to show Unwatched only and used Emby delete (as opposed to context menu delete) to delete episodes. I'm not sure how long it takes Emby to update, but it still showed some recently emptied folders in the TV Series menu. For example, if I only had one episode of a show and watched it then deleted it using Emby delete, the episode would vanish immediatley from the episode list (as it should as discussed above), but the now empty series folder would show up in the main TV Series list.

 

It would be nice if the empty folder vanished from the TV Series list as quickly as the episode vanished from the episode list but perhaps those are controlled in different ways. I also tried it by having the filter show All Videos then watching and deleting a video and I had the same issue - the now empty folder would still show up in the TV series list.

Link to comment
Share on other sites

xnappo

Did you try the XML setting to hide empty folders?

 

We can possibly handle this in the addon, but if Kodi can already do it that is preferred.  The code was much different back when bugs with it were reported.  Not saying it will work, but it is worth trying.

Link to comment
Share on other sites

mobamoba

I changed <hideemptyseries> to true in my advanced settings and, while it hasn't crashed anything, I'm now getting some strange hybrid of the old Emby behavior and the new Emby behavior. Prior to enabling that setting, I'd press stop, the episode would vanish, and Emby delete would come up. After enabling that setting, I press stop, the episode remains but with a "watched" checkmark, I hit the context menu and go to remove from library, at which point I get the two Kodi questions about removing from both library and server, after which the Emby delete comes up asking me if I want to delete.

 

So somehow that setting is messing up some sort of communication between Kodi and Emby.

Link to comment
Share on other sites

xnappo

Ok - leave it off then - sounds like it is doing something 'bad'.

 

@@marcelveldt - thought on this?  We could add a user option for full sync on deletes to clean up empty shows/seasons.

Link to comment
Share on other sites

Angelblue05

Can we do anything about library update? On library update, clean up files and refresh whatever.... you can also do on container refresh we could do the same?

 

Edit: It doesn't make much sense. I mean use library update to our advantage. Clean up files and refresh library.

Edited by Angelblue05
Link to comment
Share on other sites

xnappo

 

Edit: It doesn't make much sense. I mean use library update to our advantage. Clean up files and refresh library.

 

I don't really see any advantage to that over going back to a timer unless I am missing something.

 

Basically we need to either make the web socket events do EVERYTHING a full sync does(meaning a full sync is never needed), or we need to give the option to have periodic (either on a timer or event) full sync.

 

For this particular case, I think it is fairly easy to trigger a 'TvShowsFullSync' if we detect there are no more episodes in a season after a delete.  But I need to study the code more..

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

Angelblue05

I was thinking more like attaching the manual sync to the clean library event. Instead of only having it under the Launching menu, I find it very useful. :)

Edited by Angelblue05
Link to comment
Share on other sites

xnappo

What I am saying is if you are finding yourself needing to do a manual sync, then the websocket events aren't doing their job.  We need to make it so you NEVER feel the need to do that.

 

Now - short term I agree making it easy to 'clean up' is a good thing to do, but we shouldn't use it as a crutch - it should not be needed.

Edited by xnappo
  • Like 1
Link to comment
Share on other sites

Angelblue05

true, but it's useful in the situation where there's something major that changed (maybe changing rating restriction or something) and you don't want to rescrape everything, the manual sync does what the websocket can't. I like it so I can try to "salvage" the database instead of starting from scratch (you would use it very very rarely).

Edited by Angelblue05
Link to comment
Share on other sites

xnappo

Well, in that case, a restart or manual sync is needed.. But that should very rare.  Any cases where a manual sync is needed just to 'clean up' because the websocket did something partial needs to be handled.  

 

I am leaning towards any websocket add/remove action on an 'episode' forcing a full TV sync - the nested nature of TV stuff makes that necessary often.

  • Like 1
Link to comment
Share on other sites

xnappo

@@mobamoba - the next version will auto-delete empty TV shows when the web socket deletes a show with only one episode.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...
mobamoba

I'm reviving this thread just to let you guys know that, in recent builds, I've seen this behavior returning, i.e. there's a lag between hitting Emby delete and the show actually vanishing from the list/library. Sometimes it happens immediately; other times, I'll hit Emby delete and the show will still be sitting there and then I use the context menu to remove it from the library.

 

I'm not sure where the lag comes from, but there were a few builds (like the one that prompted me to start this thread because I didn't understand what was happening) where Emby delete instantly removed the title from the list and, in recent builds, it's been spotty in that regard so I thought I'd let you know.

 

I'm not sure how I can help debug the lag since the feature works just not with consistent timing, but happy to provide logs or something if you think they'll help.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...