WWBN / AVideo

Create Your Own Broadcast Network With AVideo Platform Open-Source. OAVP OVP
https://avideo.tube/AVideo_OpenSource
Other
1.89k stars 972 forks source link

[Idea] Multi-category Roku JSON #6986

Closed walt93 closed 2 years ago

walt93 commented 2 years ago

Is your feature request related to a problem? Please describe. Roku support is primitive. A quick fix increases usability exponentially. Seriously. I measured it. Off the chart. Yuge bang-for-buck factor.

Describe the solution you'd like A plugin "Roku Channels" that manages an array of channelName (string). The user adds a number of channel names here with something like a [+] add and [-] delete channels interface. We're going to sanitize the string to be URL friendly.

Per category, a checkbox "Roku". Categories that are checked appear in the multi-category Roku JSON. When the checkbox is on, there is a popup showing the list of channelNames from the Roku Channels plug-in.

Screen Shot 2022-08-10 at 12 46 59 PM

Accessing the URL of the form https://avideo.site/rokuChannelsJSON.php?id=channelName is where that channelName is consumed. So we can have multiple of these.

Somewhere there is a UI / button to push that hits this URL to generate the multi-category JSON.

The format for multiple categories in the Roku JSON is straightforward. All of the return values in the JSON are arrays. Put one category per each.

This lets you have multiple Roku channels, with multiple playlists per channel.

Describe alternatives you've considered I coded a solution in python which I am using for the moment. It would be righteous if it were implemented in the platform. Ninja level:🥷🥷🥷

See code:

import datetime
import json
import urllib.request
from urllib.request import urlopen, Request

def curlJsonDict(url):
        r = Request(url, headers={'User-Agent': 'Mozilla/5.0'})
        response = urlopen(r).read()
        values = json.loads(response)
        return values

# Read multiple channels

dds = curlJsonDict("https://conspyre.tv/roku.json?catName=death-of-the-deep-state")
print ("Death of the Deep State")

dsw = curlJsonDict('https://conspyre.tv/roku.json?catName=deep-state-war')
print("Deep State War")

devo = curlJsonDict('https://conspyre.tv/roku.json?catName=devolution')
print("Devolution")

durham = curlJsonDict('https://conspyre.tv/roku.json?catName=durham')
print("Durham")

ed = curlJsonDict('https://conspyre.tv/roku.json?catName=election-deception')
print("Election Deception")

ps = curlJsonDict('https://conspyre.tv/roku.json?catName=plandemic-scamdemic')
print("Plandemic Scamdemic")

pvds = curlJsonDict('https://conspyre.tv/roku.json?catName=putin-vs-the-deep-state')
print("Putin vs the Deep State")
pvds["categories"][0]["name"] = "Putin vs. the Deep State"

# Merge into one

print("Creating output.")
output = {}
output["providerName"] = "Conspyre: MrTruthBomb"
output["language"] = "en"
output["lastUpdated"] = datetime.datetime.now().isoformat()
print("Merging movies.")
output["movies"] = dds["movies"] + dsw["movies"] + devo["movies"] + durham["movies"] + ed["movies"] + ps["movies"] + pvds["movies"]
print("Merging Playlists.")
output["playlists"] = dds["playlists"] + dsw["playlists"] + devo["playlists"] + durham["playlists"] + ed["playlists"] + ps["playlists"] + pvds["playlists"]
print("Merging categories.")
output["categories"] = dds["categories"] + dsw["categories"] + devo["categories"] + durham["categories"] + ed["categories"] + ps["categories"] + pvds["categories"]

# Serialize and write

print("Serializing.")
json_object = json.dumps(output, indent=4)

print("Writing output.")
with open("mr-truth-bomb.json", "w") as outfile:
    outfile.write(json_object)

print("Fin.")
DanielnetoDotCom commented 2 years ago

Hi, sorry I am not understanding. is this an issue or it is an improvement?

walt93 commented 2 years ago

Improvement. I'm figuring out how to hack together a proper Roku channel from multiple categories.

Roku channels can support up to 15 categories, and can have up to 40 programs per category - I am learning these limitations the hard way through trial and error & from support on the Roku developer forums…

Current implementation emits one category named "all". We want to use the "up to 15 categories".

sipero commented 2 years ago

Actually ROKU channels can have up to 25 categories albeit inside there platform it states 15 this has never been updated inside the platform. The 40 videos per category limitation only applies to Direct Publisher channels and not those built with the SDK where there are no limits.

walt93 commented 2 years ago

Yes, I'm suffering with Direct Publisher now & just learned its 25. But Direct Publisher ingest is junk, it says things were ingested without errors & yet not all your media appears on the channel. We're looking into the custom channel route now, found a company that will lease you one @ ottfeed.com

sipero commented 2 years ago

I think they are quite expensive. I am paying a programmer around $600 one time fee to build a basic channel which I can then publish on both ROKU and Amazon Fire TV

walt93 commented 2 years ago

@sipero Is the programmer you're paying to do this available to build other channels?