This is for informational purposes only!
WP Smart TV plugin and converting over to SDK Channel
I wanted to share that some of the users still trying to use The Smart TV Plugin for their SDK channel conversions!
A developer I know was trying to use and keep his WP Smart TV plugin and JSON Feed
https://mywplink.com/wp-json/tv/roku/
The SDK packages would not accept the WP Smart TV JSON Feed link!
He tried to find the actual JSON Feed file and the link or location of the JSON Feed file in the directory structure of his hosting account!
He wrote Rob at Rovidx
I heard back from the developer of the Smart TV WP plugin. Regarding an actual JSON file, there isn't one:
Hey Scott,
There is no JSON file. Everything is generated using the WordPress REST API using endpoints. Most of the examples I've seen would let you use your URL without specifying a file.
Rob
Nonetheless, Scott, I was able to create a way to let the code think there is an actual ".json" file.
By adding a redirect WordPress plugin and redirecting to a link for a JSON feed file name that doesn't really exist he was able to add a JSON File link to his SDK manifest to let his SDK Package template read the SDK!
An example would be if the WordPress link used for the JSON was:
https://mywplink.com/wp-json/tv/roku/
You would add a redirect plugin and redirect to a link like this:
https://mywplink.com/wp-json/tv/roku/feed.json
It was reported as working and Scott was able to keep using his WP Smart TV Plugin to manage his SDK Channel!
Nice work!
Hey, Joe.
Happy I was able to help. One thing. . .you got the redirect backwards.
The sdk requires the presence of the .json file. So the redirect works like this:
Send the sdk to:
This satisfies the sdk codes requirement for the correct extension (.json).
When that url request hits the WordPress site, the redirect sends it to the actual rest api url that ends in /tv/roku.
We're tricking the sdk into thinking it is reading a .json file when it's actually being redirected.
Tried to get this to work on my own Wordpress site, but all I got was this message when I would pull up the URL:
{"code":"rest_no_route","message":"No route was found matching the URL and request method.","data":{"status":404}}
I went from https://domain.com/fff/wp-json/tv/roku/
to
https://domain.com/fff/wp-json/tv/roku/sample.json
When I redirect to https://domain.com/fff/sample.json I get a 404 error.
Looks like you're doing this backwards.
If you're using the redirect plugin (I use 301 Redirects, btw), you want to do this:
Redirect FROM:
https://domain.com/roku.json (this file doesn't actually exist)
Redirect TO:
http://domain.com/wp-json/tv/roku/ (this is the actual REST API json feed)
The JSON feed file URL needs to end in a dot json = .json inside the SDK Template package!
WP Smart TV does not have an output URL as dot JSON = .json and it uses a URL like this: http://domain.com/wp-json/tv/roku/ so we use the redirect to rediret http://domain.com/wp-json/tv/roku.json to https://domain.com/roku/ so the SDK Package can see the JSON Feed file!
This has been tested and used by many WP Smart TV users converting to SDK and allowing them to still use the WP Smart TV Plugin!