Ticket #5234: out_fix_xmltv_grabber.diff
File out_fix_xmltv_grabber.diff, 1.6 KB (added by , 18 years ago) |
---|
-
programs/mythfilldatabase/channeldata.cpp
376 377 { 377 378 QStringList words = QStringList::split(" ", 378 379 (*i).name.simplifyWhiteSpace().upper()); 379 QString callsign = ""; 380 if (words[0].isEmpty()) 380 381 QString callsign = ""; 382 383 if (words.count()<=0 || words[0].isEmpty()) 381 384 callsign = QString::number(chanid); 382 else if (words [1].isEmpty())385 else if (words.count()<=1 || words[1].isEmpty()) 383 386 callsign = words[0].left(5); 384 387 else 385 { 388 { 386 389 callsign = words[0].left(words[1].length() == 1 ? 4:3); 387 390 callsign += words[1].left(5 - callsign.length()); 388 391 } 389 392 (*i).callsign = callsign; 393 390 394 } 391 395 396 392 397 if (chanid > 0) 393 398 { 394 399 QString cstr = QString((*i).chanstr); 395 400 if(channel_preset && cstr.isEmpty()) 396 401 cstr = QString::number(chanid % 1000); 397 402 403 398 404 ChannelUtil::CreateChannel( 399 405 mplexid, id, chanid, 400 406 (*i).callsign, (*i).name, cstr,