From 8254ce34310bac46ee864925e68d7a5e0f16d4a5 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 3 Jun 2018 22:57:34 +0200 Subject: [PATCH 1/7] Added German Translation (#102) * German Translation Needs to be checked by a native speaker. Used google translate for the correct spelling. The // indicates an unsure. * Update according feedback given. --- locales/de.json | 95 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 locales/de.json diff --git a/locales/de.json b/locales/de.json new file mode 100644 index 000000000..7211a1d76 --- /dev/null +++ b/locales/de.json @@ -0,0 +1,95 @@ +{ + "File": "Datei", + "Quit": "Schließen", + "Edit": "Bearbeiten", + "Undo": "Rückgängig", + "Redo": "Wiederholen", + "Cut": "Ausschneiden", + "Copy": "Kopieren", + "Paste": "Einfügen", + "Delete": "Löschen", + "Select all": "Alles markieren", + "View": "Ansicht", + "Reload": "Neu laden", + "Force Reload": "Neu laden erzwingen", + "Toggle Developer Tools": "Entwicklerwerkzeuge umschalten", + "Actual size": "Wahre Größe", + "Zoom in": "Vergrößern", + "Zoom out": "Verkleinern", + "Toggle fullscreen": "Vollbild umschalten", + "Window": "Fenster", + "Minimize": "Minimieren", + "Close": "Schließen", + "FreeTube": "FreeTube", + "Subscriptions": "Abonnements", + "Featured": "Vorgestellt", + "Most Popular": "Beliebteste", + "Saved": "Gespeichert", + "Playlists": "Playlists", + "History": "Historie", + "Settings": "Einstellungen", + "About": "Über", + "Search / Go to URL": "Suche / URL besuchen", + "Search Results": "Suchergebnisse", + "Subscriber": "Subscriber", + "Subscriber": "Subscribers", + "Video": "Video", + "Videos": "Videos", + "View Full Playlist": "Vollständige Playlist anzeigen", + "Live Now": "Jetzt Live", + "Fetch more results": "Mehr Ergebnisse anzeigen", + "Fetching results. Please wait": "Ergebnisse laden. Bitte warten", + "Latest Subscriptions": "Neueste Abonnements", + "Save Video": "Video Speichern", + "Remove Saved Video": "Gespeichertes Video entfernen", + "Open in YouTube": "Öffnen in YouTube", + "Copy YouTube Link": "YouTube Link kopieren", + "Open in HookTube": "Öffnen in HookTube", + "Copy HookTube Link": "HookTube Link kopieren", + "URL has been copied to the clipboard": "Die URL wurde in die Zwischenablage kopiert", + "Found valid URL for 480p, but returned a 404. Video type might be available in the future.": "Es wurde eine gültige URL für 480p gefunden, aber eine 404 zurückgegeben. Der Videotyp könnte in Zukunft verfügbar sein.", + "Save": "Speichern", + "Mini Player": "Mini Player", + "View": "Wiedergabe", + "Views": "Wiedergaben", + "Subscribe": "Abonnieren", + "Unsubscribe": "Abmelden", + "Published on": "Veröffentlicht am", + "Jan": "Jan", + "Feb": "Feb", + "Mar": "Mär", + "Apr": "Apr", + "May": "Mai", + "Jun": "Jun", + "Jul": "Jul", + "Aug": "Aug", + "Sep": "Sep", + "Oct": "Okt", + "Nov": "Nov", + "Dec": "Dez", + "Show Comments": "Kommentare anzeigen", + "Max of 100": "Maximal 100", + "Recommendations": "Empfehlungen", + "Latest Subscriptions": "Neueste Abonnements", + "Getting Subscriptions. Please wait...": "Rufe Abonnements ab. Bitte warten...", + "Your Subscription list is currently empty. Start adding subscriptions to see them here.": "Ihre Abonnementsliste ist momentan lehr. Füge Abonnements hinzu, um sie hier zu sehen.", + "Saved Videos": "Gespeichterte Videos", + "Watch History": "Wiedergabeverlauf", + "API Key": "API Schlüssel", + "Set API Key: Leave blank to use default": "API Schlüssel setzen: Leer lassen, um Standard zu verwenden", + "Use Dark Theme": "Dunkles Thema benutzen", + "Import Subscriptions": "Abonnements importieren", + "Export Subscriptions": "Abonnements exportieren", + "Clear History": "Verlauf löschen", + "Are you sure you want to delete your history?": "Möchtest du deinen Verlauf wirklich löschen?", + "Clear Saved Videos": "Gespeicherte Videos löschen", + "Are you sure you want to remove all saved videos?": "Möchtest du deine gespeicherten Videos wirklich löschen?", + "Clear Subscriptions": "Abonnements löschen", + "Are you sure you want to remove all subscriptions?": "Möchten Sie Ihrer Abonnements wirklich löschen?", + "Save Settings": "Einstellungen Speichern", + "Yes": "Ja", + "No": "Nein", + "Beta": "Beta", + "This software is FOSS and released under the GNU Public License v3+.": "Diese Software ist FOSS (Freie Open-Source Software) und unter der GNU Public License v3+ veröffentlicht.", + "Found a bug? Want to suggest a feature? Want to help out? Check out our GitHub page. Pull requests are welcome.": "Fehler gefunden? Eine Idee für extra Funktionalität? Mithelfen? Schau dir unsere Github-Seite an. Pull requests sind wilkommen." +} From a5e1db960c6c50e2ab65f2f1bfabc409b00d83fe Mon Sep 17 00:00:00 2001 From: FreeTube Date: Mon, 11 Jun 2018 14:00:04 -0400 Subject: [PATCH 2/7] Fix: Videos not playing and opening YouTube and HookTube links. --- src/js/layout.js | 3 ++- src/js/player.js | 23 ++++++++++++----------- src/templates/player.html | 4 +++- src/templates/settings.html | 2 +- src/templates/videoList.html | 4 ++-- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/js/layout.js b/src/js/layout.js index 5ce1ab1cc..75734d019 100644 --- a/src/js/layout.js +++ b/src/js/layout.js @@ -83,9 +83,10 @@ const settingsDb = new Datastore({ checkDefaultSettings(); require('electron').ipcRenderer.on('ping', function(event, message) { + console.log(message); let url = message[1].replace('freetube://', ''); parseSearchText(url); - console.log(message); // Prints "whoooooooh!" + console.log(message); }); // Open links externally by default diff --git a/src/js/player.js b/src/js/player.js index 0ce731c01..3133709e7 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -119,11 +119,11 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { Object.keys(videoUrls).forEach((key) => { switch (videoUrls[key]['itag']) { case '18': - video480p = videoUrls[key]['url']; + video480p = decodeURIComponent(videoUrls[key]['url']); console.log(video480p); break; case '22': - video720p = videoUrls[key]['url']; + video720p = decodeURIComponent(videoUrls[key]['url']); console.log(video720p); break; } @@ -148,7 +148,7 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { } if (!useEmbedPlayer) { - videoHtml = ''; } const checkSubscription = isSubscribed(channelId); @@ -192,8 +192,9 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { const playerTemplate = require('./templates/player.html') mustache.parse(playerTemplate); const rendered = mustache.render(playerTemplate, { - videoHtml: videoHtml, videoQuality: defaultQuality, + subtitleHtml: videoHtml, + defaultUrl: defaultUrl, videoTitle: info['title'], videoViews: videoViews, videoThumbnail: videoThumbnail, @@ -234,7 +235,7 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { videoId: videoId, channelId: channelId }); - + newWindow.loadURL('data:text/html;charset=UTF-8,' + encodeURIComponent(playerHeaderRender + rendered), { baseURLForDataURL: `file://${__dirname}/src` }); @@ -245,11 +246,6 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { showVideoRecommendations(videoId); - // Sometimes a video URL is found, but the video will not play. I believe the issue is - // that the video has yet to render for that quality, as the video will be available at a later time. - // This will check the URLs and switch video sources if there is an error. - checkVideoUrls(video480p, video720p); - // Hide subtitles by default if (typeof(info['subtitles']) !== 'undefined' && Object.keys(info['subtitles']).length > 0) { let textTracks = $('.videoPlayer').get(0).textTracks; @@ -259,7 +255,12 @@ function playVideo(videoId, videoThumbnail = '', useWindowPlayer = false) { } } + // Sometimes a video URL is found, but the video will not play. I believe the issue is + // that the video has yet to render for that quality, as the video will be available at a later time. + // This will check the URLs and switch video sources if there is an error. + //checkVideoUrls(video480p, video720p); + window.setTimeout(checkVideoUrls, 5000, video480p, video720p); }); } diff --git a/src/templates/player.html b/src/templates/player.html index 342974662..84bd05131 100644 --- a/src/templates/player.html +++ b/src/templates/player.html @@ -1,4 +1,6 @@ -{{{videoHtml}}} +
MINI PLAYER diff --git a/src/templates/settings.html b/src/templates/settings.html index 5babcfcc8..a9e4f178d 100644 --- a/src/templates/settings.html +++ b/src/templates/settings.html @@ -7,7 +7,7 @@ - +
diff --git a/src/templates/videoList.html b/src/templates/videoList.html index 88be73e51..2c0d01791 100644 --- a/src/templates/videoList.html +++ b/src/templates/videoList.html @@ -4,8 +4,8 @@
From a9b0ede8fed8ce813645f6be5b1d47b07d5f9384 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Wed, 13 Jun 2018 10:06:37 -0400 Subject: [PATCH 3/7] Added Russian Translation --- locales/ru.json | 95 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 locales/ru.json diff --git a/locales/ru.json b/locales/ru.json new file mode 100644 index 000000000..34a9f5c89 --- /dev/null +++ b/locales/ru.json @@ -0,0 +1,95 @@ +{ + "File": "Файл", + "Quit": "Выйти", + "Edit": "Редактировать", + "Undo": "Отмена", + "Redo": "Восстановить", + "Cut": "Вырезать", + "Copy": "Копировать", + "Paste": "Вставить", + "Delete": "Удалить", + "Select all": "Выбрать все", + "View": "Просмотр", + "Reload": "Обновить", + "Force Reload": "Перезагрузка", + "Toggle Developer Tools": "Переключение инструментов разработчика", + "Actual size": "Фактический размер", + "Zoom in": "Увеличить", + "Zoom out": "Уменьшить", + "Toggle fullscreen": "Полноэкранный режим", + "Window": "Окно", + "Minimize": "Свернуть", + "Close": "Закрыть", + "FreeTube": "FreeTube", + "Subscriptions": "Подписки", + "Featured": "Популярные", + "Most Popular": "В тренде", + "Saved": "Сохраненные", + "Playlists": "Списки воспроизведения", + "History": "История", + "Settings": "Настройки", + "About": "О программе", + "Search / Go to URL": "Поиск / перейти по URL", + "Search Results": "Результаты поиска", + "Subscriber": "Подписка", + "Subscriber": "Подписчиков", + "Video": "Видео", + "Videos": "Видео", + "View Full Playlist": "Список воспроизведения", + "Live Now": "Live Now", + "Fetch more results": "Больше результатов", + "Fetching results. Please wait": "Получение ответа. Ждите", + "Latest Subscriptions": "Недавние подписки", + "Save Video": "Сохранить видео", + "Remove Saved Video": "Удалить сохраненное видео", + "Open in YouTube": "Открыть на YouTube", + "Copy YouTube Link": "Копировать ссылку YouTube", + "Open in HookTube": "Открыть на HookTube", + "Copy HookTube Link": "Копировать ссылку HookTube", + "URL has been copied to the clipboard": "URL скопирован в буфер обмена", + "Found valid URL for 480p, but returned a 404. Video type might be available in the future.": "Найден допустимый URL для 480p, но возвращен 404. Тип видео может быть доступен в будущем.", + "Save": "Save", + "Mini Player": "Мини-плеер", + "View": "Поросмотр", + "Views": "Просмотры", + "Subscribe": "Подписаться", + "Unsubscribe": "Отписаться", + "Published on": "Опубликовано", + "Jan": "Янв", + "Feb": "Фев", + "Mar": "Мар", + "Apr": "Апр", + "May": "Май", + "Jun": "Июн", + "Jul": "Июл", + "Aug": "Авг", + "Sep": "Сен", + "Oct": "Окт", + "Nov": "Ноя", + "Dec": "Дек", + "Show Comments": "Показать комментарии", + "Max of 100": "Max of 100", + "Recommendations": "Рекомендованные", + "Latest Subscriptions": "Недавние подписки", + "Getting Subscriptions. Please wait...": "Загрузка подписок. Подождите...", + "Your Subscription list is currently empty. Start adding subscriptions to see them here.": "Ваш список подписки в настоящее время пуст. Начните добавлять подписки, чтобы увидеть их здесь.", + "Saved Videos": "Сохранить видео", + "Watch History": "Просмотр истории", + "API Key": "API Key", + "Set API Key: Leave blank to use default": "Установить ключ API: оставьте пустым, чтобы использовать по умолчанию", + "Use Dark Theme": "Использовать темную тему", + "Import Subscriptions": "Импорт подписок", + "Export Subscriptions": "Экспорт подписок", + "Clear History": "Очистить историю", + "Are you sure you want to delete your history?": "Вы уверены, что хотите удалить всю историю?", + "Clear Saved Videos": "Очистить сохраненные видео", + "Are you sure you want to remove all saved videos?": "Вы уверены, что хотите удалить все сохраненные видео?", + "Clear Subscriptions": "Очистить подписки", + "Are you sure you want to remove all subscriptions?": "Вы уверены, что хотите удалить все подписки?", + "Save Settings": "Сохранить настройки", + "Yes": "Да", + "No": "Нет", + "Beta": "Beta", + "This software is FOSS and released under the GNU Public License v3+.": "Это программное обеспечение является FOSS и Выпущено под GNU Public License v3+.", + "Found a bug? Want to suggest a feature? Want to help out? Check out our GitHub page. Pull requests are welcome.": "Нашли ошибку? Хотите предложить функцию? Хотите помочь? Проверьте нашу страницу GitHub. Вопросы приветствуются." +} From db3208956549906a7ec30b99490fe7f262d5fe79 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Wed, 13 Jun 2018 10:32:03 -0400 Subject: [PATCH 4/7] Default name for exported subscriptions and lighter scroll bar on dark theme. --- src/js/settings.js | 18 ++++++++++++++++++ src/style/darkTheme.css | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/js/settings.js b/src/js/settings.js index b1c7c3831..1196db4f8 100644 --- a/src/js/settings.js +++ b/src/js/settings.js @@ -346,8 +346,26 @@ function importSubscriptions(){ function exportSubscriptions() { const appDatabaseFile = localDataStorage + '/subscriptions.db'; + const date = new Date(); + let dateMonth = date.getMonth() + 1; + + if (dateMonth < 10){ + dateMonth = '0' + dateMonth; + } + + let dateDay = date.getDate(); + + if (dateDay < 10){ + dateDay = '0' + dateDay; + } + + const dateYear = date.getFullYear(); + const dateString = 'freetube-subscriptions-' + dateYear + '-' + dateMonth + '-' + dateDay; + console.log(dateString); + // Open user file browser. User gives location of file to be created. dialog.showSaveDialog({ + defaultPath: dateString, filters: [{ name: 'Database File', extensions: ['db'] diff --git a/src/style/darkTheme.css b/src/style/darkTheme.css index f69edeefd..01ad71c4f 100644 --- a/src/style/darkTheme.css +++ b/src/style/darkTheme.css @@ -5,7 +5,7 @@ } ::-webkit-scrollbar-thumb { - background: #212121; + background: #424242; -webkit-border-radius: 1ex; -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.75); } From 7f84496773175a0e0089e1ec60ffe181948632b0 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 13 Jun 2018 20:42:24 -0400 Subject: [PATCH 5/7] Update nl.json (#101) Small corrections. --- locales/nl.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/nl.json b/locales/nl.json index b12583cb4..1e9c921ea 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -1,6 +1,6 @@ { "File": "Bestand", - "Quit": "Afluiten", + "Quit": "Afsluiten", "Edit": "Bewerken", "Undo": "Ongedaan maken", "Redo": "Opnieuw", @@ -12,7 +12,7 @@ "View": "Weergave", "Reload": "Herladen", "Force Reload": "Herladen forceren", - "Toggle Developer Tools": "Hulpprogramma's voor ontwikkelaars", + "Toggle Developer Tools": "Hulpprogramma voor ontwikkelaars", "Actual size": "Daadwerkelijke grootte", "Zoom in": "Zoom in", "Zoom out": "Zoom uit", From b7482132eb4231ff6538e99afa42c7fca4c5c0be Mon Sep 17 00:00:00 2001 From: Gerardo Date: Thu, 14 Jun 2018 14:49:09 +0200 Subject: [PATCH 6/7] Create it-It.json (#117) * Create it-It.json Added italian translation * Rename it-It.json to it.IT.json --- locales/it.IT.json | 95 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 locales/it.IT.json diff --git a/locales/it.IT.json b/locales/it.IT.json new file mode 100644 index 000000000..8d9619689 --- /dev/null +++ b/locales/it.IT.json @@ -0,0 +1,95 @@ +{ + "File": "File", + "Quit": "Esci", + "Edit": "Modifica", + "Undo": "Annulla", + "Redo": "Ripeti", + "Cut": "Taglia", + "Copy": "Copia", + "Paste": "Incolla", + "Delete": "Elimina", + "Select all": "Seleziona Tutto", + "View": "Visualizza", + "Reload": "Ricarica", + "Force Reload": "Forza Ricarica", + "Toggle Developer Tools": "Apri Strumenti Sviluppatore", + "Actual size": "Dimensione Attuale", + "Zoom in": "Ingrandisci", + "Zoom out": "Diminuisci", + "Toggle fullscreen": "Entra in modalità schermo intero", + "Window": "Finestra", + "Minimize": "Minimizza", + "Close": "Chiudi", + "FreeTube": "FreeTube", + "Subscriptions": "Sottoscrizioni", + "Featured": "Featured", + "Most Popular": "Più popolari", + "Saved": "Salvati", + "Playlists": "Playlist", + "History": "Cronologia", + "Settings": "Impostazioni", + "About": "Info", + "Search / Go to URL": "Cerca / Vai all' URL", + "Search Results": "Cerca Risultati", + "Subscriber": "Iscritto", + "Subscriber": "Iscritti", + "Video": "Video", + "Videos": "Video", + "View Full Playlist": "Vedi Intera Playlist", + "Live Now": "Live Ora", + "Fetch more results": "Ottieni più risultati", + "Fetching results. Please wait": "Ottenendo più risultati. Attendi per favore", + "Latest Subscriptions": "Ultime sottoscrizioni", + "Save Video": "Salva Video", + "Remove Saved Video": "Rimuovi Video Salvati", + "Open in YouTube": "Apri su YouTube", + "Copy YouTube Link": "Copia Link Youtube", + "Open in HookTube": "Apri in HookTube", + "Copy HookTube Link": "Copy Link HookTube", + "URL has been copied to the clipboard": "L'URL è stato copiato negli appunti", + "Found valid URL for 480p, but returned a 404. Video type might be available in the future.": "Trovato URL valido per 480p, ma è stato restituito un errore 404. Il tipo di video potrebbe essere disponibile in futuro.", + "Save": "Salva", + "Mini Player": "Mini Player", + "View": "Visualizzazione", + "Views": "Visualizzazioni", + "Subscribe": "Iscriviti", + "Unsubscribe": "Disiscriviti", + "Published on": "Pubblicato il", + "Jan": "Gen", + "Feb": "Feb", + "Mar": "Mar", + "Apr": "Apr", + "May": "Mag", + "Jun": "Giu", + "Jul": "Lug", + "Aug": "Ago", + "Sep": "Set", + "Oct": "Ott", + "Nov": "Nov", + "Dec": "Dic", + "Show Comments": "Mostra Commenti", + "Max of 100": "Massimo di 100", + "Recommendations": "Raccomandati", + "Latest Subscriptions": "Ultime Sottoscrizioni", + "Getting Subscriptions. Please wait...": "Ottenendo Sottoscrizioni. Per favore attendi...", + "Your Subscription list is currently empty. Start adding subscriptions to see them here.": "La tua lista iscritti è vuota al momento. Inizia ad aggiungere sottoscrizioni per vederle qui.", + "Saved Videos": "Video Salvati", + "Watch History": "Guarda Cronologia", + "API Key": "Chiave API", + "Set API Key: Leave blank to use default": "Setta Chiave API: Lascia bianco per usare quella di default", + "Use Dark Theme": "Usa Tema Scuro", + "Import Subscriptions": "Importa Iscrizioni", + "Export Subscriptions": "Esporta Iscrizioni", + "Clear History": "Cancella Cronologia", + "Are you sure you want to delete your history?": "Sei sicuro di voler cancellare la cronologia?", + "Clear Saved Videos": "Cancella Video Salvati", + "Are you sure you want to remove all saved videos?": "Sei sicuro di voler rimuovere tutti i video salvati?", + "Clear Subscriptions": "Cancella Sottoscrizioni", + "Are you sure you want to remove all subscriptions?": "Sei sicuro di voler rimuovere tutte le sottoscrizioni?", + "Save Settings": "Salva Impostazioni", + "Yes": "Sì", + "No": "No", + "Beta": "Beta", + "This software is FOSS and released under the GNU Public License v3+.": "Questo software è FOSS e rilasciato sotto licenza GNU Public License v3+.", + "Found a bug? Want to suggest a feature? Want to help out? Check out our GitHub page. Pull requests are welcome.": "Trovato un bug? Vuoi suggerire una funzionalità? Vuoi aiutare? Controlla la nostra pagina di GitHub. Le Pull request sono le benvenute." +} From 4d4b82d06ee1816d64021dabbe970ad5bfa850e1 Mon Sep 17 00:00:00 2001 From: PrestonN Date: Thu, 14 Jun 2018 09:25:56 -0400 Subject: [PATCH 7/7] Fix default channel barrier from being too large. --- src/style/channel.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/style/channel.css b/src/style/channel.css index 492016fa6..244629e00 100644 --- a/src/style/channel.css +++ b/src/style/channel.css @@ -1,5 +1,6 @@ .channelViewBanner{ width: 100%; + max-height: 200px; margin-bottom: 30px; }