Roku Direct Publisher

Roku Direct Publisher - the easiest way to create a great TV experience. Learn more about how to create a Roku channel and share your experiences with others.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
phlume
Streaming Star

Re: Roku to sunset Direct Publisher early next year

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.

0 Kudos
37mediagroup
Roku Guru

Re: Roku to sunset Direct Publisher early next year

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.

0 Kudos
podworx
Streaming Star

Re: Roku to sunset Direct Publisher early next year

I have these files. . .it just doesn't work w/ my categories.

0 Kudos
podworx
Streaming Star

Re: Roku to sunset Direct Publisher early next year

@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.

0 Kudos
phlume
Streaming Star

Re: Roku to sunset Direct Publisher early next year

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.

0 Kudos
podworx
Streaming Star

Re: Roku to sunset Direct Publisher early next year

@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.

 

0 Kudos
phlume
Streaming Star

Re: Roku to sunset Direct Publisher early next year

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

 

0 Kudos
37mediagroup
Roku Guru

Re: Roku to sunset Direct Publisher early next year

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.

0 Kudos
phlume
Streaming Star

Re: Roku to sunset Direct Publisher early next year

This may be true, but it is entirely possible as our DP channel has categorized series. The question is... How can we accomplish it? 

0 Kudos
Baradanikto
Roku Guru

Re: Roku to sunset Direct Publisher early next year

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:

PXL_20230706_174422995.jpg

 

PXL_20230706_174450103.MP.jpg

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....

FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.