I tried simply replacing "Series" and "Movies" with the appropriate categories I wanted, but it only works in some instances.
Example:
{ ...
"lastUpdated": "2023-01-18T17:00:00-05:00",
"language": "en",
"series": [
{...},
{...},
{...},
{...}
],
"movies": [
{...},
{...}
]
}
then becomes:
{ ...
"lastUpdated": "2023-01-18T17:00:00-05:00",
"language": "en",
"Sports": [
{...},
{...}
],
"Cooking": [
{...},
{...}
],
"Music": [
{...},
{...}
],
"News": [
{...},
{...}
]
}
When I load that into the RDP-to-Scenegraph template as a feed, it doesn't work. But it does display when I use it with other templates form the Master-template zip on GIT.
Did you update the Manifest file?
Step 2: Components/Content/RootHandler.brs file. In lines 100 and 111 in this file, there's a line "if item" which is followed by the numerous ContentTypes (movie, shortFormVideo etc). Replace these with your own custom Categories that you used in your Feed (comedy, sports, drama etc). Save it and re-zip it.
I have these files. . .it just doesn't work w/ my categories.
@37mediagroup I can't do this because I'm using a WordPress plugin to generate the JSON file.
You would think, given Roku DP asks if we're category-based, their SDK-based conversion would be able to manage this.
Are you using Vimeo as your video hosting site by chance? They generate the JSON feed as part of their "Showcase" feature. I'm not sure which level of service this is avialable for, but it may be worth a review.
Also of note, I have seen in some of the example channels available on the Roku GIT that they are submitting content via an RSS feed.. so that may be an alternative solution too. I know I'm pretty confused on the whole process, but the more I dig in and discuver, the more I feel confident tha tall of the puzzle pieces are there, we just need to put them together.
@phlume Not sure if you're asking me about vimeo. . .if so, no, we use AWS to host our videos and a WordPress plugin to generate the JSON file.
After further testing, I do see the custom categories for SINGLE VIDEOS does work, however, trying to label series with different categories seems to throw an error. In my JSON, I have a handful of "series" entries, and then a few entries as "Cornhole Series". Then I list single videos, or movies with the different category names such as "Sports" Cooking" etc.
The categorized series are getting displayed, and the Series entries are displayed and working correctly. However, upon clicking one of the posters to see the specially named cornhole series, it brings up a single "play" button, not episodes, or seasons, and doesn't actually play. Here is what I have in my RootHandler.brs file:
for each item in json
value = json[item]
if item = "series" or item = "Cornhole Series" or item = "Sports" or item = "News" or item = "Music" or item = "Cooking"
children = []
for each arrayItem in value
itemNode = CreateObject("roSGNode", "ContentNode")
Utils_ForceSetFields(itemNode, {
hdPosterUrl: arrayItem.thumbnail
Description: arrayItem.shortDescription
id: arrayItem.id
Categories: arrayItem["genres"][0]
title: arrayItem.title
})
if item = "Sports" or item = "News" or item = "Music" or item = "Cooking"
'if item = "movies" or item = "shortFormVideos" or item = "tvSpecials" or item = "liveFeeds"
' Add 4k option
'Never do like this, it' s better to check if all fields exist in json, but in sample we can skip this step
itemNode.Url = arrayItem.content.videos[0].url
end if
if item = "series" or item = "Cornhole Series"
seasonArray = []
if arrayItem.seasons <> invalid and arrayItem.seasons.Count() > 0
for each season in arrayItem.seasons
episodeArray = []
for each episode in season.episodes
episodeArray.Push(GetEpisodeNodeFromJSON(episode))
end for
seasonArray.Push(episodeArray)
end for
else
episodeArray = []
for each episode in arrayItem.episodes
episodeArray.Push(GetEpisodeNodeFromJSON(episode))
end for
seasonArray.Push(episodeArray)
end if
Utils_ForceSetFields(itemNode, { "seasons": seasonArray })
end if
children.Push(itemNode)
end for
I wouldn't change 'Series' to a custom category, just leave that as is. I'd venture there's some backend coding gone into the 'Series' element that gives it its unique features. If you changed it to something like 'Shows', you might lose all that.
This may be true, but it is entirely possible as our DP channel has categorized series. The question is... How can we accomplish it?
I thought I would share a project I am working on. I have been pouring over the SceneGraph tutorial code to develop a tool to convert Direct Publisher channels to SceneGraph. I have successfully built a SceneGraph channel that uses categories from a JSON feed file to build rows within the channel. This includes Series with Seasons and Episodes and Series with Episodes only. These images were taken from my test channel:
As you can see, the channel was designed to mimic the DP UI. And, each row is identified by the defined categories in the JSON feed file.
I'll be posting the 'tool' as a project on GitHub. More to follow....