amugofjava / podcast_search

A simple library providing programmatic access to the iTunes search API for podcasts.
MIT License
41 stars 26 forks source link

Null-safety migration #9

Closed ripetrescu closed 3 years ago

ripetrescu commented 3 years ago

Is there any plan to migrate to the new null-safety dart? Thanks!

amugofjava commented 3 years ago

Hi @ripetrescu,

Yes, I do plan to migrate to the new null safety and I have begun working on this. Thanks.

ripetrescu commented 3 years ago

Hi,

Thank you. Looking forward for this update.

Best, Rares

ripetrescu commented 3 years ago

Sorry, I wrongly "closed" this issue :)

ripetrescu commented 3 years ago

Hi @amugofjava

I know you are busy, but do you have any updates on this? :)

Thanks you!

amugofjava commented 3 years ago

Hi @ripetrescu,

Yes, sorry it's taking me so long. I wanted to review all the code and reduce the number of nullable items rather than just letting the migration tool run and make everything either ? or |. I have pushed a new branch for the null-safety work so you can see where I am. I have made some manual changes, run the migration tool and all unit tests pass. If you have any comments or feedback that would be great.

ripetrescu commented 3 years ago

@amugofjava just checked on my project using the feature/null-safety branch and so far so good. :)

Thank you!

amugofjava commented 3 years ago

That's great. Once I have completed my testing, and if all is OK, I'll push to master and a new package to pub.dev.

amugofjava commented 3 years ago

Hi @ripetrescu,

How are you getting on with the null safe version of podcast_search? Everything still working OK? Thanks.

Nirajn2311 commented 3 years ago

Hi, any update on this?

srihariash999 commented 3 years ago

hi @amugofjava I am using the null-safety branch and there are a few issues. Some podcasts keep getting timed out while getting episodes this was not there in the older version without null safety.

Can you give us any update on the null-safety migration?

amugofjava commented 3 years ago

Thanks for the feedback @srihariash999 - do you have any examples of podcasts that are timing out? Will the same podcast episode(s) timeout consistently or is it more random? I was planning of merging this branch into master but if there are issues I will spend some more time digging into them first.

srihariash999 commented 3 years ago

@amugofjava it is one or two specific podcasts as far as I can tell. But they almost always do.

'The Ben shapiro show' is one example. So might this be an issue from itunes?

amugofjava commented 3 years ago

Hi @srihariash999,

The issue with this show is that the RSS feed URL is missing from the iTunes search result. If I repeat the search using PodcastIndex I get the feed & episodes. Bit odd - not sure why the feed would be missing from iTunes. Do you have a few more examples I could try to see if this is the same issue for all of them?

Digging around I can see several comments about iTunes API missing the RSS feed in some results. Not sure if this is a glitch or a result of the new Apple Connect and all its problems.

srihariash999 commented 3 years ago

@amugofjava I was viewing random ones and there was one more. But i dont remember the name sorry, I'll let you know if i find it again.

srihariash999 commented 3 years ago

@amugofjava Found another one called 'Podcast | Matt Walsh' which is giving an error. But I suspect this is a diffrent story.

This one (for reference)

image

srihariash999 commented 3 years ago

Hi @amugofjava I found another with Timeout exception, like the Ben Shapiro one.

This is called 'Femmes puissantes'. Hopefully this will also have the same feed missing error.

Edit: Found one more named 'La Filière'

amugofjava commented 3 years ago

Hi @srihariash999,

The Matt Walsh one loads fine for me - what error are you getting?

The 'Femmes puissantes' is the same issue as before: no feed URL. This is the query podcast_search is sending to iTunes:

https://itunes.apple.com/search?term=Femmes%20puissantes&limit=10&explicit=No&media=podcast&entity=podcast

This returns two results and the first is missing feedUrl.

And the same for La Filière:

https://itunes.apple.com/search?term=La%20Fili%C3%A8re&limit=10&explicit=No&media=podcast&entity=podcast

This is a bit concerning. I will have to do some more digging into this issue; however, I think I am OK to proceed with getting this release out so I will try and merge to master soon and push to pub.dev.

srihariash999 commented 3 years ago

THis is the error in 'Podcast | Matt Walsh' : Instance of 'PodcastFailedException'

@amugofjava I am unable to get a message from this exception.

amugofjava commented 3 years ago

Could you send me a reproducible example @srihariash999? I haven't been able to reproduce this one so far. Thanks.

srihariash999 commented 3 years ago

https://themattwalshblog.com/category/podcast/feed/ This is the feedUrl I am getting from the podcast that has issues.

Podcast _podcast = Podcast.loadFeed(url: feedUrl);

I am just calling loadFeed on this url. This is in this one podcast, if not reproducible, I think you can ignore this one and merge.

amugofjava commented 3 years ago

Thanks @srihariash999. I haven't been able to reproduce this one. I'll keep testing but will go ahead and merge & push to pub.dev.

Thanks for the feedback.