This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

YouTube Fix for Umplayer

By: a guest on Nov 2nd, 2012  |  syntax: None  |  size: 0.94 KB  |  views: 146  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.   GNU nano 2.2.6           File: umplayer_utube.patch                              
  2.  
  3. --- retrievevideourl.cpp        2011-12-30 16:00:29.000000000 +0100
  4. +++ retrievevideourlnew.cpp     2012-10-30 18:29:16.026063801 +0100
  5. @@ -63,10 +63,14 @@
  6.      QStringList codeList = fmtArray.split(',');
  7.      QStringList::iterator stIt = codeList.begin();
  8.      foreach(QString code, codeList)
  9. -    {
  10. -        code.remove(0, 4);
  11. -        QUrl url(code);
  12. -        urlMap[url.queryItemValue("itag").toInt()] = code.remove(QRegExp("&itag=\\$
  13. +    {
  14. +       QUrl url(code);
  15. +        int itag = url.queryItemValue("itag").toInt();
  16. +        //qDebug("itag: %d", itag);
  17. +        code.remove(QRegExp("itag=(\\d+)&url="));
  18. +        code.replace("&sig=", "&signature=");
  19. +        urlMap[itag] = code;
  20. +        //qDebug("code: '%s'", code.toUtf8().constData());
  21.      }
  22.      /*regex.setPattern("\\\"t\\\"\\s*:\\s*\\\"([^\\\"]*)");
  23.      regex.indexIn(replyString);
clone this paste RAW Paste Data