Skip to content

Commit

Permalink
*Plugins: Fixes/Changes/Maintenance*
Browse files Browse the repository at this point in the history
- GoogleDrive: updated wording of some settings as I'Ve also just updated the Google Drive support articles

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@47431 ebf7c1c2-ba36-0410-9fe8-c592906822b4
  • Loading branch information
psp committed Mar 23, 2023
1 parent 062d696 commit 5f50ef8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/jd/plugins/hoster/GoogleDrive.java
Original file line number Diff line number Diff line change
Expand Up @@ -1773,14 +1773,14 @@ private void errorDownloadQuotaReachedWebsite(final DownloadLink link, final Acc
errorQuotaReachedInAllModes(link);
} else {
link.setProperty(PROPERTY_TIMESTAMP_QUOTA_REACHED_ACCOUNT, System.currentTimeMillis());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download Quota reached: " + getDownloadQuotaReachedHint1(), getQuotaReachedWaittime());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download quota reached: " + getDownloadQuotaReachedHint1(), getQuotaReachedWaittime());
}
} else {
if (this.isDownloadQuotaReachedAccount(link)) {
errorQuotaReachedInAllModes(link);
} else {
link.setProperty(PROPERTY_TIMESTAMP_QUOTA_REACHED_ANONYMOUS, System.currentTimeMillis());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download Quota reached: Try later or add Google account and retry", getQuotaReachedWaittime());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download quota reached: Try later or add Google account and retry", getQuotaReachedWaittime());
}
}
}
Expand All @@ -1797,13 +1797,13 @@ private void errorQuotaReachedInAPIMode(final DownloadLink link, final Account a
errorQuotaReachedInAllModes(link);
} else {
/* We haven't yet attempted to download this link via account. */
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download Quota reached: Try later or adjust API download mode in plugin settings", getQuotaReachedWaittime());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download quota reached: Try later or adjust API download mode in plugin settings", getQuotaReachedWaittime());
}
} else {
if (this.isDownloadQuotaReachedAccount(link)) {
errorQuotaReachedInAllModes(link);
} else {
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download Quota reached: Try later or add Google account and retry", getQuotaReachedWaittime());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download quota reached: Try later or add Google account and retry", getQuotaReachedWaittime());
}
}
}
Expand All @@ -1815,7 +1815,7 @@ private void errorQuotaReachedInAPIMode(final DownloadLink link, final Account a
* @throws PluginException
*/
private void errorQuotaReachedInAllModes(final DownloadLink link) throws PluginException {
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download Quota reached: " + getDownloadQuotaReachedHint1(), getQuotaReachedWaittime());
throw new PluginException(LinkStatus.ERROR_TEMPORARILY_UNAVAILABLE, "Download quota reached: " + getDownloadQuotaReachedHint1(), getQuotaReachedWaittime());
}

private void errorFileInfected(final DownloadLink link) throws PluginException {
Expand All @@ -1841,7 +1841,7 @@ private static long getRateLimitWaittime() {
private void errorCannotDownload(final DownloadLink link, final boolean isAfterStreamDownloadAttempt) throws PluginException {
String errorMsg = "Download disabled by file owner!";
if (!isAfterStreamDownloadAttempt && this.videoStreamShouldBeAvailable(link) && !PluginJsonConfig.get(GoogleConfig.class).isAllowStreamDownloadAsFallbackIfOfficialDownloadIsDisabled()) {
errorMsg += " Video stream download might be possible: Enable stream download as fallback for disabled downloads in plugin settings.";
errorMsg += " Stream download might be possible: Enable stream download as fallback for disabled downloads in plugin settings.";
}
throw new PluginException(LinkStatus.ERROR_FATAL, errorMsg);
}
Expand Down Expand Up @@ -1873,7 +1873,7 @@ public void loginWebsite(final Browser br, final Account account, final boolean
}
final Cookies userCookies = account.loadUserCookies();
if (userCookies != null && PluginJsonConfig.get(GoogleConfig.class).isDebugAccountLogin()) {
/* Debug */
/* Old debug check */
final String cookieOSID = br.getCookie("google.com", "OSID");
if (cookieOSID == null || cookieOSID.equals("")) {
logger.warning("OSID cookie has empty value -> This should never happen");
Expand Down
12 changes: 6 additions & 6 deletions src/org/jdownloader/plugins/components/config/GoogleConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
@PluginHost(host = "drive.google.com", type = Type.HOSTER)
public interface GoogleConfig extends PluginConfigInterface {
final String text_UserAgent = "User-Agent which will be used for all Google website http requests";
final String text_PreferredVideoQuality = "Preferred video quality.\r\nIf you prefer stream download and the preferred stream quality is not found, best stream quality will be downloaded instead.";
final String text_PreferredVideoQuality = "Preferred video stream quality.\r\nIf the preferred stream quality is not found, best stream quality will be downloaded instead.";
final String text_AllowStreamDownloadAsFallbackIfFileDownloadQuotaIsReached = "Allow stream download as fallback if original file is quota limited?";
final String text_AllowStreamDownloadAsFallbackIfOfficialDownloadIsDisabled = "Allow stream download as fallback if original file download is disabled?";
final String text_GoogleDriveAPIKey = "Google Drive API key see: developers.google.com/drive/api/v3/enable-drive-api\r\nIt will be used for GDrive folder crawling, linkchecking and downloading.";
final String text_APIDownloadMode = "API download mode (only relevant if API Key is provided.)";
final String text_AddStreamQualityIdentifierToFilename = "Add quality identifier to filename if video stream (= non-original file) is downloaded?";
final String text_AddStreamQualityIdentifierToFilename = "Add quality identifier to filename if audio/video stream is downloaded?";
final String text_WaitOnQuotaReachedMinutes = "Wait time minutes on quota limit reached";
final String text_DebugAccountLogin = "Debug: Website mode: Perform extended account check?";
final String text_DebugForceValidateLoginAlways = "Debug: Website mode: Force validate login on every linkcheck/download attempt (will slow things down)?";
final String text_DebugWebsiteTrustQuickLinkcheckOfflineStatus = "Debug: Website mode: Trust quick linkcheck offline status?";
final String text_DebugWebsiteSkipExtendedLinkcheckForGoogleDocuments = "Debug: Website mode: Skip extended linkcheck for google documents?";
final String text_DebugAccountLogin = "Debug: Website mode: Perform extended account check (enable = slower account check)?";
final String text_DebugForceValidateLoginAlways = "Debug: Website mode: Force validate login on every linkcheck/download attempt (enable = slower linkcheck!)?";
final String text_DebugWebsiteTrustQuickLinkcheckOfflineStatus = "Debug: Website mode: Trust quick linkcheck offline status (enable = can speed up linkcheck)?";
final String text_DebugWebsiteSkipExtendedLinkcheckForGoogleDocuments = "Debug: Website mode: Skip extended linkcheck for google documents (enable = can speed up linkcheck)?";
public static final TRANSLATION TRANSLATION = new TRANSLATION();

public static class TRANSLATION {
Expand Down

0 comments on commit 5f50ef8

Please sign in to comment.