cw-kid 192 Posted May 11, 2015 Share Posted May 11, 2015 (edited) Hello I am currently testing Emby and plan to integrate it with my Kodi media center systems using the brilliant Kodi add-on for Emby! And I plan to drop the existing MySQL setup for Kodi. I am using the Emby server for Windows version 3.0.5607.1. When Kodi Helix 14.2 exports your Video library to separate NFO files for the Watched / Unwatched statuses it uses a <playcount> tag. <playcount>0</playcount><!-- setting this to greater than 0 will mark the movie as watched I believe in the past XBMC used a <watched> tag instead? This still works with Emby server import as I've tested it by manually editing one NFO file and then importing that title in to Emby. However the new <playcount> tag is ignored, so after importing a small sub-set of my movies and tv shows into Emby all the watched / unwatched statues are lost. Can this please be added soon, so I can import my entire media collection which is very large in to Emby. Many thanks Edited May 11, 2015 by cw-kid 2 Link to comment Share on other sites More sharing options...
cw-kid 192 Posted May 11, 2015 Author Share Posted May 11, 2015 Its also worth noting that the play count is not just 0 or 1. If I have watched a title in Kodi say 5 times then the tag would be: <playcount>5</playcount> It has been suggested as a work around, I use a program sure as Notepad++ to do a bulk find and replace on all the nfo files, to change them to use the <watched> tag instead. But this could be a bit trickier due to the playcount value possibly being anything, depending on the number of times I may have watched the same title in the past in Kodi etc. Thanks Link to comment Share on other sites More sharing options...
cw-kid 192 Posted May 11, 2015 Author Share Posted May 11, 2015 Hi So I went ahead and used Notepad++ to change all the Kodi Helix nfo files to have the watched tag instead of the playcount tag. I then started adding some of my LIVE media content folders to the Emby library. However it doesn't appear to have read all these watched tags and a lot of content is marked as not played in Emby when it should be marked as played. Full details and conversation from this thread onwards with screen shots as well. http://emby.media/community/index.php?/topic/21229-displaying-new-movies-in-kodi-slight-issue/?p=207728 Thanks Link to comment Share on other sites More sharing options...
Luke 37329 Posted May 11, 2015 Share Posted May 11, 2015 i'm not sure where you got that information but we support exactly what the kodi wiki specifies, which is playcount. then there is also watched which is just true/false Link to comment Share on other sites More sharing options...
cw-kid 192 Posted May 11, 2015 Author Share Posted May 11, 2015 Playcount wasn't working at all when I tried it. But watched tag did work on an initial test by editing a single nfo file. Link to comment Share on other sites More sharing options...
cw-kid 192 Posted May 11, 2015 Author Share Posted May 11, 2015 Is playcount supported in the current stable Windows version of the Emby server? I was using that initially then updated it to the current beta version. Thanks Link to comment Share on other sites More sharing options...
cw-kid 192 Posted May 13, 2015 Author Share Posted May 13, 2015 Hi @@Luke Are you sure playcount is working correctly? I just tested it again. The original nfo file from Kodi Helix has a <playcount>1</playcount> tag this means its been watched. I searched the nfo file and there is no <watched> tag present. I then moved the movies folder in to the folder which Emby is monitoring. The new movie was then detected and added in to Emby. However in Emby is was showing as not watched. I then looked at the nfo file again and now this line has been added by Emby: <watched>false</watched> underneath the <playcount>1</playcount> line. So the Kodi nfo is meant to tell Emby the title has been watched but it appears Emby is saying no its not! And adding the <watched>false</watched> tag in to the nfo file after its imported the title. Please can this be looked at again, In the meantime I am having to edit all my nfo files and replace the <playcount> tags for <watched> tags just to get the titles imported into Emby and even then a lot of titles are still showing as unwatched in Emby until I refresh the titles in the metadata manager. Thanks. 1 Link to comment Share on other sites More sharing options...
Angelblue05 4130 Posted May 13, 2015 Share Posted May 13, 2015 (edited) @@Luke My guess is that <playcount> is being parsed as straight playcount instead of also being parsed as watched or not. It still looks for the <watched> tag to assign if the item is played or not while Kodi no longer base it on <watched> but on <playcount> If playcount is 0, then the item is unwatched. Playcount > 0, then the item is watched including how many times the item has been played. In the event you mark something as unwatched, Kodi resets playcount to 0. If you rewatch something, it just adds to the total playcount. Hope this helps sort out this issue! case "watched": { var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { bool parsedValue; if (bool.TryParse(val, out parsedValue)) { if (!string.IsNullOrWhiteSpace(userDataUserId)) { var userData = GetOrAdd(userDataList, userDataUserId); userData.Played = parsedValue; } } } break; } case "playcount": { var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { int parsedValue; if (int.TryParse(val, NumberStyles.Integer, _usCulture, out parsedValue)) { if (!string.IsNullOrWhiteSpace(userDataUserId)) { var userData = GetOrAdd(userDataList, userDataUserId); userData.PlayCount = parsedValue; } } } break; } Guessing something like that? (I don't know C#)..... case "playcount": { var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { int parsedValue; if (int.TryParse(val, NumberStyles.Integer, _usCulture, out parsedValue)) { if (!string.IsNullOrWhiteSpace(userDataUserId)) { var userData = GetOrAdd(userDataList, userDataUserId); userData.PlayCount = parsedValue; if (parsedValue > 0) { userData.Played = true; } else { userData.Played = false; } } } } break; } Edited May 13, 2015 by Angelblue05 Link to comment Share on other sites More sharing options...
Luke 37329 Posted May 15, 2015 Share Posted May 15, 2015 yes you are right 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now