Home | Trees | Indices | Help |
---|
|
1 # -*- coding: utf-8 -*- 2 # Elisa - Home multimedia server 3 # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 4 # All rights reserved. 5 # 6 # This file is available under one of two license agreements. 7 # 8 # This file is licensed under the GPL version 3. 9 # See "LICENSE.GPL" in the root of this distribution including a special 10 # exception to use Elisa with Fluendo's plugins. 11 # 12 # The GPL part of Elisa is also available under a commercial licensing 13 # agreement from Fluendo. 14 # See "LICENSE.Elisa" in the root directory of this distribution package 15 # for details on that license. 16 17 """ 18 MediaProvider that can access to Elisa's media db 19 """ 20 21 22 __maintainer__ = 'Lionel Martin <lionel@fluendo.com>' 23 24 from elisa.base_components.media_provider import MediaProvider 25 from elisa.core.media_uri import MediaUri 26 from elisa.core import common 27 from elisa.core.utils import deferred_action 28 29 from twisted.internet import defer, threads 30 3133 """ 34 This class implements elisa metadata-like fs support 35 """ 36 40 43 46 48 # ElisaMedia always deal with virtual directories 49 return { 'file_type' : 'directory', 'mime_type' : '' }50 53 5456 return self._def_action.insert_action(0, self._blocking_has_children_with_types, uri, media_types)5759 if 'directory' in media_types or 'audio' in media_types: 60 db = common.application.media_manager.media_db 61 return db.has_children(uri) 62 63 return False6466 db = common.application.media_manager.media_db 67 list_of_children = db.get_uris_by_meta_uri(uri, children_with_info) 68 return children_with_info69 7072 return self._def_action.insert_action(0, self._blocking_get_direct_children, 73 uri, children_with_info)74 75 78 82 85
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:11:04 2008 | http://epydoc.sourceforge.net |