Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #84 from Tubefeeder/import-subscriptions
Browse files Browse the repository at this point in the history
Import subscriptions
  • Loading branch information
Schmiddiii authored Aug 8, 2022
2 parents 1b47d93 + 2d4f24e commit 7c5c224
Show file tree
Hide file tree
Showing 21 changed files with 729 additions and 38 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ once_cell = "1.10.0"

gettext-rs = "0.7.0"

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

tf_core = "0.1.2"
tf_join = "0.1.4"
tf_filter = "0.1.2"
Expand Down
1 change: 1 addition & 0 deletions data/resources/resources.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<file preprocess="xml-stripblanks">ui/thumbnail.ui</file>
<file preprocess="xml-stripblanks">ui/watch_later.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_window.ui</file>
<file preprocess="xml-stripblanks">ui/import_window.ui</file>
</gresource>
<gresource prefix="/de/schmidhuberj/tubefeeder/icons/">
<file alias="icon.svg">../icons/de.schmidhuberj.tubefeeder.svg</file>
Expand Down
3 changes: 3 additions & 0 deletions data/resources/ui/feed_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<object class="GtkBox" id="box_refresh">
<child>
<object class="GtkButton" id="btn_reload">
<style>
<class name="flat"/>
</style>
<binding name="visible">
<closure function="not" type="gboolean">
<lookup name="reloading" type="TFFeedPage"></lookup>
Expand Down
3 changes: 3 additions & 0 deletions data/resources/ui/filter_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

<property name="child">
<object class="GtkButton" id="btn_toggle_add_filter">
<style>
<class name="flat"/>
</style>
<property name="visible">True</property>
<child>
<object class="GtkImage">
Expand Down
4 changes: 4 additions & 0 deletions data/resources/ui/header_bar.ui
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
<attribute name="label" translatable="yes">Settings</attribute>
<attribute name="action">win.settings</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Import</attribute>
<attribute name="action">win.import</attribute>
</item>
<item>
<attribute name="label" translatable="yes">About</attribute>
<attribute name="action">win.about</attribute>
Expand Down
54 changes: 54 additions & 0 deletions data/resources/ui/import_window.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.24"/>
<requires lib="libadwaita" version="1.0"/>

<template class="TFImportWindow" parent="GtkDialog">
<property name="can-focus">True</property>
<property name="title" translatable="yes">Import</property>
<property name="default-height">100</property>
<property name="default-width">400</property>
<property name="destroy-with-parent">True</property>

<child internal-child="content_area">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="label" translatable="yes">This will import your subscriptions from exported data from NewPipe or Youtube.</property>

<property name="wrap">True</property>
<property name="xalign">0</property>
<property name="wrap-mode">word</property>
<property name="justify">left</property>
<property name="vexpand">False</property>
<property name="valign">start</property>
<property name="hexpand">True</property>
<property name="halign">start</property>
</object>
</child>
</object>
</child>

<child type="action">
<object class="GtkButton" id="button_newpipe">
<property name="label">NewPipe</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="button_youtube">
<property name="label">YouTube</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">Cancel</property>
</object>
</child>

<action-widgets>
<action-widget response="1">button_newpipe</action-widget>
<action-widget response="2">button_youtube</action-widget>
<action-widget response="cancel">button_cancel</action-widget>
</action-widgets>
</template>
</interface>
3 changes: 3 additions & 0 deletions data/resources/ui/subscription_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

<property name="child">
<object class="GtkButton" id="btn_toggle_add_subscription">
<style>
<class name="flat"/>
</style>
<property name="visible">True</property>
<child>
<object class="GtkImage">
Expand Down
9 changes: 9 additions & 0 deletions po/POTFILES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# fd -t f -e ui . data/
# fd -t f -e rs . src/

data/resources/ui/error_label.ui
data/resources/ui/feed_item.ui
data/resources/ui/feed_list.ui
Expand All @@ -6,13 +9,16 @@ data/resources/ui/filter_item.ui
data/resources/ui/filter_list.ui
data/resources/ui/filter_page.ui
data/resources/ui/header_bar.ui
data/resources/ui/import_window.ui
data/resources/ui/preferences_window.ui
data/resources/ui/subscription_item.ui
data/resources/ui/subscription_list.ui
data/resources/ui/subscription_page.ui
data/resources/ui/thumbnail.ui
data/resources/ui/watch_later.ui
data/resources/ui/window.ui

