Skip to content
This repository has been archived by the owner on Jun 5, 2019. It is now read-only.

Commit

Permalink
Language for Tray start #36 , Making Metadata updater more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
becast committed Jan 17, 2017
1 parent d3eaadd commit 530afae
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/at/becast/youploader/gui/FrmMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ public void actionPerformed(ActionEvent evt) {
}
});

chkstartintray = new JCheckBoxMenuItem("Start in Tray");
chkstartintray = new JCheckBoxMenuItem(LANG.getString("frmMain.menu.StartinTray"));
if(Main.s.get("startintray").equals("1")){
chkstartintray.setSelected(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ public void updateMetadata() throws IOException {
con.setRequestMethod("GET");
con.setRequestProperty("User-Agent", Main.APP_NAME+" "+Main.VERSION);
int responseCode = con.getResponseCode();
System.out.println("\nSending 'GET' request to URL : " + url);
System.out.println("Response Code : " + responseCode);

if(Main.debug){
LOG.debug("Sending 'GET' request to URL: {}", url);
LOG.debug("Response Code : {}", responseCode);
}
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
Expand All @@ -76,6 +77,9 @@ public void updateMetadata() throws IOException {
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
if(Main.debug){
LOG.debug("Response: {}", response.toString());
}
in.close();
updateAsBrowser(response.toString());

Expand All @@ -91,6 +95,9 @@ private void updateAsBrowser(String body) throws IOException {
if (m.find( )) {
token = m.group().replace("var session_token = \"", "").replace("\";", "");;
LOG.debug("Got Token {}",token);
}else{
LOG.error("Token not found!");
return;
}
Map<String, Object> mdata = new HashMap<String, Object>();
mdata.put("creator_share_feeds", "yes");
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/lang.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frmMain.menu.UploadLatestLogfile = Upload latest logfile
frmMain.menu.CheckforUpdates = Check for Updates
frmMain.menu.Templates = Templates
frmMain.menu.addTemplate = Add Template
frmMain.menu.StartinTray = Start in tray
frmMain.tos.Title=Terms of Service
frmMain.tos.Message=By clicking 'Start,' you certify that you own all rights to the content or that you are\nauthorized by the owner to make the content publicly available on YouTube, and that it otherwise complies\nwith the YouTube Terms of Service located at http://www.youtube.com/t/terms
frmMain.tos.Remember=Do not show this message again.
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/lang/lang_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ frmMain.menu.UploadLatestLogfile = aktuelle Logdatei hochladen
frmMain.menu.CheckforUpdates = Auf Aktualisierungen prüfen
frmMain.menu.Templates = Templates
frmMain.menu.addTemplate = Template hinzufügen
frmMain.menu.StartinTray = Starte im Tray
frmMain.tos.Title=Nutzungsbedingungen
frmMain.tos.Message=Mit Klicken auf 'Start' versichern Sie, dass Sie alle Rechte an den Inhalten besitzen oder von ihren Inhabern\ndie Erlaubnis erhalten haben, sie auf YouTube öffentlich zu verbreiten und dass Sie weiterhin die\nYouTube-Nutzungsbedingungen unter https://www.youtube.com/static?gl=DE&template=terms&hl=de erfüllen.
frmMain.tos.Remember=Diese Nachricht nicht erneut anzeigen.
Expand Down

0 comments on commit 530afae

Please sign in to comment.