Skip to content

Commit

Permalink
Use DemJSON to encode mediainfo object so we have more control how en…
Browse files Browse the repository at this point in the history
…coding is done.

Also do a new release.
  • Loading branch information
ReallyFuzzy committed Nov 6, 2012
1 parent 1a0a71a commit c52a438
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# Non-standard imports.
import Parsing

import demjson

from MetaProviders import DBProvider, MediaInfo
from RecentItems import BrowsedItems, ViewedItems
from Favourites import FavouriteItems
Expand All @@ -23,8 +25,9 @@
VIDEO_PREFIX = "/video/lmwt"
NAME = L('Title')

VERSION = "12.10.26.1"
VERSION = "12.11.06.1"
VERSION_URLS = {
"12.11.06.1": "http://bit.ly/Vy4Wfb",
"12.10.26.1": "http://bit.ly/PUBAWJ",
"12.10.22.1": "http://bit.ly/R7ZieU",
"12.10.16.2": "http://bit.ly/R7ZieU",
Expand Down Expand Up @@ -1014,7 +1017,7 @@ def SourcesMenu(mediainfo=None, url=None, item_name=None, path=[], parent_name=N
browsedItems = cerealizer.loads(Data.Load(BROWSED_ITEMS_KEY))
else:
browsedItems = BrowsedItems()

browsedItems.add(mediainfo2, providerURLs, path)
Data.Save(BROWSED_ITEMS_KEY, cerealizer.dumps(browsedItems))

Expand Down Expand Up @@ -1841,7 +1844,7 @@ def MediaInfoLookup(url):
return ""

# Return the media info that was stored in the recently browsed item.
return JSON.StringFromObject(info[0])
return demjson.encode(info[0])

@route('/video/lmwt/playback/{url}')
def PlaybackStarted(url):
Expand Down

0 comments on commit c52a438

Please sign in to comment.