Changeset 165 for smplayer/trunk/src/youtube/retrieveyoutubeurl.h
- Timestamp:
- May 16, 2014, 9:51:55 AM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 163
- Property svn:mergeinfo changed
-
smplayer/trunk/src/youtube/retrieveyoutubeurl.h
r156 r165 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 3Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 24 24 #include <QMap> 25 25 26 #define YT_GET_VIDEOINFO 27 26 28 class RetrieveYoutubeUrl : public QObject 27 29 { … … 39 41 void close(); 40 42 41 void setUserAgent(const QString & s) { user_agent = s; };42 QString userAgent() { return user_agent; };43 static void setUserAgent(const QString & s) { user_agent = s; }; 44 static QString userAgent() { return user_agent; }; 43 45 44 46 void setPreferredQuality(Quality q) { preferred_quality = q; } … … 51 53 QString latestPreferredUrl() { return latest_preferred_url; } 52 54 QString origUrl() { return orig_url; } 55 56 bool isUrlSupported(const QString & url); 57 QString fullUrl(const QString & url); 53 58 54 59 signals: … … 63 68 64 69 protected slots: 65 void gotResponse( QNetworkReply* reply);70 void gotResponse(); 66 71 void parse(QByteArray text); 72 #ifdef YT_GET_VIDEOINFO 73 void gotVideoInfoResponse(); 74 void parseVideoInfo(QByteArray text); 75 void fetchVideoInfoPage(); 76 #endif 67 77 68 78 protected: 69 79 static QString sanitizeForUnicodePoint(QString string); 70 80 static void htmlDecode(QString& string); 81 QString getVideoID(QString video_url); 71 82 72 83 QMap<int, QString> urlMap; … … 76 87 77 88 Quality preferred_quality; 78 QString user_agent; 89 static QString user_agent; 90 91 #ifdef YT_GET_VIDEOINFO 92 QString video_id; 93 #endif 79 94 80 95 private:
Note:
See TracChangeset
for help on using the changeset viewer.