Git Product home page Git Product logo

podcast_search's People

Contributors

amugofjava avatar kbanta11 avatar roeierez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

podcast_search's Issues

What to do with dart-rss?

Hi @amugofjava

As you might remember I use your nice package for the ubuntu app I created

To upgrade musicpod to dart3 and flutter 3.10 I need your package to be updated
To update your package we need dart-rss to be updated
Which I did here https://github.com/Feichtmeier/dart-rss
but the maintainer does not respond and is inactive since years so I doubt this PR will be merged

Since your package is published you can not use a git ref as dep (my fork of dart-rss)
what is your suggestion to do now?

Add episode image to search

Love the ease of use on the library.
Was hoping to get individual image URL if present added to the list too (or am I doing something wrong that I cannot pick it up?).
I think I traced it down to :

episodes.add(Episode.of(
          item.guid,
          item.title,
          item.description,
          item.link,
          Utils.parseRFC2822Date(item.pubDate),
          item.author ?? item.itunes.author,
          item.itunes?.duration,
          item.enclosure?.url,
          item.itunes?.season,
          item.itunes?.episode));

image

Do let me know if this is possible, please. If you have any suggestions otherwise, I am keen to learn that too.

Error parsing search response

For some reason, when I search for the term Jenny, the podcast_search package has an internal error.

My guess is that one of the results in the response has something unexpected (null where it should be String). The StackTrace is pointing to this line.

Example code:

final podcastSearch = Search();
final result = await podcastSearch.search('Jenny');

Example StackTrace:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
#0      Item._fromItunes (package:podcast_search/src/model/item.dart:148:39)
#1      new Item.fromJson (package:podcast_search/src/model/item.dart:120:11)
#2      new SearchResult.fromJson.<anonymous closure> (package:podcast_search/src/model/search_result.dart:85:25)
#3      MappedListIterable.elementAt (dart:_internal/iterable.dart:425:31)
#4      ListIterator.moveNext (dart:_internal/iterable.dart:354:26)
#5      new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27)
#6      new _GrowableList.of (dart:core-patch/growable_array.dart:150:28)
#7      new List.of (dart:core-patch/array_patch.dart:39:18)

Can the top podcasts be paginated?

My question is just that, can the top podcasts be paginated? I don't think podcast_search should take care of the pagination aspect but can we just pass in an offset variable that can be used to get a specific page?

I couldn't find any documentation of that top podcasts api from itunes online so I couldn't confirm if this is even possible? Can you please look this up and let me know? Because it'd be much more useful to get a paginated response from itunes which I can directly use in my app.

Podcast fails to load if pubDate is not present on an item

Hi,
At line 295 of model/podcast.dart, you assert that item.pubDate is not null [assignment of Episode.publicationDate as Utils.parseRFC2822Date(item.pubDate!),],
but the specification indicates that "<pubDate> is an optional sub-element of <item>."
See https://validator.w3.org/feed/docs/rss2.html#hrelementsOfLtitemgt

publicationDate: Utils.parseRFC2822Date(item.pubDate!),

When the code encounters this, it throws an exception when pubDate is not present on an item.

The feeds I am having trouble with publish a DublinCore dc:date field for each item, and the W3C RSS validator recommends that a feed only include one of dc:date and pubDate, since there is no official precedence between the fields.

Thanks!

Duplicate podcasts in response

Description of bug

Hi, thank you for providing this package! It is very handy. I have noticed that in some cases, there is a duplication of podcasts in the response from podcast_search which is not present in the iTunes API response.

Example with podcast_search

Request:

Search().search("Startup Therapy")

Response:
Screenshot 2024-03-07 at 2 57 28 PM

Duplicates (with different collectionId and trackId):
Screenshot 2024-03-07 at 2 59 57 PM

Example with curl & iTunes API

Request:

curl -X GET \
  "https://itunes.apple.com/search?entity=podcast&term=Startup%20Therapy"

