Plugin.video.netflix: library.ndb2 has disapear

Created on 30 Mar 2019  路  7Comments  路  Source: CastagnaIT/plugin.video.netflix

I'm submitting a ...

  • [X] bug report
  • [ ] feature request
  • [ ] support request

Addon version used

14.0.beta23

Description

Exported shows are not shown anymore in the addon, list is empty, but the strm files remains present on the remote nfs share hosted on a synology drive.

I can't yet determine why, but the library.ndb2 is missing in addon_data/plugin.video.netflix folder.

If I restore a copy, the shows are displayed correctly, as when the file was backuped after exporting the shows.

Steps to Reproduce

I had the problem multiple times, but I can't tell yet how to reproduce the issue. I keep trying to understand what's happening.

Maybe it could be related to a storage timeout as my shows are exported on a nfs share hosted on a synology drive, and it can take up to 20/30 seconds for the drive to wake up?

Context (Environment)

LibreELEC 9.0 MR1 on a RPi3
Synology drive with NFS support for storage

Installation

  • [X] I'm using this Netflix Repo
  • [ ] I'm using other Netflix Repo (Please specify which)
  • [ ] I'm using a different source (Please tell which)

Operating System

  • [ ] Linux (x86/x64)
  • [ ] OSX (x86/x64)
  • [ ] Windows (x86/x64)
  • [X] Linux (ARM)
  • [ ] Android

Debug log

Sorry no logs yet, as I can't determine when the files is deleted.

All 7 comments

it's very hard to know what happened especially without log. Too little information to help you if you find something more precise about the cause report here

Hey!

Yeah I know it's not enough to track the cause of the bug, and I'm still fighting it.

Since the issue is opened, the file has been deleted twice yet, while watching some episodes exported to the library.

I'll enabled debug and collect logs as soon as I can control how to reproduce the bug.

Also, I assume that new episodes won't be exported if the DB file doesn't exists, as a side effect of that bug...

After some more research, I think I have a good overview of the problem.

First, it's platform independant : I could reproduce the issue on a Windows 10 with a fresh Kodi install.

How to reproduce :

1- Retreive the value of the cache TTL setting (I changed it to 2 minutes for the logs, I was getting bored to wait for 10 minutes)
2- Export any item to the library
3- Make sure library.ndb2 exists
4- Restart Kodi (mandatory). I couldn't reproduce the issue 'till Kodi was restarted.
5- Play any item exported
6- Stop playing and wait for at least the time set for items TTL (2 minutes for me) or you can enjoy your episode ^^
/!\ you should not move around in kodi, just keep the episodes list on screen
7- Play the same of next episode
8- The library.ndb2 has diseapear

I changed the TTL to 20 minutes, I had to wait 20 minutes before the file was deleted.
I also changed the TTL to 0, and the file was not deleted after 10 minutes (didn't wait more)

Logs attached.

kodi.log

Hope you can find the root cause now ;)

btw, thanks for the job you do!

I've had a quick look, but I've got to spend more time figuring out how it works

Try out this test version
I should have solved the problem
let me know

plugin.video.netflix_TEST.zip

Looks good on a first test ,I can't reproduce the issue anymore.

I gonna put this version on my day to day PRi, and keep monitoring it for a week or so, then report back again.

I really wonder what was causing the problem. File locked? Wrong object to write? I hope I can see the changes soon (in a branch maybe ?) :D

Thanks for your speed in maintenig this version! Cheers.

the fact is that the previous developer used the same method to save the data that is used for the cache, it would have been better to do a separate thing, because the cache is cleared according to the TTL. I implemented a code to avoid data loss at the end of life.
In the future it would be better to create two separate classes one for cache one for persistent files...

I'll put the fix in the current branch shortly

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eyalgm picture eyalgm  路  7Comments

gary9872 picture gary9872  路  3Comments

bogdanszmyd picture bogdanszmyd  路  8Comments

dagwieers picture dagwieers  路  12Comments

ezar picture ezar  路  17Comments