Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
mitchstein
Level 7

what am I doing wrong?

trying to setup a direct channel...

getting errors..

  • If categories are specified in the feed, they must contain at least one valid category.
    03/01/2017 10:35PM

  • No valid items were found in the feed

  • 1 item has an error: Thumbnail could not be downloaded.

here is my json file.

{"providerName": "TVByDemand Productions",
 "lastUpdated": "2017-03-01T21:37:37+00:00",
 "language": "en",
 "movies": [
   {
     "id": "1",
     "title": "The OutLaws Den 03-06-2015",
     "content": {
       "dateAdded": "2015-11-11T22:21:37+00:00",
       "videos": [
         {
           "url": "http://www.tvbydemand.com/media2/iis/old/2015-03-06/iis/finished.ism/manifest",
           "quality": "SD",
           "videoType": "SMOOTH"
         }
       ],
       "duration": 2408
     },
     "genres": [
       "sports",
       "special",
       "news"
     ],
     "thumbnail": "http://www.tvbydemand.com/old.jpg",
     "releaseDate": "2015-03-06",
     "shortDescription": "The OutLaws Den 03-06-2015 all the happenings in Loco Wrestling",
     "longDescription": "A series of TV shows started By the Outlaw Frankie G to inform the fans of what is going on in the world of DWF/Loco",
     "tags": [
       "amazing",
       "drama",
       "comedy",
       "pro wrestling"
     ]
   }
 ]
}

what am I doing wrong? I'm completely lost..
0 Kudos
12 Replies
mitchstein
Level 7

Re: what am I doing wrong?

fixed the thumbnail problem. But now stuck on categories.. says "Category 'drama' is missing either tags or a playlist"

here's my json:

{"providerName": "TVByDemand Productions",
  "lastUpdated": "2017-03-01T21:37:37+00:00",
  "language": "en",
  "movies": [
    {
      "id": "1",
      "title": "The OutLaws Den 03-06-2015",
      "content": {
        "dateAdded": "2015-11-11T22:21:37+00:00",
        "videos": [
          {
            "url": "http://www.tvbydemand.com/media2/iis/old/2015-03-06/iis/finished.ism/manifest",
            "quality": "SD",
            "videoType": "SMOOTH"
          }
        ],
        "duration": 2408
      },
      "genres": [
        "sports",
        "special",
        "news"
      ],
      "thumbnail": "http://www.tvbydemand.com/old.jpg",
      "releaseDate": "2015-03-06",
      "shortDescription": "The OutLaws Den 03-06-2015 all the happenings in Loco Wrestling",
      "longDescription": "A series of TV shows started By the Outlaw Frankie G to inform the fans of what is going on in the world of DWF/Loco",
      "tags": [
        "amazing",
        "drama",
        "comedy",
        "pro wrestling"
      ]
    }
  ]
}
0 Kudos
37mediagroup
Level 9

Re: what am I doing wrong?

By the looks of it, you don't have "Categories" listed in the json feed, right?  So I take it you are adding the Categories straight onto the Roku Checklist.  If so, when you Add a new Category, with it you'll need to select tags for it to inherit. Let's say you add a "Foreign" category. Well then you might want to give it tags like "Latin" "Mexico" "Asia" etc...
0 Kudos
mitchstein
Level 7

Re: what am I doing wrong?

I got past the tag issue, figured out what dumb thing I was doing...