Response:

{
  "resultCount": 3,
  "results": [
    {
      "wrapperType": "track",
      "kind": "podcast",
      "collectionId": 1450325643,
      "trackId": 1450325643,
      "artistName": "Startups.com",
      "collectionName": "Startup Therapy",
      "trackName": "Startup Therapy",
      "collectionCensoredName": "Startup Therapy",
      "trackCensoredName": "Startup Therapy",
      "collectionViewUrl": "https://podcasts.apple.com/us/podcast/startup-therapy/id1450325643?uo=4",
      "feedUrl": "https://feeds.transistor.fm/startup-therapy",
      "trackViewUrl": "https://podcasts.apple.com/us/podcast/startup-therapy/id1450325643?uo=4",
      "artworkUrl30": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/f5/ea/ec/f5eaec73-76fb-f051-2b9e-6ac3f32ad2df/mza_12740194947879630385.jpg/30x30bb.jpg",
      "artworkUrl60": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/f5/ea/ec/f5eaec73-76fb-f051-2b9e-6ac3f32ad2df/mza_12740194947879630385.jpg/60x60bb.jpg",
      "artworkUrl100": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/f5/ea/ec/f5eaec73-76fb-f051-2b9e-6ac3f32ad2df/mza_12740194947879630385.jpg/100x100bb.jpg",
      "collectionPrice": 0.0,
      "trackPrice": 0.0,
      "collectionHdPrice": 0,
      "releaseDate": "2024-03-04T10:00:00Z",
      "collectionExplicitness": "notExplicit",
      "trackExplicitness": "cleaned",
      "trackCount": 248,
      "trackTimeMillis": 1912,
      "country": "USA",
      "currency": "USD",
      "primaryGenreName": "Business",
      "contentAdvisoryRating": "Clean",
      "artworkUrl600": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/f5/ea/ec/f5eaec73-76fb-f051-2b9e-6ac3f32ad2df/mza_12740194947879630385.jpg/600x600bb.jpg",
      "genreIds": ["1321", "26"],
      "genres": ["Business", "Podcasts"]
    },
    {
      "wrapperType": "track",
      "kind": "podcast",
      "collectionId": 1049614170,
      "trackId": 1049614170,
      "artistName": "Kyle Meades",
      "collectionName": "Speech Therapy Private Practice Startup Podcast",
      "trackName": "Speech Therapy Private Practice Startup Podcast",
      "collectionCensoredName": "Speech Therapy Private Practice Startup Podcast",
      "trackCensoredName": "Speech Therapy Private Practice Startup Podcast",
      "collectionViewUrl": "https://podcasts.apple.com/us/podcast/speech-therapy-private-practice-startup-podcast/id1049614170?uo=4",
      "feedUrl": "https://www.privateslp.com/feed/podcast/",
      "trackViewUrl": "https://podcasts.apple.com/us/podcast/speech-therapy-private-practice-startup-podcast/id1049614170?uo=4",
      "artworkUrl30": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/3b/68/6e/3b686ede-640e-b4c5-414d-1a518743f1c6/mza_11185660219265413148.jpg/30x30bb.jpg",
      "artworkUrl60": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/3b/68/6e/3b686ede-640e-b4c5-414d-1a518743f1c6/mza_11185660219265413148.jpg/60x60bb.jpg",
      "artworkUrl100": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/3b/68/6e/3b686ede-640e-b4c5-414d-1a518743f1c6/mza_11185660219265413148.jpg/100x100bb.jpg",
      "collectionPrice": 0.0,
      "trackPrice": 0.0,
      "collectionHdPrice": 0,
      "releaseDate": "2020-06-14T17:47:00Z",
      "collectionExplicitness": "notExplicit",
      "trackExplicitness": "cleaned",
      "trackCount": 50,
      "trackTimeMillis": 2292,
      "country": "USA",
      "currency": "USD",
      "primaryGenreName": "Business",
      "contentAdvisoryRating": "Clean",
      "artworkUrl600": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts115/v4/3b/68/6e/3b686ede-640e-b4c5-414d-1a518743f1c6/mza_11185660219265413148.jpg/600x600bb.jpg",
      "genreIds": ["1321", "26", "1304", "1500"],
      "genres": ["Business", "Podcasts", "Education", "Self-Improvement"]
    },
    {
      "wrapperType": "track",
      "kind": "podcast",
      "collectionId": 1491615628,
      "trackId": 1491615628,
      "artistName": "Startups.com",
      "collectionName": "Startup Therapy",
      "trackName": "Startup Therapy",
      "collectionCensoredName": "Startup Therapy",
      "trackCensoredName": "Startup Therapy",
      "collectionViewUrl": "https://podcasts.apple.com/us/podcast/startup-therapy/id1491615628?uo=4",
      "feedUrl": "https://feeds.transistor.fm/startup-therapy",
      "trackViewUrl": "https://podcasts.apple.com/us/podcast/startup-therapy/id1491615628?uo=4",
      "artworkUrl30": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/86/7b/2e/867b2eb1-be68-6db2-b77b-4b16e8971297/mza_17708346996430747403.jpg/30x30bb.jpg",
      "artworkUrl60": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/86/7b/2e/867b2eb1-be68-6db2-b77b-4b16e8971297/mza_17708346996430747403.jpg/60x60bb.jpg",
      "artworkUrl100": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/86/7b/2e/867b2eb1-be68-6db2-b77b-4b16e8971297/mza_17708346996430747403.jpg/100x100bb.jpg",
      "collectionPrice": 0.0,
      "trackPrice": 0.0,
      "collectionHdPrice": 0,
      "releaseDate": "2024-03-04T10:00:00Z",
      "collectionExplicitness": "notExplicit",
      "trackExplicitness": "cleaned",
      "trackCount": 248,
      "trackTimeMillis": 1912,
      "country": "USA",
      "currency": "USD",
      "primaryGenreName": "Business",
      "contentAdvisoryRating": "Clean",
      "artworkUrl600": "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/86/7b/2e/867b2eb1-be68-6db2-b77b-4b16e8971297/mza_17708346996430747403.jpg/600x600bb.jpg",
      "genreIds": ["1321", "26"],
      "genres": ["Business", "Podcasts"]
    }
  ]
}

