"renojim" wrote:
How's that saying go? Warning - there be dragons. I think the only changes were to dataModel.brs.
yep :). I took more time to figure out what to change in datamodel.brs. It needs server support as well.
My fork :
https://github.com/raghu1111/roku_media_server patch :
diff --git a/client/source/datamodel.brs b/client/source/datamodel.brs
index a270c84..6ec177b 100644
--- a/client/source/datamodel.brs
+++ b/client/source/datamodel.brs
@@ -266,7 +266,8 @@ Function itemGetPlayable()
sf = m.GetStreamFormat()
ct = m.GetContentType()
return { Url: m.GetMedia(), ContentType: ct, Title: m.GetTitle(), StreamFormat: sf,
- Length: m.GetLength(), Artist: m.GetArtist(), Album: m.GetAlbum(), ReleaseDate: m.GetDate()}
+ Length: m.GetLength(), Artist: m.GetArtist(), Album: m.GetAlbum(),
+ ReleaseDate: m.GetDate(), SDBifUrl: m.xml.SDBifUrl.GetText() }
End Function
Function itemGetPosterItem()
diff --git a/server/mymedia.py b/server/mymedia.py
index e943c88..3e3191c 100644
--- a/server/mymedia.py
+++ b/server/mymedia.py
@@ -66,7 +66,7 @@ class PublishMixin:
class RSSImageItem(PublishMixin, RSSItem):
"extending rss items to support our extended tags"
def __init__(self, **kwargs):
- self.TAGS = ('image', 'filetype', 'tracknum', 'ContentType', 'StreamFormat', 'playtime', 'album', 'bitrate', 'release_date', 'SubtitleUrl')
+ self.TAGS = ('image', 'filetype', 'tracknum', 'ContentType', 'StreamFormat', 'playtime', 'album', 'bitrate', 'release_date', 'SubtitleUrl', 'SDBifUrl')
self.set_variables(kwargs)
RSSItem.__init__(self, **kwargs)
@@ -151,12 +151,15 @@ def call_protected(f, default):
return v
def with_srt(fname, linker, addl):
- "update the addl with an srt tag if that file is available"
+ "update the addl with an srt tag if that file is available. also add bif url"
basepath = os.path.splitext(fname)[0]
srtname = basepath + ".srt"
if os.path.exists(srtname):
addl['SubtitleUrl'] = linker(srtname)
+ bifname = basepath + ".bif"
+ if os.path.exists(bifname):
+ addl['SDBifUrl'] = linker(bifname)
return addl
def file2item(key, fname, base_dir, config, image=None):
@@ -842,7 +845,8 @@ class MediaHandler:
mimetype = ext2mime(ext)
if not mimetype:
logging.debug("couldn't determine mimetype for %s" % name)
- return
+ #return
+ mimetype="application/octet-stream"
logging.debug("guessing mimetype of %s for %s. filesize is %d" % (mimetype, name, size))