Bug 88165 - Kscd does not save disk data in local CDDB
Summary: Kscd does not save disk data in local CDDB
Status: RESOLVED FIXED
Alias: None
Product: kscd
Classification: Miscellaneous
Component: general (show other bugs)
Version: 1.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Aaron J. Seigo
URL:
Keywords:
: 89503 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-26 22:36 UTC by imruska
Modified: 2004-09-30 00:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description imruska 2004-08-26 22:36:34 UTC
Version:           1.4 (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.4-52-default

When I try to save CDDB data in Kscd KDE 3.3.0. version, it refuses to do so, saying all fields cannot be blank, although I filled them all in. I did not have this problem with former KDE releases (3.2.1 and 3.2.3)
Comment 1 Richard Lärkäng 2004-09-04 22:06:11 UTC
CVS commit by larkang: 

Saving and sending cd-info was really broken.
Disc title, artist and song-titles weren't updated.

This also fixes bug 88165 about not being able to enter new info

CCMAIL: 88165-done@bugs.kde.org


  M +29 -14    cddbdlg.cpp   1.3
  M +2 -1      cddbdlg.h   1.2


--- kdemultimedia/kscd/cddbdlg.cpp  #1.2:1.3
@@ -283,23 +283,13 @@ QTime framestoTime(int _frames)
 } // framestotime
 
-void CDDBDlg::titlechanged()
-{
-  QString title = m_dlgBase->le_title->text().stripWhiteSpace();
-  QString artist = m_dlgBase->le_artist->text().stripWhiteSpace();
-
-  if(title.isEmpty() || artist.isEmpty())
-    return;
-
-  title = QString("%1 / %2").arg(artist).arg(title);
-  *track_list.begin() = title;
-} // titlechanged
-
-QString submitcat;
-
 void CDDBDlg::upload()
 {
+  updateTrackList();
+
   if(!checkit())
     return;
 
+  QString submitcat;
+
   if( category.isEmpty() )
   {
@@ -363,4 +353,6 @@ void CDDBDlg::setCdInfo(KCDDB::CDInfo &i
 void CDDBDlg::save()
 {
+  updateTrackList();
+
   if(!checkit())
     return;
@@ -489,3 +481,26 @@ void CDDBDlg::load_cddb()
 } // load
 
+void CDDBDlg::updateTrackList()
+{
+  QString title = m_dlgBase->le_title->text().stripWhiteSpace();
+  QString artist = m_dlgBase->le_artist->text().stripWhiteSpace();
+
+  title = QString("%1 / %2").arg(artist).arg(title);
+  *track_list.begin() = title;
+
+  m_dlgBase->lv_trackList->setSorting(0, true);
+
+  unsigned int i=1;
+  for (QListViewItem* item = m_dlgBase->lv_trackList->firstChild(); item ; item=item->nextSibling())
+  {
+    if (track_list.count() <= i)
+    {
+      kdWarning() << "track_list.count <= " << i << endl;
+      continue;
+    }
+    track_list[i] = item->text(2);
+    i++;
+  }
+}
+
 #include "cddbdlg.moc"

--- kdemultimedia/kscd/cddbdlg.h  #1.1:1.2
@@ -59,5 +59,4 @@ class CDDBDlg : public KDialogBase
 
   public slots:
-    void titlechanged();
     void save();
     void extITB( int trackNum );
@@ -72,4 +71,6 @@ class CDDBDlg : public KDialogBase
 
   private:
+    void updateTrackList();
+
     CDDBDlgBase *m_dlgBase;
     QStringList ext_list;


Comment 2 Richard Lärkäng 2004-09-30 00:16:54 UTC
*** Bug 89503 has been marked as a duplicate of this bug. ***