France podcast charts exception if limit too high

For some countries like france (lol) the charts errors out with

flutter: media_kit: WARNING: package:media_kit_native_event_loop not found.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
#0      List.[] (dart:core-patch/growable_array.dart:264:36)
#1      ITunesSearch._chartsToResults
itunes_search.dart:177
<asynchronous suspension>
#2      ITunesSearch.charts
itunes_search.dart:151
<asynchronous suspension>
#3      PodcastService.search
podcast_service.dart:34
<asynchronous suspension>

when the limit is too high
Limit on 50 20 is okay :D but above 20 is too much.

Should this be handled on my side or is this indeed to handle here?

Best regards 👋

[BUG]: Bad request on loading feed from url

what happened ?

I have created complete podcast player base on this package but from last week I got Bad Request exception and it dosent load from feed of the podcast , its not matter which! not every podcast load from feed url and episodes not showing

steps to produce of bug

my provider function which load podcast from feed URL

 Future<podcast.Podcast> loadPodcastFromFeed({required String feedUrl}) async {
    return await podcast.Podcast.loadFeed(url: feedUrl);
  }

this is where I got bad request

details

. flutter : 3.16.5
. podcast_search: ^0.6.1

Chapter parser needs to handle variations in data format

The chapters parser will return an empty set of chapters if the JSON file does not match the spec exactly. Whilst chapters should match the spec the parser needs to be tollerant of small variations; specifically handling JSON files that are reported as text/plain rather than application/json and handling numerical time values that are presented as a String.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.