Permalink
Browse files

changed: renamed UUID to ID. we now accept any string as an identifier,

choose wisely..

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28348 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 5e9f9b8 commit 7411555f4637a29b2ea54d84e7f8d63393074d20 alcoheca committed Mar 3, 2010
Showing with 126 additions and 118 deletions.
  1. +1 −1 addons/libraries/scrapers/AllMusic/description.xml
  2. +1 −1 addons/libraries/scrapers/DTrailer/description.xml
  3. +1 −1 addons/libraries/scrapers/Discogs/description.xml
  4. +1 −1 addons/libraries/scrapers/HTBackDrops/description.xml
  5. +1 −1 addons/libraries/scrapers/IMDB/description.xml
  6. +1 −1 addons/libraries/scrapers/IMPA/description.xml
  7. +1 −1 addons/libraries/scrapers/LastFM/description.xml
  8. +1 −1 addons/libraries/scrapers/MoviePosterDB/description.xml
  9. +1 −1 addons/libraries/scrapers/TMDB/description.xml
  10. +1 −1 addons/scrapers/AllMusic/description.xml
  11. +1 −1 addons/scrapers/AmazonUK/description.xml
  12. +1 −1 addons/scrapers/IMDB/description.xml
  13. +1 −1 addons/scrapers/LastFM/description.xml
  14. +1 −1 addons/scrapers/YahooMusic/description.xml
  15. +1 −1 addons/screensavers/Euphoria/description.xml
  16. +1 −1 addons/screensavers/Plasma/description.xml
  17. +1 −1 addons/screensavers/Solarwinds/description.xml
  18. +1 −1 addons/visualizations/DXSpectrum/description.xml
  19. +1 −1 addons/visualizations/GLSpectrum/description.xml
  20. +1 −1 addons/visualizations/ProjectM/description.xml
  21. +1 −1 addons/visualizations/Waveform/description.xml
  22. +1 −1 addons/visualizations/iTunes/description.xml
  23. +4 −4 guilib/GUIInfoTypes.cpp
  24. +1 −1 guilib/GUIInfoTypes.h
  25. +1 −1 xbmc/FileSystem/AddonsDirectory.cpp
  26. +1 −1 xbmc/FileSystem/PluginDirectory.cpp
  27. +2 −2 xbmc/GUIDialogAddonSettings.cpp
  28. +6 −6 xbmc/GUIDialogContentSettings.cpp
  29. +1 −1 xbmc/GUIViewState.cpp
  30. +4 −4 xbmc/GUIWindowAddonBrowser.cpp
  31. +1 −1 xbmc/MusicDatabase.cpp
  32. +3 −3 xbmc/Scraper.cpp
  33. +2 −2 xbmc/VideoDatabase.cpp
  34. +2 −2 xbmc/utils/Addon.cpp
  35. +7 −7 xbmc/utils/Addon.h
  36. +1 −1 xbmc/utils/AddonDll.h
  37. +63 −55 xbmc/utils/AddonManager.cpp
  38. +4 −4 xbmc/utils/AddonManager.h
  39. +1 −1 xbmc/utils/IAddon.h
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>49acf415-02ad-4281-8eb4-9278326f4a05</uuid>
+ <id>49acf415-02ad-4281-8eb4-9278326f4a05</id>
<type>scraper-library</type>
<title>AllMusic</title>
<library>allmusic.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>79ba05df-14b0-49ba-ad8d-b9eb8cafd038</uuid>
+ <id>79ba05df-14b0-49ba-ad8d-b9eb8cafd038</id>
<type>scraper-library</type>
<title>DTrailer</title>
<library>dtrailer.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>182db4b0-25ae-11df-8a39-0800200c9a66</uuid>
+ <id>182db4b0-25ae-11df-8a39-0800200c9a66</id>
<type>scraper-library</type>
<title>Discogs</title>
<library>discogs.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>20a6cd29-50f3-41c5-bd96-c9f967138365</uuid>
+ <id>20a6cd29-50f3-41c5-bd96-c9f967138365</id>
<type>scraper-library</type>
<title>HTBackdrops</title>
<library>htbackdrops.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>208d94d7-5c65-4b96-b207-e6b308717623</uuid>
+ <id>208d94d7-5c65-4b96-b207-e6b308717623</id>
<type>scraper-library</type>
<title>IMDb</title>
<library>imdb.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>3cfce449-2e54-4a40-86cc-a6d2199c73b3</uuid>
+ <id>3cfce449-2e54-4a40-86cc-a6d2199c73b3</id>
<type>scraper-library</type>
<title>IMPA</title>
<library>impa.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>56e2e02c-1b76-4c91-87bb-0e90b1cb7c72</uuid>
+ <id>56e2e02c-1b76-4c91-87bb-0e90b1cb7c72</id>
<type>scraper-library</type>
<title>LastFM</title>
<library>lastfm.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>DD60AE50-5D67-4aa9-AF45-A7F2E5518B5F</uuid>
+ <id>DD60AE50-5D67-4aa9-AF45-A7F2E5518B5F</id>
<type>scraper-library</type>
<title>MoviePostersDB</title>
<library>movieposterdb.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>52f01b59-f059-4950-a133-dbd778fa9b23</uuid>
+ <id>52f01b59-f059-4950-a133-dbd778fa9b23</id>
<type>scraper-library</type>
<title>TMDB</title>
<library>tmdb.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>6306e0c0-25f3-11df-8a39-0800200c9a66</uuid>
+ <id>6306e0c0-25f3-11df-8a39-0800200c9a66</id>
<type>scraper</type>
<title>AllMusic</title>
<library>allmusic.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>F0B735CA-F693-48e6-99DA-B3A66AE56E88</uuid>
+ <id>F0B735CA-F693-48e6-99DA-B3A66AE56E88</id>
<type>scraper</type>
<title>Amazon UK</title>
<library>amazonuk.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>2F2B9322-10BC-46f2-AC4C-72B2E8DD9694</uuid>
+ <id>2F2B9322-10BC-46f2-AC4C-72B2E8DD9694</id>
<type>scraper</type>
<title>IMDb</title>
<library>imdb.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>DD60AE50-5D67-4aa9-AF45-A7F2E5518B5F</uuid>
+ <id>DD60AE50-5D67-4aa9-AF45-A7F2E5518B5F</id>
<type>scraper</type>
<title>LastFM</title>
<library>lastfm.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>EA0E975F-F57F-467a-B77B-2A9CC597873B</uuid>
+ <id>EA0E975F-F57F-467a-B77B-2A9CC597873B</id>
<type>scraper</type>
<title>Yahoo! Music</title>
<library>yahoomusic.xml</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>F1179D67-0B7A-40f9-9EF6-27AD0E2C372B</uuid>
+ <id>F1179D67-0B7A-40f9-9EF6-27AD0E2C372B</id>
<type>screensaver</type>
<title>Euphoria</title>
<library>Euphoria.xbs</library>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
<!-- guid: unique identifier of this addon !-->
- <uuid>F20BE86C-7EA9-4b79-BE92-9BF3311EC092</uuid>
+ <id>F20BE86C-7EA9-4b79-BE92-9BF3311EC092</id>
<type>screensaver</type>
<title>Plasma</title>
<library>Plasma.xbs</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>B74613E6-B833-42c0-A8F7-21ACEA51628E</uuid>
+ <id>B74613E6-B833-42c0-A8F7-21ACEA51628E</id>
<type>screensaver</type>
<title>Solarwinds</title>
<library>Solarwinds.xbs</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>7A4551D9-2F50-4173-B224-EE209FC9EB1F</uuid>
+ <id>7A4551D9-2F50-4173-B224-EE209FC9EB1F</id>
<type>visualization</type>
<title>DirectX Spectrum</title>
<librarywin32>directx_spectrum_win32.vis</librarywin32>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>7A4551D9-2F50-4173-B224-EE209FC9EB1F</uuid>
+ <id>7A4551D9-2F50-4173-B224-EE209FC9EB1F</id>
<type>visualization</type>
<title>OpenGL Spectrum</title>
<library>opengl_spectrum.vis</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>b67a5960-d956-11de-8a39-0800200c9a66</uuid>
+ <id>b67a5960-d956-11de-8a39-0800200c9a66</id>
<type>visualization</type>
<title>projectM</title>
<library>projectM.vis</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>9AFC128B-A6B6-4824-9BC4-B122966709B3</uuid>
+ <id>9AFC128B-A6B6-4824-9BC4-B122966709B3</id>
<type>visualization</type>
<title>Waveform</title>
<library>Waveform.vis</library>
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addoninfo>
- <uuid>57675d11-0ae3-11df-8a39-0800200c9a66</uuid>
+ <id>57675d11-0ae3-11df-8a39-0800200c9a66</id>
<type>visualization</type>
<title>iTunes Visualization</title>
<library>iTunes.mvis</library>
View
@@ -226,7 +226,7 @@ CStdString CGUIInfoLabel::ReplaceLocalize(const CStdString &label)
CStdString CGUIInfoLabel::ReplaceAddonStrings(const CStdString &label)
{
CStdString work(label);
- // Replace all $ADDON[uuid number] with the real string
+ // Replace all $ADDON[id number] with the real string
int pos1 = work.Find("$ADDON[");
while (pos1 >= 0)
{
@@ -235,9 +235,9 @@ CStdString CGUIInfoLabel::ReplaceAddonStrings(const CStdString &label)
{
CStdString left = work.Left(pos1);
CStdString right = work.Mid(pos2 + 1);
- CStdString uuid = work.substr(pos1+7, 36);
+ CStdString id = work.substr(pos1+7, 36);
int stringid = atoi(work.substr(pos1+7+36+1, 5).c_str());
- CStdString replace = CAddonMgr::Get()->GetString(uuid, stringid);
+ CStdString replace = CAddonMgr::Get()->GetString(id, stringid);
work = left + replace + right;
}
else
@@ -255,7 +255,7 @@ void CGUIInfoLabel::Parse(const CStdString &label)
m_info.clear();
// Step 1: Replace all $LOCALIZE[number] with the real string
CStdString work = ReplaceLocalize(label);
- // Step 2: Replace all $ADDON[uuid number] with the real string
+ // Step 2: Replace all $ADDON[id number] with the real string
work = ReplaceAddonStrings(work);
// Step 3: Find all $INFO[info,prefix,postfix] blocks
int pos1 = work.Find("$INFO[");
View
@@ -90,7 +90,7 @@ class CGUIInfoLabel
static CStdString ReplaceLocalize(const CStdString &label);
/*!
- \brief Replaces instances of $ADDON[uuid number] with the appropriate localized addon string
+ \brief Replaces instances of $ADDON[id number] with the appropriate localized addon string
\param label text to replace
\return text with any localized strings filled in.
*/
@@ -64,7 +64,7 @@ void CAddonsDirectory::GenerateListing(CURL &path, VECADDONS& addons, CFileItemL
for (unsigned i=0; i < addons.size(); i++)
{
AddonPtr addon = addons[i];
- path.SetFileName(addon->UUID());
+ path.SetFileName(addon->ID());
CFileItemPtr pItem(new CFileItem(path.Get(), false));
pItem->SetLabel(addon->Name());
pItem->SetLabel2(addon->Summary());
@@ -445,7 +445,7 @@ bool CPluginDirectory::GetPluginsDirectory(const CONTENT_TYPE &type, CFileItemLi
for (IVECADDONS it = addons.begin(); it != addons.end(); it++)
{
CStdString path("plugin://");
- path.append((*it)->UUID());
+ path.append((*it)->ID());
CFileItemPtr newItem(new CFileItem(path,true));
newItem->SetLabel((*it)->Name());
@@ -397,9 +397,9 @@ void CGUIDialogAddonSettings::CreateControls()
if (setting->Attribute("label") && atoi(setting->Attribute("label")) > 0)
{
if (m_addon->Parent())
- label.Format("$ADDON[%s %s]", m_addon->Parent()->UUID().c_str(), setting->Attribute("label"));
+ label.Format("$ADDON[%s %s]", m_addon->Parent()->ID().c_str(), setting->Attribute("label"));
else
- label.Format("$ADDON[%s %s]", m_addon->UUID().c_str(), setting->Attribute("label"));
+ label.Format("$ADDON[%s %s]", m_addon->ID().c_str(), setting->Attribute("label"));
}
else
label = setting->Attribute("label");
@@ -248,19 +248,19 @@ void CGUIDialogContentSettings::FillContentTypes(const CONTENT_TYPE &content)
return;
AddonPtr addon;
- CStdString defaultUUID;
+ CStdString defaultID;
CAddonMgr::Get()->GetDefault(ADDON_SCRAPER, addon, content);
if (addon)
- defaultUUID = addon->UUID();
+ defaultID = addon->ID();
for (IVECADDONS it = addons.begin(); it != addons.end(); it++)
{
- bool isDefault = ((*it)->UUID() == defaultUUID);
+ bool isDefault = ((*it)->ID() == defaultID);
map<CONTENT_TYPE,VECADDONS>::iterator iter=m_scrapers.find(content);
AddonPtr scraper = (*it)->Clone((*it));
- if (m_scraper && m_scraper->Parent() && m_scraper->Parent()->UUID() == (*it)->UUID())
+ if (m_scraper && m_scraper->Parent() && m_scraper->Parent()->ID() == (*it)->ID())
{ // don't overwrite preconfigured scraper
scraper = m_scraper;
}
@@ -301,9 +301,9 @@ void CGUIDialogContentSettings::FillListControl()
for (IVECADDONS iter=m_scrapers.find(m_content)->second.begin();iter!=m_scrapers.find(m_content)->second.end();++iter)
{
CFileItemPtr item(new CFileItem((*iter)->Name()));
- item->m_strPath = (*iter)->UUID();
+ item->m_strPath = (*iter)->ID();
item->SetThumbnailImage((*iter)->Icon());
- if (m_scraper && (*iter)->UUID() == m_scraper->UUID())
+ if (m_scraper && (*iter)->ID() == m_scraper->ID())
{
item->Select(true);
selectedIndex = iIndex;
View
@@ -353,7 +353,7 @@ VECSOURCES& CGUIViewState::GetSources()
CMediaSource plugin;
CURL path;
path.SetProtocol(ADDON::TranslateContent(m_content));
- path.SetHostName(addons[i]->UUID());
+ path.SetHostName(addons[i]->ID());
plugin.strPath = path.Get();
plugin.strName = addons[i]->Name();
plugin.m_strThumbnailImage = addons[i]->Icon(); //FIXME cache by UUID
@@ -140,9 +140,9 @@ void CGUIWindowAddonBrowser::Update()
for (unsigned i=0; i < addons.size(); i++)
{
AddonPtr addon = addons[i];
- CFileItemPtr pItem(new CFileItem(addon->UUID(), false));
+ CFileItemPtr pItem(new CFileItem(addon->ID(), false));
pItem->SetLabel(addon->Name());
- pItem->SetProperty("Addon.UUID", addon->UUID());
+ pItem->SetProperty("Addon.ID", addon->ID());
pItem->SetProperty("Addon.Type", TranslateType(addon->Type()));
pItem->SetProperty("Addon.Disabled", addon->Disabled());
pItem->SetProperty("Addon.Name", addon->Name());
@@ -177,7 +177,7 @@ void CGUIWindowAddonBrowser::OnClick(int iItem)
AddonPtr addon;
TYPE type = TranslateType(pItem->GetProperty("Addon.Type"));
- if (CAddonMgr::Get()->GetAddon(type, pItem->GetProperty("Addon.UUID"), addon))
+ if (CAddonMgr::Get()->GetAddon(type, pItem->GetProperty("Addon.ID"), addon))
{
if (addon->Disabled())
{
@@ -206,7 +206,7 @@ bool CGUIWindowAddonBrowser::OnContextMenu(int iItem)
TYPE type = TranslateType(pItem->GetProperty("Addon.Type"));
AddonPtr addon;
- if (!CAddonMgr::Get()->GetAddon(type, pItem->GetProperty("Addon.UUID"), addon))
+ if (!CAddonMgr::Get()->GetAddon(type, pItem->GetProperty("Addon.ID"), addon))
return false;
int iSettingsLabel = 24020;
View
@@ -4022,7 +4022,7 @@ bool CMusicDatabase::SetScraperForPath(const CStdString& strPath, const ADDON::S
// insert new settings
strSQL = FormatSQL("insert into content (strPath, strScraperPath, strContent, strSettings) values ('%s','%s','%s','%s')",
- strPath.c_str(), scraper->Parent()->UUID().c_str(), ADDON::TranslateContent(scraper->Content()).c_str(), scraper->GetSettings().c_str());
+ strPath.c_str(), scraper->Parent()->ID().c_str(), ADDON::TranslateContent(scraper->Content()).c_str(), scraper->GetSettings().c_str());
m_pDS->exec(strSQL.c_str());
return true;
View
@@ -86,15 +86,15 @@ bool CScraper::LoadUserXML(const CStdString& strSaved)
bool CScraper::LoadSettingsXML(const CStdString& strFunction, const CScraperUrl* url)
{
- CStdString uuid = UUID();
+ CStdString id = ID();
if (Parent())
{ // called from DialogContentSettings. We are working with the cloned scraper settings
- uuid = Parent()->UUID();
+ id = Parent()->ID();
}
// load our scraper xml
CScraperParser parser;
- if (!parser.Load(uuid))
+ if (!parser.Load(id))
return false;
if (!parser.HasFunction(strFunction))
View
@@ -3237,7 +3237,7 @@ void CVideoDatabase::SetScraperForPath(const CStdString& filePath, const Scraper
else
{
CStdString content = TranslateContent(scraper->Content());
- strSQL=FormatSQL("update path set strContent='%s', strScraper='%s', scanRecursive=%i, useFolderNames=%i, strSettings='%s', noUpdate=%i where idPath=%i", content.c_str(), scraper->UUID().c_str(),settings.recurse,settings.parent_name,scraper->GetSettings().c_str(),settings.noupdate, idPath);
+ strSQL=FormatSQL("update path set strContent='%s', strScraper='%s', scanRecursive=%i, useFolderNames=%i, strSettings='%s', noUpdate=%i where idPath=%i", content.c_str(), scraper->ID().c_str(),settings.recurse,settings.parent_name,scraper->GetSettings().c_str(),settings.noupdate, idPath);
}
m_pDS->exec(strSQL.c_str());
}
@@ -7444,7 +7444,7 @@ void CVideoDatabase::ExportToXML(const CStdString &path, bool singleFiles /* = f
XMLUtils::SetInt(pPath,"scanrecursive",iter->second.recurse);
XMLUtils::SetBoolean(pPath,"usefoldernames",iter->second.parent_name);
XMLUtils::SetString(pPath,"content", TranslateContent(info->Content()));
- XMLUtils::SetString(pPath,"scraperpath",info->UUID());
+ XMLUtils::SetString(pPath,"scraperpath",info->ID());
}
}
xmlDoc.SaveFile(xmlFile);
View
@@ -235,7 +235,7 @@ CAddon::CAddon(const CAddon &rhs, const AddonPtr &parent)
: m_props(rhs.Props())
, m_parent(parent)
{
- m_props.uuid = StringUtils::CreateUUID();
+ m_props.id = StringUtils::CreateUUID();
m_userXmlDoc = rhs.m_userXmlDoc;
BuildProfilePath();
CUtil::AddFileToFolder(Profile(), "settings.xml", m_userSettingsPath);
@@ -503,7 +503,7 @@ TiXmlElement* CAddon::GetSettingsXML()
void CAddon::BuildProfilePath()
{
- m_profile.Format("special://profile/addon_data/%s/", UUID().c_str());
+ m_profile.Format("special://profile/addon_data/%s/", ID().c_str());
}
/**
Oops, something went wrong.

0 comments on commit 7411555

Please sign in to comment.