src/config.rs
src/csv_file_manager.rs
src/downloader.rs
src/gui/feed/error_label.rs
Expand All @@ -28,7 +34,9 @@ src/gui/filter/filter_list.rs
src/gui/filter/filter_page.rs
src/gui/filter/mod.rs
src/gui/header_bar.rs
src/gui/import_window.rs
src/gui/mod.rs
src/gui/preferences_window.rs
src/gui/subscription/mod.rs
src/gui/subscription/platform.rs
src/gui/subscription/subscription_item.rs
Expand All @@ -38,5 +46,6 @@ src/gui/subscription/subscription_page.rs
src/gui/utility.rs
src/gui/watch_later.rs
src/gui/window.rs
src/import.rs
src/main.rs
src/player.rs
74 changes: 68 additions & 6 deletions po/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.5.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-01 17:19+0200\n"
"POT-Creation-Date: 2022-08-08 12:47+0200\n"
"PO-Revision-Date: 2022-07-17 22:20+0100\n"
"Last-Translator: vikdevelop <[email protected]>\n"
"Language-Team: CZECH\n"
Expand Down Expand Up @@ -37,28 +37,76 @@ msgstr "Feed"
msgid "Filters"
msgstr "Filtry"

#: data/resources/ui/filter_page.ui:40
#: data/resources/ui/filter_page.ui:43
msgid "Title"
msgstr "Titulek"

#: data/resources/ui/filter_page.ui:45
#: data/resources/ui/filter_page.ui:48
msgid "Channel Name"
msgstr "Název kanálu"

#: data/resources/ui/header_bar.ui:44
msgid "Settings"
msgstr ""

#: data/resources/ui/header_bar.ui:48 data/resources/ui/import_window.ui:8
msgid "Import"
msgstr ""

#: data/resources/ui/header_bar.ui:52
msgid "About"
msgstr "O programu"

#: data/resources/ui/import_window.ui:17
msgid ""
"This will import your subscriptions from exported data from NewPipe or "
"Youtube."
msgstr ""

#: data/resources/ui/import_window.ui:44
msgid "Cancel"
msgstr ""

#: data/resources/ui/preferences_window.ui:9
msgid "General"
msgstr ""

#: data/resources/ui/preferences_window.ui:13
msgid "Programs"
msgstr ""

#: data/resources/ui/preferences_window.ui:16
msgid "Player"
msgstr ""

#: data/resources/ui/preferences_window.ui:25
msgid "Downloader"
msgstr ""

#: data/resources/ui/preferences_window.ui:36
msgid "APIs"
msgstr ""

#: data/resources/ui/preferences_window.ui:37
msgid ""
"For a list of public APIs, see https://github.com/TeamPiped/Piped/wiki/"
"Instances."
msgstr ""

#: data/resources/ui/preferences_window.ui:40
msgid "Piped API"
msgstr ""

#: data/resources/ui/subscription_page.ui:21
#: data/resources/ui/subscription_page.ui:95 data/resources/ui/window.ui:47
#: data/resources/ui/subscription_page.ui:98 data/resources/ui/window.ui:47
msgid "Subscriptions"
msgstr "Odběry"

#: data/resources/ui/subscription_page.ui:56
#: data/resources/ui/subscription_page.ui:59
msgid "Base URL"
msgstr "Základní adresa URL"

#: data/resources/ui/subscription_page.ui:68
#: data/resources/ui/subscription_page.ui:71
msgid "Channel ID or Name"
msgstr "ID nebo název kanálu"

Expand All @@ -83,3 +131,17 @@ msgstr "Došlo k nějaké chybě"
#: src/gui/feed/feed_item_object.rs:88
msgid "%F %T"
msgstr "%F %T"

#: src/gui/import_window.rs:83 src/gui/import_window.rs:114
msgid "Failure to import subscriptions"
msgstr ""

#: src/gui/preferences_window.rs:49
msgid ""
"Note that on Flatpak, there are some more steps required when using a player "
"external to the Flatpak. For more information, please consult the wiki."
msgstr ""

