Ticket #4372: upnp_utf8_fixes.diff
| File upnp_utf8_fixes.diff, 25.1 KB (added by , 18 years ago) |
|---|
-
mythtv/programs/mythbackend/mythxml.cpp
43 43 44 44 // --- none at this time. 45 45 46 QString sUPnpDescPath = UPnp::g_pConfig->GetValue( "UPnP/DescXmlPath", m_sSharePath ); 46 QString sUPnpDescPath = UPnp::g_pConfig->GetValue( "UPnP/DescXmlPath", 47 m_sSharePath ); 47 48 48 49 m_sServiceDescFileName = sUPnpDescPath + "MXML_scpd.xml"; 49 50 m_sControlUrl = "/Myth"; … … 101 102 { 102 103 if (pRequest) 103 104 { 104 if (pRequest->m_sBaseUrl == "/Myth/GetVideo")105 {106 pRequest->m_sBaseUrl = m_sControlUrl;107 pRequest->m_sMethod = "GetVideo";108 }105 if (pRequest->m_sBaseUrl == "/Myth/GetVideo") 106 { 107 pRequest->m_sBaseUrl = m_sControlUrl; 108 pRequest->m_sMethod = "GetVideo"; 109 } 109 110 110 111 if (pRequest->m_sBaseUrl != m_sControlUrl) 111 112 return( false ); 112 113 113 114 VERBOSE(VB_UPNP, QString("MythXML::ProcessRequest: %1 : %2") 114 .arg(pRequest->m_sMethod)115 .arg(pRequest->m_sRawRequest));115 .arg(pRequest->m_sMethod) 116 .arg(pRequest->m_sRawRequest)); 116 117 117 118 switch( GetMethod( pRequest->m_sMethod )) 118 119 { 119 case MXML_GetServiceDescription: pRequest->FormatFileResponse( m_sServiceDescFileName ); return true; 120 case MXML_GetServiceDescription: 121 pRequest->FormatFileResponse( m_sServiceDescFileName ); 122 return true; 120 123 121 case MXML_GetProgramGuide : GetProgramGuide( pRequest ); return true; 122 case MXML_GetProgramDetails : GetProgramDetails( pRequest ); return true; 124 case MXML_GetProgramGuide : 125 GetProgramGuide( pRequest ); 126 return true; 127 case MXML_GetProgramDetails : 128 GetProgramDetails( pRequest ); 129 return true; 123 130 124 case MXML_GetHosts : GetHosts ( pRequest ); return true; 125 case MXML_GetKeys : GetKeys ( pRequest ); return true; 126 case MXML_GetSetting : GetSetting ( pRequest ); return true; 127 case MXML_PutSetting : PutSetting ( pRequest ); return true; 128 129 case MXML_GetChannelIcon : GetChannelIcon ( pRequest ); return true; 130 case MXML_GetRecorded : GetRecorded ( pRequest ); return true; 131 case MXML_GetExpiring : GetExpiring ( pRequest ); return true; 132 case MXML_GetPreviewImage : GetPreviewImage( pRequest ); return true; 131 case MXML_GetHosts : 132 GetHosts ( pRequest ); 133 return true; 134 case MXML_GetKeys : 135 GetKeys ( pRequest ); 136 return true; 137 case MXML_GetSetting : 138 GetSetting ( pRequest ); 139 return true; 140 case MXML_PutSetting : 141 PutSetting ( pRequest ); 142 return true; 133 143 134 case MXML_GetRecording : GetRecording ( pThread, pRequest ); return true; 135 case MXML_GetMusic : GetMusic ( pThread, pRequest ); return true; 136 case MXML_GetVideo : GetVideo ( pThread, pRequest ); return true; 144 case MXML_GetChannelIcon : 145 GetChannelIcon ( pRequest ); 146 return true; 147 case MXML_GetRecorded : 148 GetRecorded ( pRequest ); 149 return true; 150 case MXML_GetExpiring : 151 GetExpiring ( pRequest ); 152 return true; 153 case MXML_GetPreviewImage : 154 GetPreviewImage( pRequest ); 155 return true; 137 156 138 case MXML_GetConnectionInfo : GetConnectionInfo( pRequest ); return true; 139 case MXML_GetAlbumArt : GetAlbumArt ( pRequest ); return true; 140 case MXML_GetVideoArt : GetVideoArt ( pRequest ); return true; 157 case MXML_GetRecording : 158 GetRecording ( pThread, pRequest ); 159 return true; 160 case MXML_GetMusic : 161 GetMusic ( pThread, pRequest ); 162 return true; 163 case MXML_GetVideo : 164 GetVideo ( pThread, pRequest ); 165 return true; 141 166 167 case MXML_GetConnectionInfo : 168 GetConnectionInfo( pRequest ); 169 return true; 170 case MXML_GetAlbumArt : 171 GetAlbumArt ( pRequest ); 172 return true; 173 case MXML_GetVideoArt : 174 GetVideoArt ( pRequest ); 175 return true; 142 176 143 default: 177 178 default: 144 179 { 145 180 UPnp::FormatErrorResponse( pRequest, UPnPResult_InvalidAction ); 146 181 … … 151 186 } 152 187 catch( ... ) 153 188 { 154 VERBOSE( VB_IMPORTANT, "MythXML::ProcessRequest() - Unexpected Exception" ); 189 VERBOSE( VB_IMPORTANT, "MythXML::ProcessRequest() - Unexpected " 190 "Exception" ); 155 191 } 156 192 157 193 return( false ); 158 } 194 } 159 195 160 196 // ========================================================================== 161 197 // Request handler Methods … … 167 203 168 204 void MythXML::GetHosts( HTTPRequest *pRequest ) 169 205 { 170 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 206 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 207 "max-age = 5000"; 171 208 172 209 MSqlQuery query(MSqlQuery::InitCon()); 173 210 … … 201 238 } 202 239 } 203 240 else 204 UPnp::FormatErrorResponse( pRequest, UPnPResult_ActionFailed, "Database not open while trying to load list of hosts" ); 241 UPnp::FormatErrorResponse( pRequest, UPnPResult_ActionFailed, 242 "Database not open while trying to load list of hosts" ); 205 243 } 206 244 207 245 ///////////////////////////////////////////////////////////////////////////// … … 210 248 211 249 void MythXML::GetKeys( HTTPRequest *pRequest ) 212 250 { 213 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 251 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 252 "max-age = 5000"; 214 253 215 254 MSqlQuery query(MSqlQuery::InitCon()); 216 255 … … 244 283 else 245 284 UPnp::FormatErrorResponse( pRequest, 246 285 UPnPResult_ActionFailed, 247 QString("Database not open while trying to load setting: %1") 286 QString("Database not open while trying to " 287 "load setting: %1") 248 288 .arg( pRequest->m_mapParams[ "Key" ] )); 249 289 } 250 290 … … 254 294 255 295 void MythXML::GetSetting( HTTPRequest *pRequest ) 256 296 { 257 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 297 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 298 "max-age = 5000"; 258 299 259 300 QString sKey = pRequest->m_mapParams[ "Key" ]; 260 301 QString sHostName = pRequest->m_mapParams[ "HostName" ]; … … 372 413 else 373 414 UPnp::FormatErrorResponse( pRequest, 374 415 UPnPResult_ActionFailed, 375 QString("Database not open while trying to load setting: %1") 416 QString("Database not open while trying to " 417 "load setting: %1") 376 418 .arg( pRequest->m_mapParams[ "Key" ] )); 377 419 } 378 420 … … 382 424 383 425 void MythXML::PutSetting( HTTPRequest *pRequest ) 384 426 { 385 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 427 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 428 "max-age = 5000"; 386 429 387 430 QString sHostName = pRequest->m_mapParams[ "HostName" ]; 388 431 QString sKey = pRequest->m_mapParams[ "Key" ]; … … 400 443 pRequest->FormatActionResponse( &list ); 401 444 } 402 445 else 403 UPnp::FormatErrorResponse( pRequest, UPnPResult_InvalidArgs, "Key Required" ); 446 UPnp::FormatErrorResponse( pRequest, UPnPResult_InvalidArgs, 447 "Key Required" ); 404 448 } 405 449 406 450 ///////////////////////////////////////////////////////////////////////////// … … 409 453 410 454 void MythXML::GetProgramGuide( HTTPRequest *pRequest ) 411 455 { 412 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 456 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 457 "max-age = 5000"; 413 458 414 459 QString sStartTime = pRequest->m_mapParams[ "StartTime" ]; 415 460 QString sEndTime = pRequest->m_mapParams[ "EndTime" ]; … … 423 468 424 469 if (!dtStart.isValid()) 425 470 { 426 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, "StartTime is invalid" ); 471 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, 472 "StartTime is invalid" ); 427 473 return; 428 474 } 429 475 430 476 if (!dtEnd.isValid()) 431 477 { 432 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, "EndTime is invalid" ); 478 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, 479 "EndTime is invalid" ); 433 480 return; 434 481 } 435 482 436 483 if (dtEnd < dtStart) 437 { 438 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, "EndTime is before StartTime"); 484 { 485 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, 486 "EndTime is before StartTime"); 439 487 return; 440 488 } 441 489 … … 451 499 452 500 query.prepare( "SELECT chanid FROM channel WHERE (chanid >= :STARTCHANID )" 453 501 " ORDER BY chanid LIMIT :NUMCHAN" ); 454 502 455 503 query.bindValue(":STARTCHANID", iStartChanId ); 456 504 query.bindValue(":NUMCHAN" , iNumOfChannels ); 457 505 … … 460 508 461 509 query.first(); iStartChanId = query.value(0).toInt(); 462 510 query.last(); iEndChanId = query.value(0).toInt(); 463 464 // Build add'l SQL statement for Program Listing465 511 512 // Build SQL statement for Program Listing 513 466 514 MSqlBindings bindings; 467 515 QString sSQL = "WHERE program.chanid >= :StartChanId " 468 516 "AND program.chanid <= :EndChanId " … … 486 534 m_pSched->getAllPending( &recList); 487 535 488 536 // ---------------------------------------------------------------------- 489 // We need to convert from a RecList to a ProgramList 537 // We need to convert from a RecList to a ProgramList 490 538 // (ProgramList will autodelete ProgramInfo pointers) 491 539 // ---------------------------------------------------------------------- 492 540 … … 504 552 505 553 // Build Response 506 554 507 QDomDocument doc; 555 QDomDocument doc; 508 556 509 557 QDomElement channels = doc.createElement("Channels"); 510 558 doc.appendChild( channels ); … … 548 596 list.append( new NameValue( "Details" , bDetails )); 549 597 550 598 list.append( new NameValue( "Count" , (int)progList.count() )); 551 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime().toString( Qt::ISODate ))); 599 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime() 600 .toString( Qt::ISODate ))); 552 601 list.append( new NameValue( "Version" , MYTH_BINARY_VERSION )); 553 602 list.append( new NameValue( "ProtoVer" , MYTH_PROTO_VERSION )); 554 603 list.append( new NameValue( "ProgramGuide" , doc.toString() )); … … 559 608 560 609 561 610 ///////////////////////////////////////////////////////////////////////////// 562 // 611 // 563 612 ///////////////////////////////////////////////////////////////////////////// 564 613 565 614 void MythXML::GetProgramDetails( HTTPRequest *pRequest ) 566 615 { 567 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 616 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 617 "max-age = 5000"; 568 618 569 619 QString sStartTime = pRequest->m_mapParams[ "StartTime" ]; 570 620 QString sChanId = pRequest->m_mapParams[ "ChanId" ]; … … 572 622 QDateTime dtStart = QDateTime::fromString( sStartTime, Qt::ISODate ); 573 623 574 624 if (!dtStart.isValid()) 575 { 576 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, "StartTime is invalid" ); 625 { 626 UPnp::FormatErrorResponse( pRequest, UPnPResult_ArgumentValueInvalid, 627 "StartTime is invalid" ); 577 628 return; 578 629 } 579 630 580 631 // ---------------------------------------------------------------------- 581 632 // -=>TODO: Add support for getting Recorded Program Info 582 633 // ---------------------------------------------------------------------- 583 634 584 635 // Build add'l SQL statement for Program Listing 585 636 586 637 MSqlBindings bindings; … … 618 669 ProgramInfo *pInfo = progList.first(); 619 670 620 671 if (pInfo==NULL) 621 { 622 UPnp::FormatErrorResponse( pRequest, UPnPResult_ActionFailed, "Error Reading Program Info" ); 672 { 673 UPnp::FormatErrorResponse( pRequest, UPnPResult_ActionFailed, 674 "Error Reading Program Info" ); 623 675 return; 624 676 } 625 677 … … 640 692 list.append( new NameValue( "ChanId" , sChanId )); 641 693 642 694 list.append( new NameValue( "Count" , 1 )); 643 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime().toString( Qt::ISODate ))); 695 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime() 696 .toString( Qt::ISODate ))); 644 697 list.append( new NameValue( "Version" , MYTH_BINARY_VERSION )); 645 698 list.append( new NameValue( "ProtoVer" , MYTH_PROTO_VERSION )); 646 699 … … 650 703 } 651 704 652 705 ///////////////////////////////////////////////////////////////////////////// 653 // 706 // 654 707 ///////////////////////////////////////////////////////////////////////////// 655 708 656 709 void MythXML::GetChannelIcon( HTTPRequest *pRequest ) … … 759 812 // 760 813 int nWidth = pRequest->m_mapParams[ "Width" ].toInt(); 761 814 int nHeight = pRequest->m_mapParams[ "Height" ].toInt(); 762 815 763 816 // Read Video poster file path from database 764 817 765 818 MSqlQuery query(MSqlQuery::InitCon()); 766 819 767 820 query.prepare("SELECT coverart FROM upnpmedia WHERE intid = :ITEMID"); … … 787 840 // ---------------------------------------------------------------------- 788 841 // check to see if albumart image is already created. 789 842 // ---------------------------------------------------------------------- 790 843 791 844 if (QFile::exists( sFileName )) 792 845 { 793 846 pRequest->m_eResponseType = ResponseTypeFile; 794 847 pRequest->m_nResponseStatus = 200; 795 pRequest->m_sFileName = sFileName;796 return;848 pRequest->m_sFileName = sFileName; 849 return; 797 850 } 798 851 799 852 } 800 853 801 854 void MythXML::GetAlbumArt( HTTPRequest *pRequest ) … … 830 883 { 831 884 query.first(); 832 885 833 pRequest->m_sFileName = musicbasepath + query.value(0).toString(); 886 pRequest->m_sFileName = QString( "%1/%2" ) 887 .arg( musicbasepath ) 888 .arg( QString::fromUtf8(query.value(0).toString()) ); 834 889 } 835 890 836 891 if ((nWidth == 0) && (nHeight == 0)) … … 945 1000 NameValueList list; 946 1001 947 1002 list.append( new NameValue( "Count" , (int)progList.count())); 948 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime().toString( Qt::ISODate ))); 1003 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime() 1004 .toString( Qt::ISODate ))); 949 1005 list.append( new NameValue( "Version" , MYTH_BINARY_VERSION )); 950 1006 list.append( new NameValue( "ProtoVer" , MYTH_PROTO_VERSION )); 951 1007 … … 989 1045 NameValueList list; 990 1046 991 1047 list.append( new NameValue( "Count" , (int)infoList.size())); 992 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime().toString( Qt::ISODate ))); 1048 list.append( new NameValue( "AsOf" , QDateTime::currentDateTime() 1049 .toString( Qt::ISODate ))); 993 1050 list.append( new NameValue( "Version" , MYTH_BINARY_VERSION )); 994 1051 list.append( new NameValue( "ProtoVer" , MYTH_PROTO_VERSION )); 995 1052 … … 1124 1181 // check to see if scaled preview image is already created. 1125 1182 // ---------------------------------------------------------------------- 1126 1183 1127 1128 1184 1185 1129 1186 if (QFile::exists( pRequest->m_sFileName )) 1130 1187 { 1131 1188 delete pImage; … … 1149 1206 bool bIndexFile = false; 1150 1207 1151 1208 pRequest->m_eResponseType = ResponseTypeHTML; 1152 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 1209 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 1210 "max-age = 5000"; 1153 1211 pRequest->m_nResponseStatus = 404; 1154 1212 1155 1213 QString sChanId = pRequest->m_mapParams[ "ChanId" ]; … … 1220 1278 1221 1279 if (pInfo==NULL) 1222 1280 { 1223 VERBOSE( VB_UPNP, QString( "MythXML::GetRecording - GetProgramFromRecorded( %1, %2 ) returned NULL" ) 1224 .arg( sChanId ) 1225 .arg( sStartTime )); 1281 VERBOSE( VB_UPNP, QString( "MythXML::GetRecording - " 1282 "GetProgramFromRecorded( %1, %2 ) " 1283 "returned NULL" ) 1284 .arg( sChanId ) 1285 .arg( sStartTime )); 1226 1286 return; 1227 1287 } 1228 1288 … … 1230 1290 { 1231 1291 // We only handle requests for local resources 1232 1292 1233 VERBOSE( VB_UPNP, QString( "MythXML::GetRecording - To access this recording, send request to %1." ) 1234 .arg( pInfo->hostname )); 1293 VERBOSE( VB_UPNP, QString( "MythXML::GetRecording - To access this " 1294 "recording, send request to %1." ) 1295 .arg( pInfo->hostname )); 1235 1296 1236 1297 delete pInfo; 1237 1298 1238 return; 1299 return; 1239 1300 } 1240 1301 1241 1302 pRequest->m_sFileName = GetPlaybackURL(pInfo); … … 1277 1338 HTTPRequest *pRequest ) 1278 1339 { 1279 1340 pRequest->m_eResponseType = ResponseTypeHTML; 1280 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 1341 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 1342 "max-age = 5000"; 1281 1343 pRequest->m_nResponseStatus = 404; 1282 1344 1283 1345 QString sId = pRequest->m_mapParams[ "Id" ]; … … 1334 1396 { 1335 1397 query.first(); 1336 1398 pRequest->m_sFileName = QString( "%1/%2" ) 1337 .arg( sBasePath )1338 .arg( query.value(0).toString() );1399 .arg( sBasePath ) 1400 .arg( QString::fromUtf8(query.value(0).toString()) ); 1339 1401 } 1340 1402 } 1341 1403 … … 1367 1429 HTTPRequest *pRequest ) 1368 1430 { 1369 1431 pRequest->m_eResponseType = ResponseTypeHTML; 1370 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", max-age = 5000"; 1432 pRequest->m_mapRespHeaders[ "Cache-Control" ] = "no-cache=\"Ext\", " 1433 "max-age = 5000"; 1371 1434 pRequest->m_nResponseStatus = 404; 1372 1435 1373 1436 QString sId = pRequest->m_mapParams[ "Id" ]; … … 1376 1439 { 1377 1440 QStringList idPath = QStringList::split( "/", pRequest->m_sRawRequest ); 1378 1441 1379 idPath = QStringList::split( " ", idPath[idPath.count() - 2] );1380 idPath = QStringList::split( "?", idPath[0] );1442 idPath = QStringList::split( " ", idPath[idPath.count() - 2] ); 1443 idPath = QStringList::split( "?", idPath[0] ); 1381 1444 1382 1445 sId = idPath[0]; 1383 1446 1384 if (sId.startsWith("Id"))1385 sId = sId.right(sId.length() - 2);1386 else 1447 if (sId.startsWith("Id")) 1448 sId = sId.right(sId.length() - 2); 1449 else 1387 1450 return; 1388 1451 1389 //VERBOSE(VB_UPNP, QString("MythXML::GetVideo : %1 ").arg(sId));1390 1391 pRequest->m_mapParams[ "Id" ] = sId;1452 //VERBOSE(VB_UPNP, QString("MythXML::GetVideo : %1 ").arg(sId)); 1453 1454 pRequest->m_mapParams[ "Id" ] = sId; 1392 1455 } 1393 1456 1394 1457 bool wantCoverArt = (pRequest->m_mapParams[ "albumArt" ] == "true"); … … 1396 1459 if (wantCoverArt) 1397 1460 { 1398 1461 GetVideoArt(pRequest); 1399 return;1462 return; 1400 1463 } 1401 1464 1402 1465 // ---------------------------------------------------------------------- … … 1441 1504 query.first(); 1442 1505 pRequest->m_sFileName = QString( "%1/%2" ) 1443 1506 .arg( sBasePath ) 1444 .arg( query.value(0).toString() );1507 .arg( QString::fromUtf8(query.value(0).toString()) ); 1445 1508 } 1446 1509 } 1447 1510 … … 1575 1638 program.setAttribute( "hostname" , pInfo->hostname ); 1576 1639 1577 1640 if (pInfo->hasAirDate) 1578 program.setAttribute( "airdate" , pInfo->originalAirDate.toString(Qt::ISODate) ); 1641 program.setAttribute( "airdate" , pInfo->originalAirDate 1642 .toString(Qt::ISODate) ); 1579 1643 1580 1644 QDomText textNode = pDoc->createTextNode( pInfo->description ); 1581 1645 program.appendChild( textNode ); … … 1585 1649 if ( bIncChannel ) 1586 1650 { 1587 1651 // Build Channel Child Element 1588 1652 1589 1653 QDomElement channel = pDoc->createElement( "Channel" ); 1590 1654 program.appendChild( channel ); 1591 1655 … … 1595 1659 // Build Recording Child Element 1596 1660 1597 1661 if ( pInfo->recstatus != rsUnknown ) 1598 { 1662 { 1599 1663 QDomElement recording = pDoc->createElement( "Recording" ); 1600 1664 program.appendChild( recording ); 1601 1665 1602 1666 recording.setAttribute( "recStatus" , pInfo->recstatus ); 1603 1667 recording.setAttribute( "recPriority" , pInfo->recpriority ); 1604 recording.setAttribute( "recStartTs" , pInfo->recstartts.toString(Qt::ISODate)); 1605 recording.setAttribute( "recEndTs" , pInfo->recendts.toString(Qt::ISODate)); 1668 recording.setAttribute( "recStartTs" , pInfo->recstartts 1669 .toString(Qt::ISODate)); 1670 recording.setAttribute( "recEndTs" , pInfo->recendts 1671 .toString(Qt::ISODate)); 1606 1672 1607 1673 if (bDetails) 1608 1674 { -
mythtv/programs/mythbackend/upnpcdsvideo.cpp
116 116 MSqlQuery &query ) 117 117 { 118 118 int nVidID = query.value( 0).toInt(); 119 QString sTitle = query.value( 1).toString();120 QString sFileName = query.value( 2).toString();119 QString sTitle = QString::fromUtf8(query.value( 1).toString()); 120 QString sFileName = QString::fromUtf8(query.value( 2).toString()); 121 121 QString sItemType = query.value( 3).toString(); 122 122 QString sParentID = query.value( 5).toString(); 123 123 QString sCoverArt = query.value( 6).toString(); -
mythtv/programs/mythbackend/upnpcdsmusic.cpp
186 186 // int nYear = query.value( 5).toInt(); 187 187 int nTrackNum = query.value( 6).toInt(); 188 188 QString sDescription = QString::fromUtf8(query.value( 7).toString()); 189 QString sFileName = query.value( 8).toString();189 QString sFileName = QString::fromUtf8(query.value( 8).toString()); 190 190 uint nLength = query.value( 9).toInt(); 191 191 192 192 /*
