imdb-rating as textfield

Niko Sams ns at vivid-planet.com
Fri Jan 12 06:33:59 MST 2007


Hi,

I use for the imdb-rating field a text-field - as it can save "5.3" and not 
only "5 stars". And imho it is easier to read.

I patched the imdb-fetcher so it saved the exact value from imdb (including 
the decimal):
--- imdbfetcher.cpp.orig        2007-01-12 14:23:29.000000000 +0100
+++ imdbfetcher.cpp     2007-01-11 19:43:25.000000000 +0100
@@ -928,7 +928,7 @@
     bool ok;
     float value = rx.cap(1).toFloat(&ok);
     if(ok) {
-      entry_->setField(QString::fromLatin1("imdb-rating"), 
QString::number((int)value));
+      entry_->setField(QString::fromLatin1("imdb-rating"), 
QString::number(value));
     }
   }
 }


It looks like this decimal-number works for the normal rating field too 
(although I didn't do too much tests - I guess you will know that better)

please check if this patch can be applied.

thanks!
Niko



More information about the tellico-users mailing list