radioapp/radiouiengine/src/radiostationmodel.cpp
changeset 36 ba22309243a1
parent 34 bc10a61bd7d3
child 38 f8c3d4e6102c
--- a/radioapp/radiouiengine/src/radiostationmodel.cpp	Tue Jun 29 15:09:03 2010 +0300
+++ b/radioapp/radiouiengine/src/radiostationmodel.cpp	Thu Jul 08 12:44:18 2010 +0300
@@ -179,6 +179,14 @@
         RadioStationIf* stationInterface = static_cast<RadioStationIf*>( station.data_ptr() );
         if ( d->mPresetStorage->readPreset( index, *stationInterface ) ) {
             if ( station.isValid() && d->mWrapper->isFrequencyValid( station.frequency() ) ) {
+
+                // Check if the station seems to send RDS or not.
+                // Note that radiotext is not checked because it is not saved to cenrep
+                // TODO: Consider saving this state flag to cenrep
+                if ( ( station.hasName() && !station.isRenamed() ) || station.hasUrl() ) {
+                    static_cast<RadioStationIf*>( station.data_ptr() )->setStationHasSentRds( true );
+                }
+
                 d->mStations.insert( station.frequency(), station );
             } else {
                 LOG( "RadioStationModel::initialize: Invalid station!" );