• 1
  • 28
  • 29
  • 30(current)
  • 31
  • 32
  • 96
WIP Media importing and library integration (UPnP, Emby, Plex, ...)
I’m around and following this thread. I’ll try to help if I can. If you have questions about how Emby for Kodi does some stuff.
Reply
(2019-11-15, 02:14)LongMan Wrote: @Montellese

From Luke

"If you had one endpoint to update all of that at the same time, would you do that, or would you still be updating different values at different times?"

Edit:
That
being
  • watched: this seems to be possible with a call to POST /Users/{UserId}/PlayedItems/{itemId} with the property "DatePlayed" set properly
  • unwatched: this seems to be possible with a call to DELETE /Users/{UserId}/PlayedItems/{itemId}. I'm assuming that this also removes the "DatePlayed" property
  • date played: see watched / unwatched. The only "problem" here is that in Kodi it's possible to manually mark an item as unwatched but keep the "last played" property set
  • resume point: this seems to be possible with a call to DELETE ​/Users​/{UserId}​/PlayingItems​/{Id}
 

Whenever an item has changed I check if one of the properties listed above has changed compared to the information provided by the Emby server. Depending on which of the properties has changed I'm currently using different methods to push those differences / changes to the Emby server. If there would be a single endpoint that would make things easier because I would only have to execute a single API call instead of separate ones.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
In the mean time I've fixed one of the open issues for sure and the other one most likely (a bit difficult to reproduce). I've started a new test build at https://jenkins.kodi.tv/view/Windows/job/WIN-64/11086/. It should be available on the mirrors at http://mirrors.kodi.tv/test-builds/windo...03-x64.exe shortly.

This test build contains support for
  • manually adding a media provider by enter its URL
  • automatically observing changes to imported media imports on the Emby server and synchronizing them to the Kodi library
  • updating mark as watched / unwatched and resume point on the Emby server
  • improvements to the architecture / implementation

ATTENTION: There were changes to the video database layout so remember to drop your MyVideos117.db before testing this new build.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
I tried the new build but i am not getting the server to show under media sources. The items in the database previously still plays but it doesn't update the server.

This is playing items that were in the database before
https://drive.google.com/file/d/12G_zbVx...sp=sharing

This log is when I first installed without updating the plugin. Not sure why it crashed so i aatached the log
https://drive.google.com/file/d/1Q6MbYNF...sp=sharing

Hope that helps.

When you are comfortable with the Kodi Build, could you ask @Milhouse to run a LibreELEC build. It is much easier to test with LibreELEC as it is easily isolated, and is it also easier to set up multiple clients.
Reply
@LongMan thanks for the feedback. I forgot to mention that I made changes to the video database layout but I didn't bump the version. So you need drop the MyVideos117.db database for everything to work.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Does the Base URI include the Port?

https://drive.google.com/file/d/19FR9A7X...sp=sharing
Reply
(2019-11-17, 23:04)LongMan Wrote: Does the Base URI include the Port?

https://drive.google.com/file/d/19FR9A7X...sp=sharing

Yes the port is part of the base URI. Please try again with https://www.dropbox.com/s/qr58iadjfeer1v...y.zip?dl=1 and enable debug logging for Kodi. Did you try to add the media provider manually? IIRC in your case it should work with auto discovery.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
Yes. Auto discoery does work but it crashes as soon as I select the user.

https://drive.google.com/file/d/10oI8Adm...sp=sharing
Reply
@Montellese,

From Luke,
"OK so in the 4.3 release you'll have this:
/Users/{UserId}/Items/{ItemId}/UserData
Which takes four params:
  • PlayCount
  • Played
  • PlaybackPositionTicks
  • LastPlayedDate
Please let me know if you have any questions. Thanks."
Reply
(2019-11-18, 01:53)LongMan Wrote: Yes. Auto discoery does work but it crashes as soon as I select the user.

https://drive.google.com/file/d/10oI8Adm...sp=sharing

That's odd. I don't see any crashes anymore on my setup but there used to be some due to deadlocks. Unfortunately I wasn't able to load your crash dump. For some reason it can't show the call stacks which makes it useless. Maybe I'm just out of practice Undecided

Enabling debug logging would help because right now there's almost no information in your log file.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
(2019-11-20, 12:37)LongMan Wrote: @Montellese,

From Luke,
"OK so in the 4.3 release you'll have this:
/Users/{UserId}/Items/{ItemId}/UserData
Which takes four params:
  • PlayCount
  • Played
  • PlaybackPositionTicks
  • LastPlayedDate
Please let me know if you have any questions. Thanks." 

Great thanks. Any estimate for when 4.3 will be available? I'll add the code to detect / check the Emby server version and then we'll see if it works :-)
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
When I enable debug logging, it does not crash. It allows me to select the user and to add imports. However no synchronization takes place.
The logs are here.

https://drive.google.com/file/d/1I5-45Mi...sp=sharing

The New API is in the latest Beta of Emby Server, found Here. Choose Beta Channel

Cheers
Reply
(2019-11-20, 19:29)LongMan Wrote: When I enable debug logging, it does not crash. It allows me to select the user and to add imports. However no synchronization takes place.
The logs are here.

https://drive.google.com/file/d/1I5-45Mi...sp=sharing
That's an interesting hint concerning no crash with debug logging because I always have debug logging enabled. Can you disable debug logging and see if it starts to crash again?

The debug log indicates that your credentials are not correct. Maybe I should add a test button which allows to manually test if the entered credentials are correct or not.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
If I disable debug logging again, it does not crash. Seems like it only crashes before first enabling it.

Emby Server is saying that TestSystem is authenticated. I provided the Emby logs here.
Reply
My apologies. It does crash with debug logging. Steps
  • Media Providers
  • All Providers or Active Providers (no difference)
  • EmbyServer
  • Select Manual
  • Select User (TestSystem in my case).
Kodi Crashes immediately.


Logs Here
https://drive.google.com/file/d/1HVisq1J...sp=sharing

NB. It does not crash if the user is typed in. (Which I had started doing)
Reply
  • 1
  • 28
  • 29
  • 30(current)
  • 31
  • 32
  • 96

Logout Mark Read Team Forum Stats Members Help
Media importing and library integration (UPnP, Emby, Plex, ...)10