Jump to content

Sync is getting 2 versions of TV episodes


treason
Go to solution Solved by Luke,

Recommended Posts

treason

Im noticing that every new TV epidsode is getting 2 items in the kodi sync. One at //192.168.1.100/TV/whatever, and another at //SERVERNAME/TV/whatever

 

I've used IP addresses because UNC Paths are problematic in my home, possibly because the server is windows, and kodi is LibreElec. TBH, I'm not even sure where the //SERVERNAME/ path is coming from.

 

When I load up metadata manager in Emby, I only see the IP version of the video. Also if I reset the local kodi database, the duplicates are removed, but when a new items comes in, I get 2 versions. One version I cant play because it's //SERVERNAME/ and the IP version that I can play.

 

I checked my settings all over the place, and can't find this //SERVERNAME setting. I also checked sonarr but nothing about UNC paths there.

 

FWIW, I've been using this kodi plugin for over a year, and this problem only started in the past couple of weeks.. I am on the stable emby repo, not beta.

 

Thanks for the help

Link to comment
Share on other sites

treason

Ok, so here's the kodi log https://dfsd

 

I intentionally removed the latest teen titans go episode, scanned the media library. then restarted kodi, added the episode back, scanned the media library again, and now I have two of those teen titans go. The first one wouldn't play (probably b/c it's the bad UNC path) and the second one played fine.

 

Here's how it looks in kodi: http://s3.amazonaws.com/PicUp/wtx41D.png

 

And how it looks in Emby, showing that there is only one copy of this episode: http://s3.amazonaws.com/PicUp/aolpOe.png

And the emby details of the file: http://s3.amazonaws.com/PicUp/AwVgwJ.png

