coherence.backends.appletrailers_storage (module)¶
AppleTrailersStore¶
This is a Media Backend that allows you to access the Trailers from Apple.com.
Example to run from python script:
from coherence.base import Coherence
from twisted.internet import reactor
coherence = Coherence(
{'logmode': 'info',
'plugin': {'backend': 'AppleTrailersStore',
'name': 'Cohen3 AppleTrailersStore',
'proxy': 'no',
},
}
)
reactor.run()
Example to run from console:
cohen3 --plugin=backend:AppleTrailersStore,proxy:no
Note
you need the cohen 3 package installed to run the plugin from a console.
Changed in version 0.8.3: The Container class has been removed
-
class
AppleTrailerProxy(uri)[source]¶ Bases:
coherence.upnp.core.utils.ReverseProxyUriResourceTha AppleTrailerProxy ia a Resource that takes care to render the result gotten from our server
AppleTrailersStoreWarning
The ReverseProxyUriResource is not able to handle https requests, so… better stick to non proxy until properly handled.
-
class
Trailer(parent_id, item_id, urlbase, **kwargs)[source]¶ Bases:
coherence.backends.models.items.BackendVideoItemA backend item object which represents an Apple Trailer. This class will hold all information regarding the trailer.
Changed in version 0.8.3: Refactored using the class
BackendVideoItem-
is_proxy= False¶
-
proxy_cls¶ alias of
AppleTrailerProxy
-
mimetype= 'video/quicktime'¶
-
-
class
AppleTrailersStore(server, *args, **kwargs)[source]¶ Bases:
coherence.backends.models.stores.BackendVideoStoreThe media server for Apple Trailers.
Changed in version 0.8.3: Refactored using the class
BackendVideoStore-
logCategory= 'apple_trailers'¶
-
implements= ['MediaServer']¶
-
upnp_protocols= ['http-get:*:video/quicktime:*', 'http-get:*:video/mp4:*']¶
-
root_url= b'http://www.apple.com/trailers/home/xml/current.xml'¶
-
root_find_items= './movieinfo'¶
-
root_id= 0¶
-
item_type= 'http-get:*:video/quicktime:*'¶
-