And I'm almost there to add all videos. I had to strip any and all HTML, quotes and other special characters from my descriptions and limit them to under 500 characters. Convert my dates to the ISO standard and Now I'm just working out other issues I believe in the description, it says "The feed URL(s) could not be validated.
  • JSON (SyntaxError: Unexpected number in JSON at position 1180791)"

  • looking for that position is a real pain in the butt! But I'm keeping at it..

  • Does anyone know if there is a limit to the number of videos you can add to the feed, I have 1,679 that I'm trying to add to the json file.
  • 0 Kudos
    37mediagroup
    Level 9

    Re: what am I doing wrong?

    Try running it thru http://jsonlint.com.

    I dunno about total video limits. I wouldn't think there is but 1,600 is quite alot.
    0 Kudos
    belltown
    Level 7

    Re: what am I doing wrong?

    "mitchstein" wrote:
    JSON (SyntaxError: Unexpected number in JSON at position 1180791)"

    looking for that position is a real pain in the butt! But I'm keeping at it..


    Roku Direct Publisher is incredibly dumb when it comes to reporting errors. Here's a simple Python script you can run to determine which line and column the character position is referring to:

    import argparse

    parser = argparse.ArgumentParser(description='Find line/column from char position')
    parser.add_argument('inputFile', type=argparse.FileType('r'))
    parser.add_argument('charPos', type=int)
    args = parser.parse_args()

    lineCount = 0
    line = args.inputFile.readline()
    charCount = len(line)
    while line and charCount <= args.charPos:
       lineCount += 1
       line = args.inputFile.readline()
       charCount += len(line)

    if charCount <= args.charPos:
       print ('Character position does not occur in this file')
    else:
       print ('Character is on line {0} column {1}'.format(
               lineCount + 1, args.charPos - (charCount - len(line)) + 1))


    It should work using either Python 2 or 3. Run it specifying your JSON filename and character position, like so:


    $ python main.py 4tu28.json 132
    Character is on line 5 column 23
    https://github.com/belltown/
    0 Kudos
    mitchstein
    Level 7

    Re: what am I doing wrong?

    "Roku Direct Publisher is incredibly dumb when it comes to reporting errors. Here's a simple Python script you can run to determine which line and column the character position is referring to:"

    does the python script eliminate whitespaces (such as spaces) BUT not the ones within quotes in video names and descriptions? That was my problem. I'm not proficient in python enoth to know by looking at your script, I will try it out though once I get everything working because I would really like to have a readable json file for the future when I encounter more errors in like 5 years and have long forgotten everything I did to get this working, lol..

     I found an easy way by making my asp script eliminate them and the carriage returns by never creating them. Of course that made my json file IMPOSSIBLE to comprehend by mere mortals like myself.. lol

    Anyway by rewriting the script to make the json file as a single line unreadable for humans and using notepad++ with the json plugin I was able to jump right to the character.

    for future developers, that may be a great tool, also, I had to filter out all html (like <b> <br> <font> etc etc) that I used to use in my database when I was a web site only.. Seems the new roku player also hiccups on other ascii codes such as trademark and copyright.. so I filtered out all ascii chr$ 0-32, 34 (cause it doesn't like quotes in the descriptions) and everything above 122 (just in case, there were some french e's in some of the descriptions..

    Now I having issues with it telling me 772 videos have bad video file paths, yet all the ones it listed work in my private player with the same exact paths.. for instance

    http://www.tvbydemand.com/media3/iis/dr ... iscovering Fossils A Tony Angelo Film/finished.ism/manifest
    when I put that in vlc player it plays the video, and I checked my roku private channel's xml file and it lists the exact same path and plays the video.. SO I'm at a lost on that one, but thats probably an issue for another thread... So... I'm gonna fix my 1000+ thumbnail sizes to the 800x450 and get my categories setup then figure out why those videos do not work..

    The reason I asked about the possible limit to the number of videos on a channel is because I am tossing 2461 videos to the json file, but roku is only saying that there are like 1600 or so, and it gives the same number everytime I remake the json file.. And I get no errors in the two json verifyers they provide links to..

    I'm gonna search for a sample of the categories format for the json file, the wiki is extremely confusing, it would be easier to have a working sample and then an indexed link to the parts that can be changed but have to follow a pattern or can only be certain words.. And I would suggest allowing us more then 15 categories. I have over 35 on my website and about 20 on my private roku channels.. and sub cats would be nice too, for instance, I have a category Professional wrestling, then sub cats of Loco Wressing, RQW, Top Rope Wrestling, Devastation Wrestling and Memphis Wrestling.. that way memphis wrestling fans do not hve to sort through Loco wrestling stuff and vice versa.. And Music videos are broken down by band name into sub cats as well as studio perfromances, live performance covers and such as that.. TV Series and then the series name..

    just a suggestion, it was in no way intended to tick anyone off, criticize anyone or complain about anything I am happy the way things are and that Roku made things this much easier for serious production companies to get exposure and hopefully PAID for thier content.. (need that disclaimer so people don't get urked nowadays..)
    0 Kudos
    mitchstein
    Level 7

    Re: what am I doing wrong?

    Just also figured out that the new player can not have spaces in the video path they have to be replaced with %20..
    back to scripting a new json file!!
    0 Kudos
    belltown
    Level 7

    Re: what am I doing wrong?

    "mitchstein" wrote:
    does the python script eliminate whitespaces (such as spaces) BUT not the ones within quotes in video names and descriptions? That was my problem. I'm not proficient in python enoth to know by looking at your script, I will try it out though once I get everything working because I would really like to have a readable json file for the future when I encounter more errors in like 5 years and have long forgotten everything I did to get this working, lol..

    It counts characters the same way the Roku Direct Publisher portal does when reporting an error -- any character is counted (spaces, newlines, etc.) The script does convert DP's zero-based character number to a one-based line number and column number, which is consistent with the way most text editors operate.
    https://github.com/belltown/
    0 Kudos
    mitchstein
    Level 7

    Re: what am I doing wrong?

    "belltown" wrote:
    "mitchstein" wrote:
    does the python script eliminate whitespaces (such as spaces) BUT not the ones within quotes in video names and descriptions? That was my problem. I'm not proficient in python enoth to know by looking at your script, I will try it out though once I get everything working because I would really like to have a readable json file for the future when I encounter more errors in like 5 years and have long forgotten everything I did to get this working, lol..

    It counts characters the same way the Roku Direct Publisher portal does when reporting an error -- any character is counted (spaces, newlines, etc.) The script does convert DP's zero-based character number to a one-based line number and column number, which is consistent with the way most text editors operate.

    There should be a developers share site setup, where developers can share code like this and other utilities that will help each other out.. I tried it out and it works perfectly! Thanks!! I gotta update my programing language skills, I'm still doing everything in classic ASP and powershell... python is one of the languages I really wanna get up to date on, seems it can do alot more then anything else microsoft offers and is built into the IIS server now as well as most linux os's.. Welp once I get the Roku channel up, then I guess python and kodi should be next..
    0 Kudos