MediaBrowser / plugin.video.emby

Integrate your Emby media library in Kodi
https://emby.media/community/index.php?/forum/99-kodi/
GNU General Public License v3.0
294 stars 168 forks source link

Global option to ignore missing media #328

Open Elegant996 opened 4 years ago

Elegant996 commented 4 years ago

I would like to request an option to ignore missing media. My library is quite large and impossible to stream from my current location. To compensate, I sync the latest media to a local drive and have Emby use that share location.

The format is the same just that some entries are missing. More or less:

Series A -> Exists Series B -> Does not exist Series C -> Only season 2 exists

Having an ignore option would do wonders in allowing my library to update entries even if the media does not exist. Thanks!

angelblue05 commented 4 years ago

I don’t think I fully understand what you are saying. Can we look at a specific example?

Are you saying you don’t want emby for kodi to remove content that doesn’t exist on your server any longer?

Elegant996 commented 4 years ago

In a sense, yes. When Emby for Kodi starts up, it syncs and scans the library to make sure that all media exists. If any media is missing, it asks to stop syncing. In my particular case, most of the media does not exist locally but I do want it to continue syncing and ignore the missing media.

In other words, leave my library entries alone even if they are "missing".

I can achieve this by selecting "No" when the prompt appears to stop syncing but it's rather annoying to do this each start up.

angelblue05 commented 4 years ago

Emby for Kodi does not do that at startup, it just requests from the server the latest changes. However it sounds to me like maybe it is throwing an error when the media is missing. Can you tell me if this is better with 4.1.19? Otherwise, provide your Kodi log (pm on the Emby forums if possible). Thank you.

fatt0ny commented 4 years ago

Hi, Realise this is quite an old thread, thought i would add this for anybody else affected by this!

I have created a small script to modify the plugin code to prevent the error tripping when media is missing. Am sure i've committed some crime against coding in the process, its been in-use now several months with no obvious side affects.

Running this on a cron once an hour as this modification will be overwritten every time the plugin is updated.

`#!/bin/bash

file="/storage/.kodi/addons/plugin.video.emby/resources/lib/helper/utils.py" actionstring='1 == 1' searchstring='if not xbmcvfs.exists(path):' replacestring='if not xbmcvfs.exists(path) and not 1 == 1:'

if grep -q "$actionstring" $file then echo "no action needed" else find $file -exec sed -i "s/$searchstring/$replacestring/g" {} \; echo "emby-plugin mod has been applied" systemctl restart kodi echo "kodi has been restarted" fi`

Regards

Elegant996 commented 4 years ago

That's where that line was... I'll test that with mine today. Could we get that added as an option by chance @angelblue05? Something like Ignore Missing Media or Do Not Validate Media Paths. Thanks!

fatt0ny commented 4 years ago

If i remember correctly this is only an issue if you are using "Native(direct paths)" in the Add-on sync settings, Add-on(default) won't trip the massage but you will lose the ability to play local files if your wan connection to remote emby server is lost! not good if your internet is patchy.

Regards

Elegant996 commented 4 years ago

Yep, that's what I'm using it for. I'm currently away from my main server to the point where streaming large files from it is impossible. Instead, I pull a series or two and have them stored on a local drive at my location.

Emby for Kodi doesn't seem to be a big fan though as not all files are present locally. This fix resolves that issue. This may be a niche issue but it is a very helpful feature!

quickmic commented 3 years ago

Is this still an issue? Please migrate to emby for kodi next gen

Elegant996 commented 3 years ago

Yes, still an issue. Will post over there a bit later. Thanks!

nomandera commented 3 years ago

For consideration. This sounds very much like a use case to cater for Offline mode.

For example DSUB/Airsonic, you can cache a lot of content locally. The client knows there are now two copies, and online copy and a local offline cached copy. If you need to you can flip a switch and the library now only shows cached offline data. When back online you can flip the switch again and you see it all once more.

The OP appears to be catering for not having constant online access by copying some data to a local drive essentially simulating an offline cache.

I dont know if this covers every scenario that "ignore missing data" would but it feels like some offline mode capabilities might even be a better fix for some.

Elegant996 commented 3 years ago

More or less when you're "off-site" from your main media library, you may bring some of it with you (external drive, etc.). If Emby for Kodi is using Native Paths, you can override the path in advancedsettings.xml to point to this new location. The only issue is that much of the media will be missing, hence the reason to ignore these broken links.

Thanks!

quickmic commented 7 months ago

I added a download option 10.X I think this could solve the issues you have?