Hi there,
I'm currently trying to write a channel for AnimeFTW. AnimeFTW has REST services that will return all the meta data for the videos. I have it working to the point where I want to play the video but I keep getting a "No service found for URL" error when I set the url property on either a VideoClipObject or an EpsiodeObject
My basic structure is that I have a method that shows a list of episodes for a particular series as per the EpisodeMenu method below:
############################################################################# @route(PREFIX + '/episodes') def EpisodeMenu(token, seriesId, seriesTitle, seriesArt = ""):Log("token: " + token + "; id: " + seriesId + "; seriesTitle: " + seriesTitle + "; seriesArt: " + seriesArt) # Create list of shows available to be viewed oc = ObjectContainer() oc.title1 = seriesTitle oc.add(EpisodeObject( key=Callback(DisplayEpisode, token=token, episodeId="6785", seriesTitle=seriesTitle, seriesArt=seriesArt), rating_key="animeftw-6785", title="episode 1", thumb="https://d206m0dw9i4jjv.cloudfront.net/video-images/eyes_1_screen.jpeg", art=seriesArt )) oc.add(EpisodeObject( key=Callback(DisplayEpisode, token=token, episodeId="6786", seriesTitle=seriesTitle, seriesArt=seriesArt), rating_key="animeftw-6786", title="episode 2", thumb="https://d206m0dw9i4jjv.cloudfront.net/video-images/eyes_2_screen.jpeg", art=seriesArt )) return oc
At this point my plugin will show a list of two episodes. I have code to dynamically create this list but I have it commented out at the moment while I play.
The callback DisplayEpisode is currently set up to return a VideoClipObject as follows:
@route(PREFIX + '/episode') def DisplayEpisode(token, episodeId, seriesTitle, seriesArt = ""):Log("token: " + token + "; id: " + episodeId + "; seriesTitle: " + seriesTitle + "; seriesArt: " + seriesArt) json_url = BASEURL + "action=display-single-episode&token=" + token + "&id=" + episodeId episode = JSON.ObjectFromURL(json_url) Log(episode) return VideoClipObject( url=episode["video"], title=episode["epname"], thumb=episode["image"] )
In this case the url is being set to a mkv file, something like "http://videos.animeftw.tv/11eyes/eyes_1_ns.mkv"
When I try to browse the plugin, and play an episode, I get the following error in my log file:
DEBUG (services:602) - No service found for URL 'http://videos.animeftw.tv/11eyes/eyes_1_ns.mkv'
I've tried different combinations like adding the VideoClipObject to a ObjectContainer and returning the ObjectContainer. I've tried using an EpisodeObject instead of a VideoClipObject, returning it directly or adding it to a ObjectContainer
My understanding is that if you are returning a VideoClipObject, then you don't need to define a service but I'm not so sure now.
Does anyone have any insight?
Thanks
Ben