Hi guys, I'm trying to develop a plugin using the TWiT plugin as a template.
Basically I'm going to be streaming video the same way as the TWiT app does (the Watch Live), and have deleted all the references to the pre-recorded shows, which leaves just the Watch Live button.
However, I'd like it so that as opposed to the following routine to watch the actual video:
1. Go to Plex Main Screen
2. Select Channels
3. Select TWiT.tv Channel
4. Select Watch TWiT Live
5. Click Watch TWiT Live button
6. Video streams
I'd like it to be able to skip 4 and 5
So ideally it would be:
1. Go to Plex Main Screen
2. Select Channels
3. Select TWiT.tv Channel
4. Video streams
Here's the code I've managed to get it down to thus far:
SHOWS_XML = "http://static.twit.tv/ShiftKeySoftware/rssFeeds.plist"
ITUNES_NAMESPACE = {'itunes':'http://www.itunes.com/dtds/podcast-1.0.dtd'}COVER_URL = "http://leoville.tv/podcasts/coverart/%s600%s.jpg"LIVE_URLS = {'BitGravity 400 Kbps': 'http://twit.live-s.cdn.bitgravity.com/cdn-live-s1/_definst_/twit/live/low/playlist.m3u8''BitGravity 1 Mbps': 'http://twit.live-s.cdn.bitgravity.com/cdn-live-s1/_definst_/twit/live/high/playlist.m3u8''Justin.tv': 'http://usher.justin.tv/stream/multi_playlist/twit.m3u8'}HLS_COMPAT = ('iOS', 'Android', 'Roku', 'Safari', 'MacOSX', 'Windows', 'Plex Home Theater')####################################################################################################def Start():ObjectContainer.title1 = "TWiT.TV"HTTP.CacheTime = CACHE_1HOUR####################################################################################################@handler('/video/twittv', "TWiT.TV")def MainMenu():oc = ObjectContainer(no_cache=True)# Add TWiT Live entryif Client.Platform in HLS_COMPAT:oc.add(LiveStream(hls_provider=Prefs['hls_provider']))return oc####################################################################################################def LiveStream(hls_provider='Ustream', include_container=False):vco = VideoClipObject(key = Callback(LiveStream, hls_provider=hls_provider, include_container=True),rating_key = LIVE_URLS[hls_provider],title = 'Watch TWiT Live',thumb = R('icon-twitlive.png'),items = [MediaObject(video_resolution = 'sd',parts = [PartObject(key=HTTPLiveStreamURL(LIVE_URLS[hls_provider]))])])if include_container:return ObjectContainer(objects=[vco])else:return vco
Any suggestions on what to delete?
Thanks in advanced for any help!