• 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 96
WIP Media importing and library integration (UPnP, Emby, Plex, ...)
@Montellese 
Sorry, never got so far because my server isn't recognized and I thought there is no option for a manual input Smile
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
Small update
  •  Resume works properly on the same machine but it is not transmitted back to the server. The web client shows the old resume point. (Feels like you already knew that)
  • The dateadded seems to be different here. Recently added on Media Import is not showing the last items added. Actually it looks like all items has today's date for dateadded.
  • Tagging the items with the View/Library name works
  • Movies and Music Videos seem to sync ok. However, something has gone awry with tv shows. Episodes appears in the wrong show. (if desired i can attach databases from a media import sync and a Emby for Kodi sync)
Cheers

Edit: The tvshow is fine. It's the poster that is wrong in some cases. eg. The Putin Interviews has Mr Bean Animated Poster and Ku'Damn 56 has The Fix Podcast Poster. However, 60 minutes and DatelineSBS have their correct posters
Reply
(2019-10-20, 18:52)sualfred Wrote: @Montellese 
Sorry, never got so far because my server isn't recognized and I thought there is no option for a manual input Smile
There currently isn't but I've started working on it. It shouldn't be too difficult but there are a few edge cases that need to be covered. E.g. right now the whole system relies on the fact that a media provider is automatically detected and marked as active / inactive. For manually entered media providers this is not available so we either have to consider them as always active or we have to check periodically if they are still active / available 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
(2019-10-20, 22:17)LongMan Wrote: Small update
  •  Resume works properly on the same machine but it is not transmitted back to the server. The web client shows the old resume point. (Feels like you already knew that)
  • The dateadded seems to be different here. Recently added on Media Import is not showing the last items added. Actually it looks like all items has today's date for dateadded.
  • Tagging the items with the View/Library name works
  • Movies and Music Videos seem to sync ok. However, something has gone awry with tv shows. Episodes appears in the wrong show. (if desired i can attach databases from a media import sync and a Emby for Kodi sync)
Cheers

Edit: The tvshow is fine. It's the poster that is wrong in some cases. eg. The Putin Interviews has Mr Bean Animated Poster and Ku'Damn 56 has The Fix Podcast Poster. However, 60 minutes and DatelineSBS have their correct posters 
Thanks for the detailed feedback.
  • Yes I'm aware that synchronizing the resume point and watched status back to the Emby server is currently not working properly. I haven't figured out how to do this properly yet.
  • dateadded is always a difficult topic in Kodi. I'll take a closer look.
  • I've also noticed (also for movies) that sometimes retrieving the poster from Emby fails but then when syncing again it suddenly works. So something is still not right there in the add-on code.
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-10-18, 22:31)Montellese Wrote: The main thing I don't know how to get working is updating metadata on the Emby server from the add-on i.e. if the user has watched a movie from the Emby server in Kodi how to tell Emby that the item has been watched etc.
@sualfred
  • Can you or @angelblue05 shed some light on reporting to the server.
  • IIRC, Emby for Kodi was doing that until version 3 or 4. Why did the method used changed?
  • Is it still possible to do it this way? If not, how should playback be handled?

Cheers
Reply
(2019-10-21, 20:07)LongMan Wrote:
(2019-10-18, 22:31)Montellese Wrote: The main thing I don't know how to get working is updating metadata on the Emby server from the add-on i.e. if the user has watched a movie from the Emby server in Kodi how to tell Emby that the item has been watched etc.
@sualfred
  • Can you or @angelblue05 shed some light on reporting to the server.
  • IIRC, Emby for Kodi was doing that until version 3 or 4. Why did the method used changed?
  • Is it still possible to do it this way? If not, how should playback be handled?

Cheers 
I found the following thread in the Emby developer sub-forum https://emby.media/community/index.php?/...-position/ which is exactly what I used in the initial C++ implementation of the Emby media importer. I also found a "POST /Items/{ItemId}" endpoint which seems to allow changing any property of an item. But I didn't manage to get it to work properly yet.

Maybe I'll try my luck with
  • POST /Users/{UserId}/PlayedItems/{Id} for marking an item as watched
  • DELETE /Users/{UserId}/PlayedItems/{Id} for marking an item as unwatched
  • DELETE ​/Users​/{UserId}​/PlayingItems​/{Id} for setting the resume point of an item
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
Keeping my fingers crossed. I left a post asking about an API endpoint to do it since Luke mentioned it.
Reply
(2019-10-22, 00:53)LongMan Wrote: Keeping my fingers crossed. I left a post asking about an API endpoint to do it since Luke mentioned it.
Thanks. Since I don't have an account in the Emby forum here's what I want to be able to update on the server for a video item:
  • 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}
I've also come across https://github.com/MediaBrowser/Emby/wik...-Check-ins and maybe it would make sense to extend the Emby Media Importer add-on to support this playback tracking for imported media items. But it still doesn't cover the cases where a user manually marks items as watched / unwatched on the Kodi library without actually playing the item.
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'm curious. In the addon we use addon callbacks. onNotification is returning information for this case. Isn't is possible to "monitor" those notifications by core for your case, too?

Code:
sender xbmc - method: VideoLibrary.OnUpdate  - data: {"item":{"id":13,"type":"movie"},"playcount":1}
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
(2019-10-23, 06:49)sualfred Wrote: I'm curious. In the addon we use addon callbacks. onNotification is returning information for this case. Isn't is possible to "monitor" those notifications by core for your case, too?

Code:
sender xbmc - method: VideoLibrary.OnUpdate  - data: {"item":{"id":13,"type":"movie"},"playcount":1}
In theory yes but then every media importer add-on would have to decide on its own whether it is responsible for sending these updates back to a specific server. But there might be multiple add-ons installed which could do this so we make this decision in Kodi and explicitly tell a specific add-on to do it.

But this doesn't change the fact that we need to have specific API methods in Emby server to perform these actions independent of how the add-on becomes aware of an update.
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
@Montellese

From Luke,
I would not use /PlayingItems because that's used to report playback stopped. While it might work as a hack, there will inevitably be side effects, such as various things listening for these events.
 
It would probably be best for me to give you a new api, and then you would just have to check the server version to see if it's supported or not.
Reply
From Luke

"Yea what you're doing for watched/unwatched is fine because we already have that function. That's what the toggle in our apps use. When you mark watched, you can optionally provide the date along with it to indicate when it was watched.
 
So the only thing you're missing is the ability to explicitly set the playback position."
Reply
@LongMan thanks for your support and for talking to the Emby guy(s).

In the meantime I've been busy with implementing
  • the possibility to manually add / lookup a media provider by adding it's URL
  • the possibility to provide smaller changesets for imported items at runtime. For the Emby media importer add-on this means that it uses a websocket to listen to library updates / changes published by the Emby server and then pushes these updates to Kodi without having to perform a full synchronization.
These two features are working but there are two issues I need to solve before I can provide another test 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
Thanks for the update.
Reply
@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}
Reply
  • 1
  • 27
  • 28
  • 29(current)
  • 30
  • 31
  • 96

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