Skip to content

Instantly share code, notes, and snippets.

@davidbe
Last active June 30, 2024 18:37
Show Gist options
  • Save davidbe/f9ba35d9d5a51c68c4ccf3c50b44e041 to your computer and use it in GitHub Desktop.
Save davidbe/f9ba35d9d5a51c68c4ccf3c50b44e041 to your computer and use it in GitHub Desktop.
Analysis for VtmGo addon for Kodi - 20240630

Analysis for VtmGo addon for Kodi - 20240630

As mentioned in comment https://gist.github.com/davidbe/4a09ebc002d4d61cc33f993d5b55f87a?permalink_comment_id=5106033#gistcomment-5106033 the json-response in the debug is limited to the first 1024 bytes. I just have put a print-statemant after the request and this is the result:

{
  "abroad": "False",
  "row": {
    "id": "a8b8e93d-6bb2-480a-8bb9-dc70968c6af4",
    "metaData": {
      "provider": "APP",
      "campaignId": "None"
    },
    "title": "Moet je nu zien",
    "rowType": "SWIMLANE_LANDSCAPE",
    "teasers": [
      {
        "title": "The Boss Baby 2: Family Business",
        "detailId": "47accde8-94b9-467f-8422-417574f51d2c",
        "imageUrl": "https://images1.persgroep.net/rcs/YkaNPBQlG7Wgf64AXvO_EjpVWoI/diocontent/245107923/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "De behandeling",
        "detailId": "da16c6ac-5323-4c47-8dd7-dc144d9ad16c",
        "imageUrl": "https://images3.persgroep.net/rcs/ySVqPfm7pr1ubuGm84x8XlrPhoM/diocontent/245077373/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Terminator 3: Rise of the Machines",
        "detailId": "819d39c9-07b7-4afd-84a0-b647a0619a3f",
        "imageUrl": "https://images4.persgroep.net/rcs/C8Bs9lKtCuw7joJHyJlkCMw2f7M/diocontent/244792292/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "De Acht Bergen",
        "detailId": "dfbbc2de-4ab0-47e9-9bcf-32b6bf0f5128",
        "imageUrl": "https://images0.persgroep.net/rcs/zzaLBBc_kC9PdvMxJb1bbsbCEqI/diocontent/233469289/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "https://lfvp-static-overlays.dpgmedia.net/3/242844599",
        "comingSoon": "None"
      },
      {
        "title": "Men in Black 3",
        "detailId": "614330c2-10e6-4084-b70f-7be37f2938e9",
        "imageUrl": "https://images1.persgroep.net/rcs/xsMJx4lAIlefWeTog0TdVi7yTEA/diocontent/245109704/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "De Smurfen",
        "detailId": "638a5ec5-f9f8-4611-a97b-7b857a11c33a",
        "imageUrl": "https://images4.persgroep.net/rcs/sbOS1duqFeO4cm1bPQKAIpzxGq4/diocontent/244961205/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Charlies Angels: Full Throttle",
        "detailId": "4f6d292a-02ca-4e3c-8be6-f6da8c326a36",
        "imageUrl": "https://images2.persgroep.net/rcs/HKSjNHtrK6BnV2gO1KJSu4zrKaA/diocontent/234732884/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Sex Tape",
        "detailId": "14dedf0e-cc28-46d9-881f-4dd2e3132f93",
        "imageUrl": "https://images0.persgroep.net/rcs/F0Dj_k1v6Nx3cqmrns_2q-NDVWE/diocontent/233179198/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Hulk",
        "detailId": "f64c6a1f-bb9d-4fcf-8847-61bc9d8ffdf5",
        "imageUrl": "https://images4.persgroep.net/rcs/qOfiz2bwaOxZwtSRUdi4qjfudbs/diocontent/244713036/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Paddington 2",
        "detailId": "38e7321f-1fb3-471a-a4f7-32c26145ad72",
        "imageUrl": "https://images2.persgroep.net/rcs/lGECGBKRVC6MgDK7KcLq3V1KSDI/diocontent/244825638/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Eat Pray Love",
        "detailId": "12182c4c-72b3-4efa-8519-8a9c03f0c020",
        "imageUrl": "https://images3.persgroep.net/rcs/_AH51sS3xLIYvKZNoX-GMz4IIEs/diocontent/245107381/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Looking Glass",
        "detailId": "b7939453-b651-4123-9de6-1f634e35bdbe",
        "imageUrl": "https://images3.persgroep.net/rcs/WhPzGva_RzdrhSBnhMlK5ERGypY/diocontent/245107300/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      }
    ],
    "brandingStyle": "None",
    "teaserStyle": "DEFAULT",
    "hasDetail": "True"
  },
  "referencedOverlays": [],
  "metaData": {
    "requestId": "e6ffab10-b331-4a57-ac86-534092af3c5b",
    "routingGroup": "None",
    "abGroup": "None"
  }
}

In vtmgo.py, in get_storefront_category a print statement has been added and there we see that it loops through the items in row > teasers. This is still valid. Printing item after the foreloop gives the correct items:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'The Boss Baby 2: Family Business', 'detailId': '47accde8-94b9-467f-8422-417574f51d2c', 'imageUrl': 'https://images1.persgroep.net/rcs/YkaNPBQlG7Wgf64AXvO_EjpVWoI/diocontent/245107923/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'De behandeling', 'detailId': 'da16c6ac-5323-4c47-8dd7-dc144d9ad16c', 'imageUrl': 'https://images3.persgroep.net/rcs/ySVqPfm7pr1ubuGm84x8XlrPhoM/diocontent/245077373/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Terminator 3: Rise of the Machines', 'detailId': '819d39c9-07b7-4afd-84a0-b647a0619a3f', 'imageUrl': 'https://images4.persgroep.net/rcs/C8Bs9lKtCuw7joJHyJlkCMw2f7M/diocontent/244792292/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'De Acht Bergen', 'detailId': 'dfbbc2de-4ab0-47e9-9bcf-32b6bf0f5128', 'imageUrl': 'https://images0.persgroep.net/rcs/zzaLBBc_kC9PdvMxJb1bbsbCEqI/diocontent/233469289/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': 'https://lfvp-static-overlays.dpgmedia.net/3/242844599', 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Men in Black 3', 'detailId': '614330c2-10e6-4084-b70f-7be37f2938e9', 'imageUrl': 'https://images1.persgroep.net/rcs/xsMJx4lAIlefWeTog0TdVi7yTEA/diocontent/245109704/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'De Smurfen', 'detailId': '638a5ec5-f9f8-4611-a97b-7b857a11c33a', 'imageUrl': 'https://images4.persgroep.net/rcs/sbOS1duqFeO4cm1bPQKAIpzxGq4/diocontent/244961205/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': "Charlie's Angels: Full Throttle", 'detailId': '4f6d292a-02ca-4e3c-8be6-f6da8c326a36', 'imageUrl': 'https://images2.persgroep.net/rcs/HKSjNHtrK6BnV2gO1KJSu4zrKaA/diocontent/234732884/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Sex Tape', 'detailId': '14dedf0e-cc28-46d9-881f-4dd2e3132f93', 'imageUrl': 'https://images0.persgroep.net/rcs/F0Dj_k1v6Nx3cqmrns_2q-NDVWE/diocontent/233179198/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Hulk', 'detailId': 'f64c6a1f-bb9d-4fcf-8847-61bc9d8ffdf5', 'imageUrl': 'https://images4.persgroep.net/rcs/qOfiz2bwaOxZwtSRUdi4qjfudbs/diocontent/244713036/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Paddington 2', 'detailId': '38e7321f-1fb3-471a-a4f7-32c26145ad72', 'imageUrl': 'https://images2.persgroep.net/rcs/lGECGBKRVC6MgDK7KcLq3V1KSDI/diocontent/244825638/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Eat Pray Love', 'detailId': '12182c4c-72b3-4efa-8519-8a9c03f0c020', 'imageUrl': 'https://images3.persgroep.net/rcs/_AH51sS3xLIYvKZNoX-GMz4IIEs/diocontent/245107381/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

2024-06-30 19:52:32.602 T:9010    debug <general>: {'title': 'Looking Glass', 'detailId': 'b7939453-b651-4123-9de6-1f634e35bdbe', 'imageUrl': 'https://images3.persgroep.net/rcs/WhPzGva_RzdrhSBnhMlK5ERGypY/diocontent/245107300/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8', 'overlayImageUrl': None, 'comingSoon': None}
2024-06-30 19:52:32.602 T:9010    debug <general>:

The problem is that this has been changed! There is no target nor type that is used in the same function:

            if item.get('target', {}).get('type') == CONTENT_TYPE_MOVIE:
                items.append(self._parse_movie_teaser(item))

            elif item.get('target', {}).get('type') == CONTENT_TYPE_PROGRAM:
                items.append(self._parse_program_teaser(item))

My example is from the movies part of VtmGo, is this the same from the non-movies part?

TV Shows / VTM GO / Nieuws & Actua gives:

{
  "abroad": "False",
  "row": {
    "id": "24eae059-b262-4f09-9f09-8a116ad883e7",
    "metaData": {
      "provider": "APP",
      "campaignId": "None"
    },
    "title": "Nieuws & Actua",
    "rowType": "SWIMLANE_LANDSCAPE",
    "teasers": [
      {
        "title": "Het Grote Debat",
        "detailId": "2f36b3f9-1f65-4547-a36c-a2a0c7020a4d",
        "imageUrl": "https://images3.persgroep.net/rcs/zUoBWYitj7CkEK5ALbpsdM8Xpk0/diocontent/244320616/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "VTM NIEUWS",
        "detailId": "3975934b-22a2-4b4d-a10c-e2727448a6fe",
        "imageUrl": "https://images2.persgroep.net/rcs/8yEczeS3sVLDtNrxlgJyT506aK4/diocontent/237810542/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Het Weer",
        "detailId": "0a21e006-b1c9-4367-b986-2de5337a02cb",
        "imageUrl": "https://images2.persgroep.net/rcs/rJLnCd7wEWNAtC40py8d1szYgh0/diocontent/238744456/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Telefacts",
        "detailId": "cd95dd45-27a3-45b9-9aec-5a99a6144074",
        "imageUrl": "https://images2.persgroep.net/rcs/aUATBqtM4XZkHys8EkIV8hkiqRA/diocontent/234930349/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Telefacts Zomer",
        "detailId": "2a95fb52-1793-4d5e-ae26-a641c9d8fb75",
        "imageUrl": "https://images2.persgroep.net/rcs/GR9sUgN8cf_-rea-MHVP5I6FTKY/diocontent/244985339/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "CATHéRINE",
        "detailId": "884f076c-f436-462e-b0c0-b8949bef2588",
        "imageUrl": "https://images0.persgroep.net/rcs/s7v1U6H24U1Batma2uyGpAnkcS8/diocontent/165273490/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      },
      {
        "title": "Telefacts NU",
        "detailId": "e6a61c1d-9b85-401c-ae2d-6194d5e229a9",
        "imageUrl": "https://images1.persgroep.net/rcs/oQptT7Z0WCGCzsb17Pr7BEpJLUE/diocontent/175583264/_fitwidth/426?appId=038a353bad43ac27fd436dc5419c256b&quality=0.8",
        "overlayImageUrl": "None",
        "comingSoon": "None"
      }
    ],
    "brandingStyle": "None",
    "teaserStyle": "DEFAULT",
    "hasDetail": "True"
  },
  "referencedOverlays": [],
  "metaData": {
    "requestId": "d79c6853-10e1-43e8-8a30-f5f3493f7f29",
    "routingGroup": "None",
    "abGroup": "None"
  }
}

Yes, it seems things have been simplified and more generic. Every item now has only:

  • title
  • detailId
  • imageUrl
  • overlayImageUrl
  • comingSoon

We cannot make any difference between movie / program (which is differently handled in the add-on). It is needed to rewrite some more code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment