-
-
-
-
-
+ {{template "navbar" .}}
+
+
+
+
Add using the direct link to rss feed
+
-
-
-
-{{template "scripts"}}
+ {{template "scripts"}}
-
-
\ No newline at end of file
+ var self = this;
+ self.searching = true;
+ axios
+ .get("/search?q=" + this.query)
+ .then(function (response) {
+ self.results = response.data;
+ })
+ .catch(function (error) {})
+ .then(function () {
+ self.searching = false;
+ });
+ },
+ addPodcastManual: function (e) {
+ e.preventDefault();
+ if (!this.url) {
+ return;
+ }
+ this.addPodcast({ url: this.url });
+ },
+ addPodcast: function (item) {
+ // console.log(item);
+ var self = this;
+ self.searching = true;
+ axios
+ .post("/podcasts", {
+ url: item.url,
+ })
+ .then(function (response) {
+ Vue.toasted.show("Podcast added successfully.", {
+ theme: "bubble",
+ position: "top-right",
+ duration: 5000,
+ });
+ item.already_saved = true;
+ })
+ .catch(function (error) {
+ if (error.response) {
+ Vue.toasted.show(error.response.data?.message, {
+ theme: "bubble",
+ position: "top-right",
+ duration: 5000,
+ });
+ }
+ })
+ .then(function () {
+ self.searching = false;
+ self.url = "";
+ });
+ return false;
+ },
+ },
+ });
+
+
+