Active Topics

 



Notices


Reply
Thread Tools
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#321
Why do you keep reinstalling it? The postinst clears the configuraton.
 

The Following User Says Thank You to MohammadAG For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#322
marxian, any ideas on how to get the cookie (then pass it)?, I've looked at cutetube and it doesn't seem to be doing that.
 

The Following User Says Thank You to MohammadAG For This Useful Post:
Posts: 12 | Thanked: 3 times | Joined on Sep 2010 @ hungary
#323
I never reinstalled it and i have to type in every single time the login info too :S And now its stopped working via 3g. Only the white page loads, the email and password field not... via wifi it works correctly...
 
Posts: 27 | Thanked: 17 times | Joined on Jun 2010
#324
Originally Posted by MohammadAG View Post
Push notifications won't be implemented anytime soon (I'll be honest, I have no idea how to implement them), but with auto-refresh, the UI will notify you about new items (with an auto refresh rate of 5 minutes, that's enough methinks )



Vibration and LED are also supported (and configurable)

Edit: oh and I'm stuck on getting the cookie again :/
Thats awesome Mohammad! Thats enough for me by now! Great work!
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#325
Originally Posted by MohammadAG View Post
marxian, any ideas on how to get the cookie (then pass it)?, I've looked at cutetube and it doesn't seem to be doing that.
As things stand, I have no need to use cookies in cuteTube-QML. Videos play fine using any of the external media players. I'm only guessing that the solution for QMediaPlayer is to pass a YouTube cookie when making the HTTP request to play the video. I can't think of any other reason why it doesn't work. When using QMediaPlayer, the YouTube server must be aware that the origin of the request is different from that when the video webpage was downloaded, but this problem doesn't exist when using other media players.

However, I was able to get the cookies for the videoUrl:

Code:
void YouTube::getVideoUrl(const QString &videoId) {
    QString playerUrl = "http://www.youtube.com/get_video_info?&video_id=" + videoId + "&el=detailpage&ps=default&eurl=&gl=US&hl=en";
    QNetworkAccessManager *manager = new QNetworkAccessManager(this);
    QNetworkRequest request;
    request.setUrl(QUrl(playerUrl));
    connect(manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(parseVideoPage(QNetworkReply*)));
    manager->get(request);
}

void YouTube::parseVideoPage(QNetworkReply *reply) {
    QNetworkAccessManager *manager = qobject_cast<QNetworkAccessManager*>(sender());
    qDebug() << manager->cookieJar()->cookiesForUrl(reply->request().url());

...
This last line returned

Code:
(QNetworkCookie("use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; domain=.youtube.com; path=/") ,  QNetworkCookie("VISITOR_INFO1_LIVE=-DzhOBbT2vs; expires=Tue, 17-Jan-2012 13:49:30 GMT; domain=.youtube.com; path=/") ,  QNetworkCookie("GEO=a2731021266fb55d211af8f75b6cb61fcwsAAAAzR0JShPI6TdkUag==; domain=.youtube.com; path=/") ,  QNetworkCookie("s_gl=18f5cd48020458e865a469a7155238dacwIAAABVUw==; domain=.youtube.com; path=/") )
So, hopefully you can just pass this list of cookies to the QNetworkRequest used by QMediaPlayer (maybe emit the cookie list along with the url as part of the gotVideoUrl() signal).

I will have a little play around and see if I can get it to work.

EDIT: No need to set the cookie jar to a new instance of QNetworkCookieJar. The constructor of QNetworkAccessManager must do this already.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2011-05-22 at 14:15.
 

The Following 6 Users Say Thank You to marxian For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#326
Not much luck here, anything on your side?

Also in the next update (Qt Mobility 1.2 APIs are actually neat)
 

The Following 11 Users Say Thank You to MohammadAG For This Useful Post:
shanttu's Avatar
Posts: 234 | Thanked: 281 times | Joined on Nov 2010 @ Helsinki
#327
Originally Posted by MohammadAG View Post
Why do you keep reinstalling it? The postinst clears the configuraton.
In a hope that the .config file would be created. Right now it does not exist.
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#328
No, I still get the forbidden response.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
geojoking's Avatar
Posts: 159 | Thanked: 53 times | Joined on Jan 2011 @ Romania, Cluj-Napoca
#329
I'd like to submit a proposition:

In Places, when I want to tag friends with me for a check in, could you maybe remove the profile picture?

It really makes the list lag a bit (until all friends load), not to mention it consumes a lot of traffic (aprox 2MB, which is a lot, at least for me, I'm on a 200MB/month limited traffic plan).
__________________
People often mistake a faulty management of their personal life, with destiny.
 

The Following 3 Users Say Thank You to geojoking For This Useful Post:
MohammadAG's Avatar
Posts: 2,473 | Thanked: 12,265 times | Joined on Oct 2009 @ Jerusalem, PS/IL
#330
Done, I should also work on caching images based on filename...
 

The Following 3 Users Say Thank You to MohammadAG For This Useful Post:
Reply

Tags
facebook, facebook client


 
Forum Jump


All times are GMT. The time now is 13:36.