Jump to content

updating existing videos


ecks669

Recommended Posts

ecks669

So ever since Ive used the emby for kodi addon there is a problem where if I replace a movie or episode with a better quality version than kodi cant play it. This does not apply when adding a new movie or episode only when updating existing ones with a different video file. I have narrowed the problem down to kodi caching the smb directory listing. (I am using direct file paths). The error I get is the one of this file cannot be found would you like to remove it from your library. Restarting kodi fixes this, but this gets tedious as anytime a movie or episode is update i have to restart kodi or I cant play it.

 

If I play another video file from the same directory like a previous episode then stop it, this seems to refresh kodis internal directory listing. Now I can go ahead and kodi will play the other episode that was recently updated. I cant do this with movies though as movies are in there own folder so there is no other video file i can play. Ive noticed with episodes if I add the new episode without deleting the old one, kodi will play it fine since it considers it a new entry and I guess it refreshed the directory listing.

 

This can be fixed in the kodi emby addon when its updating an existing episode or movie. Instead of updating the kodi database for that entry and updating the filepath, it should add a new entry in the database with all the old information minus the new filepath and then delete the old one. This would only apply if the filepath to the video has changed any other changes would not require an add and delete just an update.

 

I hope I explained myself well enough

 

Thanks

Edited by ecks669
Link to comment
Share on other sites

ecks669

the problem is not the sync, it syncs fine and updates everything properly. It points to the new video file but kodi thinks that file doesnt exist so it cant play it unless i restart  kodi or play another video file that is within that same directory

Link to comment
Share on other sites

ecks669

I think you are missing the problem completely but I dont know how to explain it better. First everything is syncing up fine so its not a sync problem. When I add a new movie or episode that is also working fine.

 

The problem comes in when I delete an existing movie or episode and replace it with another one (better quality). Again emby for kodi syncs up the new video file fine, but now kodi cant play that file as I get the error that file doesnt exist and if I would like to remove it. As I said this doesnt happen to new video files only when replacing existing ones.

 

So the problem is because of how the emby for kodi addon works where it directly edits the kodi database. Usually kodi scans for any changes and refreshes its internal smb/nfs directory listing. But when emby for kodi changes the filepath directly in the database of an existing movie or episode, kodi doesnt refresh its cached directory listing. This makes kodi think that the file doesnt exist and it cant be played.

Link to comment
Share on other sites

Angelblue05

I understand what you are saying. Usually going into a library and exiting out fixes the issue. When we update the database, the interface is also refreshed. I'm not sure if there would be a simpler way to refresh the path cached in Kodi. I sometime encounter it with newly added content that appear in widgets. But also within the library. Altho I do not get the file not found error, playback just doesn't initiate.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

ecks669

ya it usually just doesnt play as you said, I get that error if I keep trying it a few times. I know its the directing listing that is cached because another way to fix it, is to go into file manager and go to the path of the newly added video manually and playing it once, then I can stop it right away. After this is done I can go back to the library and play it normally and it starts up fine. This is not practical as files are like 4 folders deep sometimes a bunch of episodes have been updated and I have lots of devices.

 

Recently I tried a way so it doesnt happen is to delete the old video file and wait until emby scans and deletes that entry in the database and then add the new video file as it would be considered new. But even this didnt work tried this out yesterday and same thing the video wouldnt play. This is why I thought that if internally in the emby kodi addon the way it handles updating the database would be to treat every video as a new entry, it could possibly solve the problem since this never happens with new videos.

 

Is this possible, and if not is there no way to stop this from happening? Thanks

Link to comment
Share on other sites

CBers

Do you have Real-time Monitoring enabled for your libraries on Emby?

 

Just wondering if Emby isn't sending the update to Kodi.

Link to comment
Share on other sites

Angelblue05

Sorry, I do not know the answer. I do not have the time to work on the project either. I just wanted to let you know that you were not alone. :)

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

Angelblue05

@@CBers emby for kodi is receiving the updates. The issue is Kodi caches the paths and so when an episode is replaced (if the path/filename changes) kodi doesn't pick up on it. When you try to playback, nothing happens. It requires the user to navigate to different libraries to try and force kodi to release the cached path so it can playback the new file.

 

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

CBers

The question is, if an episode or movie is replaced, why does the name change?

 

If I replace something, then the name remains the same.

Link to comment
Share on other sites

Angelblue05

The file quality could be part of the filename, the container could change, etc. I do not have issues when the file being replaced is "the same" as far as Kodi is concerned, as you say. :)

Link to comment
Share on other sites

CBers

So it's just people with OCD about filenames containing the resolution etc. that are having issues :D.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...