Skip to content

Commit

Permalink
Revert "default the attribut creator with media artist of smapi item"
Browse files Browse the repository at this point in the history
This reverts commit 640be24.
  • Loading branch information
janbar committed Jul 22, 2017
1 parent 1fb83ba commit e946112
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions noson/src/smapimetadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ SMAPIItemList SMAPIMetadata::GetItems()
// no browsable
data.item.reset(new DigitalItem(DigitalItem::Type_item, DigitalItem::SubType_unknown));

std::string tmp; // a temporary string
switch (data.item->subType())
{
// container
Expand All @@ -186,14 +185,8 @@ SMAPIItemList SMAPIMetadata::GetItems()
case DigitalItem::SubType_album:
data.item->SetProperty(DIDL_QNAME_DC "title", media.GetAttribut("title"));
data.item->SetProperty(DIDL_QNAME_UPNP "albumArtURI", media.GetAttribut("albumArtURI"));
tmp = media.GetAttribut("author");
if (!tmp.empty())
{
data.item->SetProperty(DIDL_QNAME_DC "creator", tmp);
data.item->SetProperty(DIDL_QNAME_DC "contributor", media.GetAttribut("artist"));
}
else
data.item->SetProperty(DIDL_QNAME_DC "creator", media.GetAttribut("artist"));
data.item->SetProperty(DIDL_QNAME_DC "creator", media.GetAttribut("author"));
data.item->SetProperty(DIDL_QNAME_DC "contributor", media.GetAttribut("artist"));
break;
case DigitalItem::SubType_genre:
data.item->SetProperty(DIDL_QNAME_DC "title", media.GetAttribut("title"));
Expand All @@ -209,14 +202,8 @@ SMAPIItemList SMAPIMetadata::GetItems()
if (itemType == track)
{
data.item->SetProperty(DIDL_QNAME_UPNP "albumArtURI", media.GetAttribut("albumArtURI"));
tmp = media.GetAttribut("composer");
if (!tmp.empty())
{
data.item->SetProperty(DIDL_QNAME_DC "creator", tmp);
data.item->SetProperty(DIDL_QNAME_DC "contributor", media.GetAttribut("artist"));
}
else
data.item->SetProperty(DIDL_QNAME_DC "creator", media.GetAttribut("artist"));
data.item->SetProperty(DIDL_QNAME_DC "creator", media.GetAttribut("composer"));
data.item->SetProperty(DIDL_QNAME_DC "contributor", media.GetAttribut("artist"));
data.item->SetProperty(DIDL_QNAME_UPNP "album", media.GetAttribut("album"));
data.item->SetProperty(DIDL_QNAME_UPNP "originalTrackNumber", media.GetAttribut("trackNumber"));
}
Expand Down

0 comments on commit e946112

Please sign in to comment.