Jump to content

Emby Kodi - removing files - very slow + 2 more questions


gdrcar
 Share

Recommended Posts

gdrcar

Hi,

 

I am noticing for a long time very slow deleting of movies/episodes directly from Kodi via Emby remove/delete option. When I remove an episode,series,movie it takes about a minute before deletes it from the Kodi database (however, it deletes the files instantly from the server).

I tried it with two boxes with LE with Kodi 17.6 or CE with Kodi 18.2 and 18.3 on Minix U1 and Minix U9 boxes.

I tried fresh install on both. Also I am using Emby server 4.1.1.0 on Windows 10, and the latest 4.1.4 Emby plugin on Kodi.

Oh and also - its the same if I use Native or Add-on mode.

If I just remove file directly from Kodi via Manage-Remove its deleted instantly from the Kodi database but of course the file is not deleted.

 

Is this normal behavior and if so - can it be optimized,speed up? If not - what else can I try to fix this. It used to be much quicker in the past, but I can't remember

on which versions (defenitely it was Emby server 3.x and some much older Emby plugins).

 

2 more questions:

* Cache Artwork option - since I think 4.1.3  it doesn't do anything when I choose this action in Emby menu - is it disabled right now?

* With Kodi 17.6. when I choose Clean Library options (when some movies/episodes weren't deleted properly via Emby) it worked correctly - it removed all files

that were not present anymore. With Kodi 18.x this options removes entire Kodi library (when using Emby). Is this a problem with Kodi or Emby or both? With 18.x I need to use Emby Repair library which is much much slower.

 

Thank you very much for your help or suggestions.

01_KODI.log

Edited by gdrcar
Link to comment
Share on other sites

Angelblue05

It is normal behavior. I don’t know if it “should” take that long. The add-on tells the server to delete the item. It then waits for the delete event from the server to trigger (message sent the clients to alert of changes) and that is when it is removed trom Kodi. To be sure, you can provide your Kodi log capturing this.

 

I guess I could technically trigger an internal removal, but the main issue with this is if deletion fails server side, then your library will not line up anymore.

Edited by Angelblue05
Link to comment
Share on other sites

gdrcar

Thank you for your answer. I will try to capture the log and hopefully you'll see what's what.

The server is quick (intel i7 8core, 5ghz,64gb ram,ssd,1gb NIC..) and it shouldn't be problematic.

Link to comment
Share on other sites

Angelblue05

It all depends on when the event is received. Then after that, it's up to the add-on. I'll wait for your log.

Link to comment
Share on other sites

gdrcar

Hi,

 

I restarted Kodi and:

- emby log left at info and I deleted one episode

- I updated emby log to debug and deleted one of the series

 

Log is attached at first post.

 

Thank you for your help

  • Like 1
Link to comment
Share on other sites

Angelblue05

@@gdrcar

 

Checking your log, it looks like your server took about 40 seconds to send the event to delete content. That's the reason for the delay. I will see if something can be done to improve this client side, or at least display a confirmation the delete request was sent successfully.

Link to comment
Share on other sites

gdrcar

Thank you very much for your reply. Can I send you some more logs from the server or something, so we'll see why the server takes so long? It's always the same - about 45s-60s to delete the file. I think the delay started with Emby server 4.x, but I'm not 100% sure.

Link to comment
Share on other sites

Angelblue05

@@Luke

 

Is it normal for the server to take 40 seconds to trigger the websocket event for the removed item? It used to be much quicker in the past.

 

If it is intended, then I will change a few things around.

Edited by Angelblue05
Link to comment
Share on other sites

Yes. What would you to change? Ideally you shouldn't have to care how long it is.

  • Like 1
Link to comment
Share on other sites

Angelblue05

I will make the addon delete the entry right away instead of waiting for the callback then. 40 seconds is a little long to update the listing.

Link to comment
Share on other sites

horstepipe

It’s a little off topic, but @@Luke

 

Has something changed in the current beta circle regarding websockets? I’m facing some slowness issues, too. Especially Emby for Kodi needs way longer now until the welcome message appears. Strange thing is that on server dashboard I’m seeing the “user is online” message 30 seconds before I’m seeing the welcome message in Kodi.

There are no errors in the logs at all (Kodi and Emby server). Accessing the emby webinterface works without problems, too.

Link to comment
Share on other sites

gdrcar

Thank you. I will try this version later today and let you know how it goes.

@AngelBLue05: Awesome. Now it takes about 5s to remove the files. Tried with folder with 30 files and one file. It's pretty much the same.

Thank you very much for your help. 

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

gdrcar

@ANgelBlue05: I don't know if you saw my reply, but it's solved as far as I am concerned. Thank you very much.

  • Like 1
Link to comment
Share on other sites

horstepipe

@@Angelblue05 what happens now if a user doesn’t have the privilege to delete an item in Emby server? Will it be removed from Kodi?

Will one have to refresh the whole library if this happens accidentally?

  • Like 1
Link to comment
Share on other sites

Angelblue05

@@Angelblue05 what happens now if a user doesn’t have the privilege to delete an item in Emby server? Will it be removed from Kodi?

Will one have to refresh the whole library if this happens accidentally?

Yes. But you know, there the option to disable the delete content option in the context menu. Anyway, with the change it’s like removing via the Kodi interface. Content will be readded if updated and not deleted successfully. I am still looking for a better solution, but waiting 40 seconds for a deletion callback is too long.

  • Like 1
Link to comment
Share on other sites

Angelblue05

The delete API call will fail if the use does not have access to delete that item. You could just look at the return http code and if it is not 200 ok then don't do the local delete.

 

Thanks for the suggestion. However this is not what I see in my testing. It returns 204 regardless if the user has access to delete the file or not.

Link to comment
Share on other sites

Angelblue05

@@horstepipe

 

With the new addon version 4.1.10

 

I added a verification. If the item is deleted via Kodi, it will remove the item from Kodi (and from server if able), but it will validate a bit later if the item was indeed removed. If not, it will re-add the item automatically.

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

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...