Jump to content

Webhooks Favourite


kevinnashuk

Recommended Posts

kevinnashuk

It would be helpful to know if a user has Added or Removed from favourites

Could the remove from favourites event be item.unrate? Rather than both being item.rate?

image.png.6801bc4900854541876cfee7a50688f2.png

Thanks 

Link to comment
Share on other sites

  • 2 weeks later...

Hi, have you written code in your webhook receiving server to parse the data? You can get the favorite status from that.

Link to comment
Share on other sites

kevinnashuk

I Have written the code, but I can't see a property in the JSON than relates to the favourite status

Here is the RAW JSON I receive from the Webhook

{

  "Title": "item.rate",

  "Date": "2023-02-23T12:35:25.4194503Z",

  "Event": "item.rate",

  "User": {

    "Name": "Kevin",

    "Id": "*********"

  },

  "Item": {

    "Name": "Superbad",

    "ServerId": "********",

    "Id": "30349",

    "DateCreated": "2023-01-22T18:08:54Z",

    "Container": "mp4",

    "SortName": "Superbad",

    "PremiereDate": "2007-03-20T00:00:00Z",

    "ExternalUrls": [

      {

        "Name": "IMDb",

        "Url": "https://www.imdb.com/title/tt0829482"

      },

      {

        "Name": "TheMovieDb",

        "Url": "https://www.themoviedb.org/movie/8363"

      },

      {

        "Name": "Trakt",

        "Url": "https://trakt.tv/search/tmdb/8363?id_type=movie"

      }

    ],

    "Path": "\\\\*******\\Films\\Superbad.mp4",

    "Overview": "Two co-dependent high school seniors are forced to deal with separation anxiety after their plan to stage a booze-soaked party goes awry.",

    "Taglines": [

      "Come and get some!"

    ],

    "Genres": [

      "Comedy"

    ],

    "CommunityRating": 7.6,

    "RunTimeTicks": 65095200000,

    "Size": 3556753456,

    "FileName": "Superbad.mp4",

    "Bitrate": 4371140,

    "PlayAccess": "Full",

    "ProductionYear": 2007,

    "IndexNumber": 0,

    "ParentIndexNumber": 0,

    "RemoteTrailers": [

      {

        "Url": "https://www.youtube.com/watch?v=4eaZ_48ZYog"

      },

      {

        "Url": "https://www.youtube.com/watch?v=zFjaJbihWwc"

      }

    ],

    "ProviderIds": {

      "Tvdb": null,

      "Imdb": "tt0829482"

    },

    "IsFolder": false,

    "ParentId": "30286",

    "Type": "Movie",

    "Studios": [

      {

        "Name": "Columbia Pictures",

        "Id": 30971

      },

      {

        "Name": "Apatow Productions",

        "Id": 32919

      }

    ],

    "GenreItems": [

      {

        "Name": "Comedy",

        "Id": 154

      }

    ],

    "TagItems": [],

    "ParentLogoItemId": null,

    "ParentBackdropItemId": null,

    "ParentBackdropImageTags": null,

    "SeriesName": null,

    "SeriesId": null,

    "SeasonId": null,

    "PrimaryImageAspectRatio": 0.66666666666666663,

    "SeriesPrimaryImageTag": null,

    "SeasonName": null,

    "ImageTags": {

      "Primary": "2d8983c75cc1bb4e97bfd59fd60ba5dd"

    },

    "BackdropImageTags": [

      "34c83f4ae42eb9778e8bbb76d0860daa"

    ],

    "ParentLogoImageTag": null,

    "MediaType": "Video",

    "Width": 720,

    "Height": 404

  },

  "Server": {

    "Name": "******",

    "Id": "********",

    "Version": "4.7.11.0"

  },

  "Session": null,

  "PlaybackInfo": null

}

Link to comment
Share on other sites

  • 9 months later...
13 hours ago, Kerenon said:

Just ran into the same wall during my migration from plex to emby. I guess item.userdata is still missing?

Hi @Kerenonyou may want to try the 4.8 beta server as notifications (including webhooks) have been completely revamped. If you're able to, please let us know if it has the data that you need. Thanks.

Link to comment
Share on other sites

Hi @Luke, thanks for the tip. I've actually had to revert to the stable release because of a regression(?) that made the whole server completely unresponsive, so I didn't got to actually try if the webhook contains anything new. I've already worked around the missing data, so for now I'm fine using the stable release.

I'm new around these parts, so I'm not sure of the proper place to report beta release bugs. Short version: after upgrading to beta the problem described in this thread turns into "the whole server goes unresponsive after I press play or shuffle in a music collection and stays that way for a looong time ". I was scrambling to get the server back online, and forgot to get the logs but I do intend to recreate the server, get them and make a proper bug report.

Link to comment
Share on other sites

GrimReaper
6 minutes ago, Kerenon said:

I'm new around these parts, so I'm not sure of the proper place to report beta release bugs.

Hi there. You can report any beta-related issues under Testing Area forum, appropriate section (server/apps). 

https://emby.media/community/index.php?/forum/101-testing-area/

Even if you post it elsewhere, an Admin or a Mod will likely move it as required, when/if seen. 

 

Edited by GrimReaper
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...