enderahmetyurt / podiscover Goto Github PK
View Code? Open in Web Editor NEWFind your next podcast
Home Page: https://www.podiscover.me
Find your next podcast
Home Page: https://www.podiscover.me
url = "https://itunes.apple.com/search?term=uretim-bandi&media=podcast"
{
"resultCount":1,
"results":[
{
"wrapperType":"track",
"kind":"podcast",
"artistId":1266070581,
"collectionId":1316366757,
"trackId":1316366757,
"artistName":"Üretim Bandı",
"collectionName":"Üretim Bandı",
"trackName":"Üretim Bandı",
"collectionCensoredName":"Üretim Bandı",
"trackCensoredName":"Üretim Bandı",
"artistViewUrl":"https://podcasts.apple.com/us/artist/g%C3%BCmlet/1266070581?uo=4",
"collectionViewUrl":"https://podcasts.apple.com/us/podcast/%C3%BCretim-band%C4%B1/id1316366757?uo=4",
"feedUrl":"https://www.spreaker.com/show/2760879/episodes/feed",
"trackViewUrl":"https://podcasts.apple.com/us/podcast/%C3%BCretim-band%C4%B1/id1316366757?uo=4",
"artworkUrl30":"https://is3-ssl.mzstatic.com/image/thumb/Podcasts125/v4/4b/5a/d0/4b5ad056-55b8-f076-c8b8-3e451a3de6bc/mza_3670159721073446755.jpg/30x30bb.jpg",
"artworkUrl60":"https://is3-ssl.mzstatic.com/image/thumb/Podcasts125/v4/4b/5a/d0/4b5ad056-55b8-f076-c8b8-3e451a3de6bc/mza_3670159721073446755.jpg/60x60bb.jpg",
"artworkUrl100":"https://is3-ssl.mzstatic.com/image/thumb/Podcasts125/v4/4b/5a/d0/4b5ad056-55b8-f076-c8b8-3e451a3de6bc/mza_3670159721073446755.jpg/100x100bb.jpg",
"collectionPrice":0.00,
"trackPrice":0.00,
"collectionHdPrice":0,
"releaseDate":"2023-04-13T05:15:00Z",
"collectionExplicitness":"notExplicit",
"trackExplicitness":"cleaned",
"trackCount":221,
"trackTimeMillis":2496,
"country":"USA",
"currency":"USD",
"primaryGenreName":"Technology",
"contentAdvisoryRating":"Clean",
"artworkUrl600":"https://is3-ssl.mzstatic.com/image/thumb/Podcasts125/v4/4b/5a/d0/4b5ad056-55b8-f076-c8b8-3e451a3de6bc/mza_3670159721073446755.jpg/600x600bb.jpg",
"genreIds":[
"1318",
"26"
],
"genres":[
"Technology",
"Podcasts"
]
}
]
}
Whenever FetchUserPodcasts.perform_async(user.id, auth)
method fails, even though the user is successfully saved into database we are throwing error. An begin rescue ensure can be useful here in my opinion.
Flipper should be a good option.
We can show a tooltip that includes name of the likers of the episode.
User1 likes podcast1
we can add something like this to activites.
We can search a podcast, an episode or a user with a keyword.
Some words are needed to update.
38 people subscribe this podcast
Subscribes by
subscribes 32 podcasts
Currently I am fetching categories with running a script manuelly. It would better if we can make it automatic.
heroku run rails c --app podiscover
Podcast.all.select{|podcast| podcast.categories.count == 0 }.map(&:name)
Podcast.all.select{|podcast| podcast.categories.count == 0 }.map(&:uid)
me
look Headers, and find authorization, get Bearer tokenPodcast.all.select{|podcast| podcast.categories.empty?}.map(&:uid)
category = Category.find(45)
Podcast.all.select{|podcast| podcast.categories.empty?}.map(&:uid)
# podcast_genre.rb
require 'rest-client'
require 'json'
podcasts = []
TOKEN = "YOUR_TOKEN"
result = []
podcasts.each do |podcast|
url = "https://api-partner.spotify.com/pathfinder/v1/query?operationName=queryShowMetadataV2&variables=%7B%22uri%22%3A%22spotify%3Ashow%3A#{podcast}%22%7D&extensions=%7B%22persistedQuery%22%3A%7B%22version%22%3A1%2C%22sha256Hash%22%3A%22ce8932842e049a5ee1e9b0390506c6cd7310a6d6b421efb02b46497ace4026f1%22%7D%7D"
response = RestClient.get url, {:Authorization => "Bearer #{TOKEN}"}
if JSON.parse(response.body)["data"]["podcastUnionV2"]["topics"]
items = JSON.parse(response.body)["data"]["podcastUnionV2"]["topics"]["items"]
result << { uid: podcast, genres: items }
puts podcast
puts items
puts "------------------------------------------"
else
puts "No topics for #{podcast}"
end
end;nil
Podcast.all.select{|podcast| podcast.categories.empty?}.map(&:uid)
category = Category.find(45)
Podcast.where(uid: uids).each do |podcast|
podcast.categories << category if podcast.categories.empty?
end
Podcast.all.each do |podcast|
if podcast.categories.count > 1 && podcast.categories.include?(category)
puts "Podcast #{podcast.uid}"
end
end; nil
category = Category.where(name: "Unknown").first
Podcast.all.select do |podcast|
if podcast.categories.empty?
puts "Podcast #{podcast.name} has no categories"
podcast.categories << category
end
end
Podcast.all.select{|podcast| podcast.categories.count == 0 }.map(&:name)
Both can be cached.
Send newsletter to users when the podcasts that they follow have a new episode.
To Podcast card we can add the language of the podcast.
Some podcasts have more than two languages episodes. For now we don't need to think about it.
Categories section could has filters like "country" and "language". So we can see which podcasts are the most popular in Germany or in Egypt.
User can add some tags to their profiles.
I mean. Tags might be from podcasts' categories. In that way, I think we can understand which users can like to listen which podcasts.
Spotify episode list endpoint generally returns episode list order by date ascending, but for some of podcasts it acts the opposite.
Meksika Açmazı podcast is a good example for this situation.
Adding instagram and medium blog accounts' links to the footer.
instagram: https://instagram.com/podiscoverme
blog: blog.podiscover.me
We can add a pagination to feed page. It would be like subscriptions page.
Using ruby:3.2.2-alpine
instead of ruby:3.2.2
would be applied to reduce the image size as current image size is 454.55 MB.
Previously I had configured .env file locally and just running docker-compose up
and db:create & db:migrate then I could access to the application. I have created a branch for working version of docker-compose I implemented: fix-docker.
@enderahmetyurt can you try to use docker-compose locally. Otherwise people won't be able to have a easy onboarding for contribution.
Shouldn’t each iteration increment the offset by 50 (given the limit is 50) instead of 1?
We can show 10 podcast epsiodes as a list on the rightside bar.
When Tweet an episode show page link, we need to show up Twitter card.
Add a like and a dislike button to a episode. We can show number of likes. We don't need to show number of dislikes.
As a user I would like to have my profile path as /users/:username rather than /users/:id.
requirements
An user can add podcast or podcast episodes to their bookmarks.
We need to set continuous integration.
When a new user is created, it should be appeared on activities list.
When I try login on http://podiscover.me/ I get INVALID_CLIENT: Invalid redirect URI
Payload
client_id: a...b
redirect_uri: http://podiscover.me/users/auth/spotify/callback
response_type: code
scope: user-read-email user-library-read user-read-playback-position
state: 075...88e
A user can share their profile in social media. I think, we need a user card. It can include user profile name, etc and their top podcast. These top podcast can voted by the user theirself.
I guess when we deploy this #26 this PR we can focus this.
I believe this would be a good feature for users. They can share their profile, and if we generate an embedded code, they can put it to their web sites.
I can't see much data to test some features or to do some development ideas, tests etc. Is there a possible way to increase the data amount?
I think using this docker-compose.yml will be enough to run on production. This can be documented no need to add some files in my opinion:
version: '3'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_USER: myuser
POSTGRES_PASSWORD: mypassword
POSTGRES_DB: mydatabase
volumes:
- ./postgres-data:/var/lib/postgresql/data
redis:
image: redis
restart: always
podiscover:
image: eaydev/podiscover:e41c7ab311fb7334d6249daf307206293d7c56a1
environment:
REDIS_URL: redis://redis:6379/1
RAILS_ENV: production
RACK_ENV: production
depends_on:
- redis
volumes:
bundle:
image: eaydev/podiscover:latest
can also be used for latest image.http://www.podiscover.me/podcasts/38/episodes/130806
See on spotify is overlapping with text. There is 2 more possible duplicate errors:
https://github.com/search?q=repo%3Aenderahmetyurt%2Fpodiscover+%22%3ESee+on+Spotify%3C%22&type=code
Run COVERAGE=true bundle exec rspec --require rails_helper
...................F................
Failures:
1) Podcast#search show no podcast found message if any podcast not found by query
Failure/Error: <%= link_to podcast_path(podcast) do %>
ActionView::Template::Error:
No route matches {:action=>"show", :controller=>"podcasts", :id=>nil}, missing required keys: [:id]
# ./app/views/shared/_rightbar.html.erb:9:in `_app_views_shared__rightbar_html_erb___3879654349936865782_101740'
# ./app/views/podcasts/search.html.erb:45:in `_app_views_podcasts_search_html_erb__156977749[12](https://github.com/enderahmetyurt/podiscover/actions/runs/5700453725/job/15450344274#step:9:13)0753341_102180'
# ./spec/requests/podcasts_request_spec.rb:36:in `block (3 levels) in <main>'
# ------------------
# --- Caused by: ---
# ActionController::UrlGenerationError:
# No route matches {:action=>"show", :controller=>"podcasts", :id=>nil}, missing required keys: [:id]
# ./app/views/shared/_rightbar.html.erb:9:in `_app_views_shared__rightbar_html_erb___3879654349936865782_10[17](https://github.com/enderahmetyurt/podiscover/actions/runs/5700453725/job/15450344274#step:9:18)40'
Finished in 1.71 seconds (files took 3 seconds to load)
36 examples, 1 failure
Failed examples:
rspec ./spec/requests/podcasts_request_spec.rb:35 # Podcast#search show no podcast found message if any podcast not found by query
Some podcasts don't have any categories. We matched them to our Unknown
named category. Unknown
looks a bit weird. Other
would look better.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.