summaryrefslogtreecommitdiff
path: root/muggle-plugin/gd_content_interface.c
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-26 21:01:56 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-26 21:01:56 +0000
commitae61e4ab78f1de49211d17e4a509a1c24443fc2e (patch)
treebb2eac52cdeba787f5816ad905aa0b2ee442c43b /muggle-plugin/gd_content_interface.c
parent3e949c7385756836dfb7f0bce4d95dc37a5697eb (diff)
downloadvdr-plugin-muggle-ae61e4ab78f1de49211d17e4a509a1c24443fc2e.tar.gz
vdr-plugin-muggle-ae61e4ab78f1de49211d17e4a509a1c24443fc2e.tar.bz2
Removed compiler errors
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk@251 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'muggle-plugin/gd_content_interface.c')
-rw-r--r--muggle-plugin/gd_content_interface.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/muggle-plugin/gd_content_interface.c b/muggle-plugin/gd_content_interface.c
index 987bd70..a7d5bac 100644
--- a/muggle-plugin/gd_content_interface.c
+++ b/muggle-plugin/gd_content_interface.c
@@ -767,26 +767,27 @@ bool GdPlaylist::storePlaylist()
bool GdPlaylist::storeAs( std::string name )
{
int id;
-
+ MYSQL_ROW row;
+ MYSQL_RES *result;
+
result = mgSqlReadQuery( &m_db,
"SELECT id FROM playlist WHERE title=\"current\"" );
if( mysql_num_rows(result) )
{
- MYSQL row = mysql_fetch_row( result );
+ row = mysql_fetch_row( result );
}
else
{
// otherwise create a new database entry
mgSqlWriteQuery( &m_db, "INSERT into playlist SET "
"title=\"%s\", author=\"VDR\"",
- name.c_str() )
+ name.c_str() );
// now read the new list to get the id
result = mgSqlReadQuery( &m_db,
"SELECT id,author FROM playlist where title=\"current\"");
- nrows = mysql_num_rows(result);
row = mysql_fetch_row(result);
}
@@ -804,6 +805,8 @@ bool GdPlaylist::storeAs( std::string name )
id );
// add new playlist items to db
+ std::vector<mgContentItem*>::iterator iter;
+ int num = 0;
for( iter=m_list.begin(), num=0;
iter != m_list.end();
iter++, num++)
@@ -814,6 +817,7 @@ bool GdPlaylist::storeAs( std::string name )
num, (*iter)->getId(), m_sqlId);
}
}
+ return true;
}
/*!