~vanvugt/ubuntu/oneiric/mediatomb/fix-770964-784431

« back to all changes in this revision

Viewing changes to src/upnp_cds_actions.cc

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2009-04-22 21:39:19 UTC
  • mto: (4.2.1 sid)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090422213919-52m015y6gcpv1m1g
Tags: upstream-0.12.0~svn2018
ImportĀ upstreamĀ versionĀ 0.12.0~svn2018

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
8
8
                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
9
9
    
10
 
    Copyright (C) 2006-2008 Gena Batyan <bgeradz@mediatomb.cc>,
 
10
    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
11
11
                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
12
12
                            Leonhard Wimmer <leo@mediatomb.cc>
13
13
    
24
24
    version 2 along with MediaTomb; if not, write to the Free Software
25
25
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
26
26
    
27
 
    $Id: upnp_cds_actions.cc 1709 2008-03-01 15:35:51Z lww $
 
27
    $Id: upnp_cds_actions.cc 2010 2009-01-11 19:10:43Z lww $
28
28
*/
29
29
 
30
30
/// \file upnp_cds_actions.cc
103
103
                            _(XML_DC_NAMESPACE));
104
104
    didl_lite->setAttribute(_(XML_UPNP_NAMESPACE_ATTR), 
105
105
                            _(XML_UPNP_NAMESPACE));
106
 
    
 
106
 
 
107
    Ref<ConfigManager> cfg = ConfigManager::getInstance();
 
108
 
107
109
    for(int i = 0; i < arr->size(); i++)
108
110
    {
109
111
        Ref<CdsObject> obj = arr->get(i);
 
112
        if (cfg->getBoolOption(CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_ENABLED) &&
 
113
            obj->getFlag(OBJECT_FLAG_PLAYED))
 
114
        {
 
115
            String title = obj->getTitle();
 
116
            if (cfg->getBoolOption(CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING_MODE_PREPEND))
 
117
                title = cfg->getOption(CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING) + title;
 
118
            else
 
119
                title = title + cfg->getOption(CFG_SERVER_EXTOPTS_MARK_PLAYED_ITEMS_STRING);
 
120
 
 
121
            obj->setTitle(title);
 
122
        }
 
123
 
110
124
        Ref<Element> didl_object = UpnpXML_DIDLRenderObject(obj, false, stringLimit);
111
125
 
112
126
        didl_lite->appendElementChild(didl_object);