#: src/gui/preferences_window.rs:74
msgid "Overwritten by environmental variable."
msgstr ""
74 changes: 68 additions & 6 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 1.5.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-08-01 17:19+0200\n"
"POT-Creation-Date: 2022-08-08 12:47+0200\n"
"PO-Revision-Date: 2022-03-05 15:52+0100\n"
"Last-Translator: Julian Schmidhuber <[email protected]."
"com>\n"
Expand Down Expand Up @@ -38,28 +38,76 @@ msgstr "Feed"
msgid "Filters"
msgstr "Filter"

#: data/resources/ui/filter_page.ui:40
#: data/resources/ui/filter_page.ui:43
msgid "Title"
msgstr "Titel"

#: data/resources/ui/filter_page.ui:45
#: data/resources/ui/filter_page.ui:48
msgid "Channel Name"
msgstr "Kanal-Name"

#: data/resources/ui/header_bar.ui:44
msgid "Settings"
msgstr "Einstellungen"

#: data/resources/ui/header_bar.ui:48 data/resources/ui/import_window.ui:8
msgid "Import"
msgstr "Importieren"

#: data/resources/ui/header_bar.ui:52
msgid "About"
msgstr "Über"

#: data/resources/ui/import_window.ui:17
msgid ""
"This will import your subscriptions from exported data from NewPipe or "
"Youtube."
msgstr "Dies wird Abonnentens von NewPipe oder Youtube importieren."

#: data/resources/ui/import_window.ui:44
msgid "Cancel"
msgstr "Abbrechen"

#: data/resources/ui/preferences_window.ui:9
msgid "General"
msgstr "Allgemein"

#: data/resources/ui/preferences_window.ui:13
msgid "Programs"
msgstr "Programme"

#: data/resources/ui/preferences_window.ui:16
msgid "Player"
msgstr "Spieler"

#: data/resources/ui/preferences_window.ui:25
msgid "Downloader"
msgstr "Herunterladen"

#: data/resources/ui/preferences_window.ui:36
msgid "APIs"
msgstr "APIs"

#: data/resources/ui/preferences_window.ui:37
msgid ""
"For a list of public APIs, see https://github.com/TeamPiped/Piped/wiki/"
"Instances."
msgstr "Für eine Liste an öffentlichen APIs, siehe https://github.com/TeamPiped/Piped/wiki/Instances."

#: data/resources/ui/preferences_window.ui:40
msgid "Piped API"
msgstr "Piped API"

#: data/resources/ui/subscription_page.ui:21
#: data/resources/ui/subscription_page.ui:95 data/resources/ui/window.ui:47
#: data/resources/ui/subscription_page.ui:98 data/resources/ui/window.ui:47
msgid "Subscriptions"
msgstr "Abonnenten"

#: data/resources/ui/subscription_page.ui:56
#: data/resources/ui/subscription_page.ui:59
msgid "Base URL"
msgstr "URL"

#: data/resources/ui/subscription_page.ui:68
#: data/resources/ui/subscription_page.ui:71
msgid "Channel ID or Name"
msgstr "Kanal Name oder ID"

Expand All @@ -84,3 +132,17 @@ msgstr "Ein Fehler ist aufgetreten"
#: src/gui/feed/feed_item_object.rs:88
msgid "%F %T"
msgstr "%x %T"

#: src/gui/import_window.rs:83 src/gui/import_window.rs:114
msgid "Failure to import subscriptions"
msgstr "Konnte Abbonements nicht importieren"

#: src/gui/preferences_window.rs:49
msgid ""
"Note that on Flatpak, there are some more steps required when using a player "
"external to the Flatpak. For more information, please consult the wiki."
msgstr "Bei Installation mit Flatpak sind außerdem weitere Schritte zur Änderung des Spielers auf ein Programm außerhalb des Flatpaks nötig. Beachten Sie bitte das Wiki."

#: src/gui/preferences_window.rs:74
msgid "Overwritten by environmental variable."
msgstr "Überschrieben von Umgebungsvariable."
Loading

0 comments on commit 7c5c224

Please sign in to comment.