And the 2 kodi details on the file: Bad version (smb://server..) http://s3.amazonaws.com/PicUp/H8FQAT.png

Good version (smb://192.168.1.110) http://s3.amazonaws.com/PicUp/7N0GF4.png

 

I have no idea where it's getting the bad UNC path from

Edited by treason
Link to comment
Share on other sites

treason

Other whole TV shows started dupping too, like the amazing gumball.. thats in the library twice now too. The only way to fix kodi is to reset the db.

 

Also I am on the stable channel of the kodi addon, and Im using the server sync plugin thing

Link to comment
Share on other sites

treason

Sorry, Images updated.

 

I have sonarr that downloads and sends to emby but that's really it, also my addons in kodi are pretty bland, I doubt that's it..

 

Any other ideas?

Link to comment
Share on other sites

treason

can you try a clean install and just install the Emby addon NOTHING else and see if you can reproduce the issue.

 

As requested, I installed a fresh version of kodi on my macbook with the only plugin being emby, same problem occured.

 

 

search for `/tv/The Amazing World of Gumball` and you will see one item that appears at the smb://Server path incorrectly, and another at the smb://192... path that is correct.

 

I'm totally stumped here, can anyone help?

Edited by treason
Link to comment
Share on other sites

treason

We'll I did recently split my TV category into 2 folders because I ran out of drive space: http://s3.amazonaws.com/PicUp/ttN38d.png

The mappings are both set to 192. And Emby doesn't show the duplicates, only kodi does.

 

And this doesnt happen to movies, only to TV... Is there a way to force reset a category in EMBY and any cached data that might exist? I don't want to wipe out my whole library, but I'm thinking maybe I can reset TV only. Would removing the folders, refreshing the library, adding the folder back do it?

Link to comment
Share on other sites

treason

Maybe a long shot, but do you think the Time Lord TV plugin has anything to do with it? If you're not aware, it's a emby server plugin that sets TV shows date added, to the original air date.

Link to comment
Share on other sites

treason

Well this sucks, I deleted and re-added the whole TV category and it's the same problem. This is killing me... any other ideas?

 

It seems like emby is dynamically changing the path from //server to //192 for some reason, then the sync plugin is not deleting the item with the bad path.

 

How does the sync plugin know what to delete? Is it matching by name or ID? How can I debug further? I read somewhere that the new sync plugin uses a json doc store, would that give me any more clues? I'm stumped

Link to comment
Share on other sites

treason

I tried to isolate it with a new library and couldn't easily, so I edited the hosts file so the smb://Server path works and then I removed the references to 192.168..

 

But now it's giving me dupes based on case.. so now i have 2 entries for one episode, like smb://Server/tv/Some Show and smb://Server/TV/Some Show

 

They are obviously the same path, but the thing is reading them as 2 different episodes.

 

The dupe is not in emby, only in kodi...

 

Thoughts?

Link to comment
Share on other sites

treason

Hey Luke,

 

I've rebuilt the local kodi DB several times, and it has no effect. Old titles are fine, but when new titles come in, I believe the emby server sends the paths in 2 different variations and confuses the sync addon.

 

I have like 7 user accounts, and a boatload of videos, I'm really hoping not to lose all that playstate/user watched and custom image data by wiping out my whole server.

 

I'm pretty sure *nix environments are case sensitive, where windows is not.  I'm tempted to just toLower all of the incoming paths in the sync addon to fix this, but then but then I'll be on a custom fork and i'll never get other updates.

 

Is the plugin on github? Can I submit a pull request to lower() the path if smb && *nix?

Link to comment
Share on other sites

treason

I don't think it will fix it, from your original logs the items were coming in with different ids as well as different paths.

 

So if the sync is based on Id and not paths, then I need to find out why it's not deleting the invalid Id's, since Emby doesn't show the dupes. I'll start poking around.

 

No source on github then? I'd like to share my branch if/when I find the issue

Link to comment
Share on other sites

treason

Ok so this is interesting.. I am using the confluence skin, with Jarvis on libreelec.

 

I notice that if I go to `Videos - Recently added episodes` via `ActivateWindow(Videos,RecentlyAddedEpisodes,return)` I get the dupes

see workaholics: http://s3.amazonaws.com/PicUp/kyxL7M.png

 

But if I go to Videos > Emby > TV > Recently Added Episodes.. there's no dupe

same workaholics (most dangerous game) http://s3.amazonaws.com/PicUp/iNs9B0.png

 

Also seen when I go to `ActivateWindow(Videos,TVShowTitles,return)` I see an entire duplicated show http://s3.amazonaws.com/PicUp/mNDXv8.png

But again if I go to Videos > Emby > TV > TV .. the dupe is gone http://s3.amazonaws.com/PicUp/hK0yEV.png

 

Whats the difference between these 2 entrypoints? Why does one have dupes and the other doesnt?

 

I feel like I'm getting closer...

 

 

*edit* forgot to mention that the duplicates now share the exact same path, so the whole lower() idea is out the window

Edited by treason
Link to comment
Share on other sites

treason

From kodi json/rpc

    Show Id: 97/98
    Episode Id: 5818/5930

Kodi MyVideos99.db
    tvshow table
        idShow: 67/98
        Difference is genre, all else is same
        http://s3.amazonaws.com/PicUp/2z33d2.png
    tvshowlinkpath table
        `SELECT * FROM tvshowlinkpath where idShow in (67,98)`
        both have idPath 2050, which resolve to path.strPath of smb://Server/tv/Workaholics/
    seasons table
        all seasons are duped
        http://s3.amazonaws.com/PicUp/tHn2NE.png
    path table
        no dupes http://s3.amazonaws.com/PicUp/EaYF8a.png
    episode table
        plenty of dupes, probably because of the doubled idShow and idSeason
        idFile returns the same fileid
        idFile 5664 http://s3.amazonaws.com/PicUp/icYLiB.png
    

kodi's emby.db version 2.3.46

    the `emby` table seems to be self referencing?
    assuming emby.kodi_fileid joins to episode.idFile then
    `SELECT * FROM emby where kodi_fileid = 5664`
    returns 2 rows, 2 emby id's
    http://s3.amazonaws.com/PicUp/gVdeVm.png
        

So now, I go to the emby api,

    curl -H 'x-mediabrowser-token: XX' http://192.168.1.110:8096/emby/Users/123/Items/ada284d54876514cf076428bf80e1adf | pbcopy
      
    curl -H 'x-mediabrowser-token: XX' http://192.168.1.110:8096/emby/Users/123/Items/2281e3e7badbab2a8086b467ee0f0505 | pbcopy
      

    Same file, different IDs?? Such a mindfuck..

    Series id `f78ae02f5573bba210c0b6c7749af273` doesnt exist in web UI

  
Through the emby web UI, I only see one show @ 248eb5445607be5aebf9113600c46cb7

I'm totally lost. If anyone wants those kodi DB's let me know
 

Edited by treason
Link to comment
Share on other sites

treason

Around the time when my issues started, I ran out of space on that F: drive, so I moved half of the TV shows to the A: drive, then merged both paths to the TV category.

Early on in this thread, I removed the whole TV category, scanned the media library, and added the TV category back again but it seemed to have no effect.

 

Is there a better way to reset the whole TV category?

Link to comment
Share on other sites

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