178 |
178 |
179 RadioStationIf* stationInterface = static_cast<RadioStationIf*>( station.data_ptr() ); |
179 RadioStationIf* stationInterface = static_cast<RadioStationIf*>( station.data_ptr() ); |
180 if ( d->mPresetStorage->readPreset( index, *stationInterface ) ) { |
180 if ( d->mPresetStorage->readPreset( index, *stationInterface ) ) { |
181 if ( station.isValid() && d->mWrapper->isFrequencyValid( station.frequency() ) ) { |
181 if ( station.isValid() && d->mWrapper->isFrequencyValid( station.frequency() ) ) { |
182 |
182 |
|
183 #ifdef INIT_STATIONS_WITH_DUMMY_RT |
|
184 station.setGenre( GenreEurope::RdsChildrensProgrammes ); |
|
185 if ( index % 3 == 0 ) { |
|
186 station.setName( "Radio Rock" ); |
|
187 station.setRadioText( "Now playing: <font color='cyan'>The Presidents of the United States of America</font> - <font color='cyan'>Dune Buggy and diipa daapa jhkjhui erjlkej rewjtl</font>" ); |
|
188 } else if ( index % 2 == 0 ) { |
|
189 station.setName( "Radio Rock" ); |
|
190 } else { |
|
191 station.setDynamicPsText( "DYN PS" ); |
|
192 } |
|
193 #endif // INIT_STATIONS_WITH_DUMMY_RT |
|
194 |
183 // Check if the station seems to send RDS or not. |
195 // Check if the station seems to send RDS or not. |
184 // Note that radiotext is not checked because it is not saved to cenrep |
196 // Note that radiotext is not checked because it is not saved to cenrep |
185 // TODO: Consider saving this state flag to cenrep |
197 // TODO: Consider saving this state flag to cenrep |
186 if ( ( station.hasName() && !station.isRenamed() ) || station.hasUrl() ) { |
198 if ( ( station.hasName() && !station.isRenamed() ) || station.hasUrl() ) { |
187 static_cast<RadioStationIf*>( station.data_ptr() )->setStationHasSentRds( true ); |
199 static_cast<RadioStationIf*>( station.data_ptr() )->setStationHasSentRds( true ); |