rmcrackan / Libation

Libation: Liberate your Library
GNU General Public License v3.0
2.52k stars 137 forks source link

Podcast Series Order #600

Closed AshbyGeek closed 1 year ago

AshbyGeek commented 1 year ago

Is your feature request related to a problem? Please describe. Podcasts play from newest to oldest in the audible app, I want to play it the other way around so I thought I would download the episodes I haven't listened to yet (I've previously downloaded some of the podcast for archival purposes). Unfortunately, the 'series order' numbers are not reliable in this scenario. The oldest episode is currently labeled as episode 90 and the newest is episode 1. Since I'm using the series number in the name to differentiate, this means my books folder has multiple 'episode 1s' listed, since I downloaded them on different dates.

Describe the solution you'd like Reverse the series order number of podcasts so that they will remain consistent as new episodes are published.

Describe alternatives you've considered

Additional context I only have one podcast in the audible app, so it's possible that this is a problem unique to this podcast. If so, the podcast is Harry Potter and the Methods of Rationality and my proposed solutions will probably be inadequate.

Mbucari commented 1 year ago

@AshbyGeek Thanks for the detailed issue and your suggestions!

First of all, this problem is caused by Audible (or the podcast author/publisher). They've chosen to make the most recent episode #1, and then increment backwards. I doubt it's unique to this podcast, but it's not universal.

Replace Audible's series order date with one derived from publication date.

That's an interesting idea. At least moving forward, series numbers may be more accurate. The only problem I see is that the publication date may be missing for some queried items. If that happens, then what?

@rmcrackan What do you think?

https://github.com/rmcrackan/Libation/issues/426

I really would like to make that feature, but it's fraught. If you begin remaining and suddenly one of the files has the same path/name as another file, what do you do? Give it a temp name until you that other file is renamed, the go back and rename it? That can get very hard to juggle correctly.

Maybe create a temporary books folder and move/rename all files into it, then move all files back to the main books folder? Maybe, but then you're running into potential problems like:

And then we have the problem of file locks. This is only a problem on Windows, but services like the search indexer and cloud folder sync may lock some files and prevent renaming/moving. Then what? Just leave the mess for the user to clean up?

Complain loud and long to audible that they aren't doing their podcasts right.

Deaf ears, my friend.


So I'm sorry to say, I think re-downloading is going to be your only option here.

rmcrackan commented 1 year ago

@Mbucari

That's an interesting idea. At least moving forward, series numbers may be more accurate. The only problem I see is that the publication date may be missing for some queried items. If that happens, then what?

Audible is a terrible steward of metadata, especially for less popular titles. Fixing their failings is sisyphean -- there's always one more (and Libation has many years of such fixes to prove it). This firmly falls into the category of: if you find it an interesting challenge to solve then go for it but it's not our job to fix.

A generalized solution would be for column ascending/descending sorting to apply within the podcast. That way the user can sort by release date ascending/descending and see whichever way they want. If no release date is given by audible, I imagine the default comparer will just clump them as DateTime.MinValue.

RE #426 -- I love this in theory. In practice, it's filled with all the problems you mention and so many more. Bulk file management is a logistical minefield.

CharlieRussel commented 1 year ago

Re: 426. Don't go there. Applications that try to manage the file system on Windows are doomed to problems and sorrow. BTDT, got the t-shirt.

OTOH, trying to help Audible with their metadata issues is, while fraught, not likely to make things worse. (I doubt it's possible, frankly. ). And having some way to fix sort order in podcasts would be a boon. Though it won't fix "filename too long" problems with Quirks & Quarks, I'm afraid.

Charlie. (he/him/his)

Sent from Outlookhttps://aka.ms/qtex0l on my phone. Please excuse any terseness or Autocorrect typos.


From: rmcrackan @.> Sent: Tuesday, May 16, 2023 8:43:02 AM To: rmcrackan/Libation @.> Cc: Subscribed @.***> Subject: Re: [rmcrackan/Libation] Podcast Series Order (Issue #600)

@Mbucarihttps://github.com/Mbucari

That's an interesting idea. At least moving forward, series numbers may be more accurate. The only problem I see is that the publication date may be missing for some queried items. If that happens, then what?

Audible is a terrible steward of metadata, especially for less popular titles. Fixing their failings is sisyphean -- there's always one more (and Libation has many years of such fixes to prove it). This firmly falls into the category of: if you find it an interesting challenge to solve then go for it but it's not our job to fix.

A generalized solution would be for column ascending/descending sorting to apply within the podcast. That way the user can sort by release date ascending/descending and see whichever way they want. If no release date is given by audible, I imagine the default comparer will just clump them as DateTime.MinValue.

RE #426https://github.com/rmcrackan/Libation/issues/426 -- I love this in theory. In practice, it's filled with all the problems you mention and so many more. Bulk file management is a logistical minefield.

— Reply to this email directly, view it on GitHubhttps://github.com/rmcrackan/Libation/issues/600#issuecomment-1549920925, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFAHCRBOZ4EXI2RWVZ72VY3XGOOANANCNFSM6AAAAAAX75YTCU. You are receiving this because you are subscribed to this thread.Message ID: @.***>

AshbyGeek commented 1 year ago

I haven't looked too hard into Libation's code, how hard would it be to add a per-podcast option to reverse the episode order? That way we could dump the inconsistent metadata problem on the end-user.

Alternatively we could add both a 'reversed series #' tag to those available in the custom file naming settings, and a per-series custom file naming overide. Again, haven't looked at the code yet so I don't have any idea how hard such changes are; I'm just trying to think of alternative solutions.

AshbyGeek commented 1 year ago

I'll post some more replies on #426 for your comments that are more related to that issue.

AshbyGeek commented 1 year ago

Also, I've asked the creator of this particular podcast if there's a way for him to correct the episode ordering issue using his publish tools.

Mbucari commented 1 year ago

how hard would it be to add a per-podcast option to reverse the episode order?

Not sure yet. Are we talking about an operation performed at the time a file is written, not when the podcasts are imported in the library? So no DB modifications and the main display still shows the original titles?

@rmcrackan I'd been thinking about plugins, and I know you'd mentioned them before too. I could never get passed the questions of what scope to provide the plugin environment, but file naming/writing might be a really good place to start. Let plugins override things like filenames and write events.

Mbucari commented 1 year ago

@AshbyGeek Version 10.3.0 is live. After you next scan your library you'll see that episodes are numbered chronologically.

rmcrackan commented 1 year ago

After you next scan your library you'll see that episodes are numbered chronologically.

Does is still do a full scan if there are no changes to Books?

rmcrackan commented 1 year ago

Maybe Hangover needs a re-index button for times like this

Mbucari commented 1 year ago

Does is still do a full scan if there are no changes to Books?

Yes. The full lubrary is re-imported after every full library scan, and the display grid is updated.

rmcrackan commented 1 year ago

But the search engine isn't re-indexed unless the database saves changes:

https://github.com/rmcrackan/Libation/blob/9372a7318bf510c7b5c5083b7922f92c7950d792/Source/ApplicationServices/LibraryCommands.cs#L324-L325

https://github.com/rmcrackan/Libation/blob/9372a7318bf510c7b5c5083b7922f92c7950d792/Source/AppScaffolding/LibationScaffolding.cs#L274

Mbucari commented 1 year ago

But the search engine isn't re-indexed unless the database saves changes:

You're right, search won't re-index unless there's a new library book added. But the db is updated, so the grid display and file naming will reflect the new series numbering.

Mbucari commented 1 year ago

@rmcrackan This is a bit out of scope for this issue, but since we're already here.. Maybe we should add a diff function to the importer and re-index if the library changed.

Mbucari commented 1 year ago

@rmcrackan Nevermind, all is ok!

https://github.com/rmcrackan/Libation/blob/9372a7318bf510c7b5c5083b7922f92c7950d792/Source/ApplicationServices/LibraryCommands.cs#L320-L325

qtyChanges tracks all changes, not just new books

AshbyGeek commented 1 year ago

@AshbyGeek Version 10.3.0 is live. After you next scan your library you'll see that episodes are numbered chronologically.

Thanks! Worked like a charm. :)

CLHatch commented 1 year ago

I just downloaded a few podcasts (the sort that are more like a series of audiobooks), and the numbering was all over the place. One of them, they were all reversed (there are 8 episodes, episode 8 was listed as 1 in the metadata, and episode 1 was listed as 8), and another, it appeared to be random. HOWEVER, looking at the .metadata.json file, I found they also include a sort item. I'm guessing they don't even use the episode item themselves, and instead use the sort item. Perhaps Libation should "fix" the metadata using that?

Here's an example of "Episode 1" of "Alien: Out of the Shadows":

{
  "asin": "B08GCBT584",
  "asset_details": [],
  "authors": [
    {
      "asin": "B001IU0D3U",
      "name": "Tim Lebbon"
    },
    {
      "asin": "B07RJ1RB8T",
      "name": "Dirk Maggs"
    }
  ],
  "available_codecs": [
    {
      "enhanced_codec": "format4",
      "format": "Format4",
      "is_kindle_enhanced": false,
      "name": "format4"
    },
    {
      "enhanced_codec": "LC_128_44100_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_44_128"
    },
    {
      "enhanced_codec": "LC_64_44100_stereo",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "aax_44_64"
    },
    {
      "enhanced_codec": "mp444128",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_44_128"
    },
    {
      "enhanced_codec": "mp44464",
      "format": "Enhanced",
      "is_kindle_enhanced": true,
      "name": "mp4_44_64"
    },
    {
      "enhanced_codec": "aax",
      "format": "Enhanced",
      "is_kindle_enhanced": false,
      "name": "aax"
    }
  ],
  "category_ladders": [
    {
      "ladder": [
        {
          "id": "18580606011",
          "name": "Science Fiction & Fantasy"
        },
        {
          "id": "18580607011",
          "name": "Fantasy"
        },
        {
          "id": "18580614011",
          "name": "Dramatizations"
        }
      ],
      "root": "Genres"
    },
    {
      "ladder": [
        {
          "id": "18580606011",
          "name": "Science Fiction & Fantasy"
        },
        {
          "id": "18580628011",
          "name": "Science Fiction"
        },
        {
          "id": "18580634011",
          "name": "Dramatizations"
        }
      ],
      "root": "Genres"
    },
    {
      "ladder": [
        {
          "id": "18580606011",
          "name": "Science Fiction & Fantasy"
        },
        {
          "id": "18580628011",
          "name": "Science Fiction"
        },
        {
          "id": "18580636011",
          "name": "First Contact"
        }
      ],
      "root": "Genres"
    }
  ],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "customer_reviews": [
    {
      "asin": "B08GCBT584",
      "author_id": "amzn1.account.AG4X62VGE4ESSOOUYM3ILPN5CJIQ",
      "body": "good one.Had a very different experience on listening to the audiobook.overall i enjoyed the audiobook",
      "format": "Freeform",
      "id": "358bafa79d3443969803baf4bebe2c9c",
      "ratings": {
        "overall_rating": 4,
        "performance_rating": 3,
        "story_rating": 2
      },
      "review_content_scores": {
        "content_quality": 50,
        "num_helpful_votes": 0,
        "num_unhelpful_votes": 0
      },
      "submission_date": "2023-01-12T07:33:25Z",
      "title": "Good"
    },
    {
      "asin": "B08GCBT584",
      "author_id": "amzn1.account.AGEXCW6CONJKRGKQJUXPILMNOECQ",
      "author_name": "Jesse",
      "body": "This is just so good. I cannot even see how good this is. If you like the alien movie, he will like this.  ",
      "format": "Freeform",
      "id": "d13a1fd9f6404c2f83143ba9e579828c",
      "location": "",
      "ratings": {
        "overall_rating": 5,
        "performance_rating": 5,
        "story_rating": 5
      },
      "review_content_scores": {
        "content_quality": 50,
        "num_helpful_votes": 0,
        "num_unhelpful_votes": 0
      },
      "submission_date": "2023-01-04T17:44:02Z",
      "title": "Wow"
    },
    {
      "asin": "B08GCBT584",
      "author_id": "amzn1.account.AEKL6AT7DOOSZNADZU7MEYR24W2A",
      "body": "good one.Had a very different experience on listening to the audiobook.overall i enjoyed the audiobook",
      "format": "Freeform",
      "id": "ca21496f99f54017b9f85f5de37808c4",
      "ratings": {
        "overall_rating": 4,
        "performance_rating": 4,
        "story_rating": 4
      },
      "review_content_scores": {
        "content_quality": 50,
        "num_helpful_votes": 0,
        "num_unhelpful_votes": 0
      },
      "submission_date": "2022-09-29T08:34:43Z",
      "title": "good"
    }
  ],
  "episode_number": 6,
  "episode_type": "full",
  "format_type": "original_recording",
  "has_children": false,
  "is_adult_product": false,
  "is_listenable": true,
  "is_purchasability_suppressed": true,
  "is_vvab": false,
  "issue_date": "2018-12-07",
  "language": "english",
  "merchandising_summary": "<p>Unconscious, unaware, Ripley is the last human survivor of the Nostromo, her shuttle lost in deep space....</p>",
  "narrators": [
    {
      "asin": "B0C9MBM8ZJ",
      "name": "Rutger Hauer"
    },
    {
      "name": "Corey Johnson"
    },
    {
      "name": "Matthew Lewis"
    },
    {
      "asin": "B0C9M9XN4S",
      "name": "Kathryn Drysdale"
    },
    {
      "name": "Andrea Deck"
    },
    {
      "name": "Mac McDonald"
    }
  ],
  "plans": [
    {
      "end_date": "2099-12-31T00:00:00Z",
      "plan_name": "US Minerva",
      "start_date": "2020-08-20T19:13:00.00013Z"
    }
  ],
  "price": {},
  "product_images": {
    "500": "https://m.media-amazon.com/images/I/51qUUcL9noL._SL500_.jpg"
  },
  "program_participation": "Audible Original",
  "publication_datetime": "2018-12-07T00:00:00Z",
  "publisher_name": "Audible Originals",
  "publisher_summary": "<p>Unconscious, unaware, Ripley is the last human survivor of the Nostromo, her shuttle lost in deep space. Meanwhile, the crew aboard the mining ship Marion, faces a catastrophic collision with one of its own dropships and has to contend with the alien infestation on board.</p> <p>Marooned in a decaying orbit above the planetoid LV-178, the crew struggle to tackle the threat at hand, when an unexpected visitor makes her presence known.</p>",
  "rating": {
    "num_reviews": 10,
    "overall_distribution": {
      "average_rating": 4.741573033707865,
      "display_average_rating": "4.7",
      "display_stars": 4.5,
      "num_five_star_ratings": 72,
      "num_four_star_ratings": 12,
      "num_one_star_ratings": 0,
      "num_ratings": 89,
      "num_three_star_ratings": 4,
      "num_two_star_ratings": 1
    },
    "performance_distribution": {
      "average_rating": 4.802469135802469,
      "display_average_rating": "4.8",
      "display_stars": 5.0,
      "num_five_star_ratings": 69,
      "num_four_star_ratings": 8,
      "num_one_star_ratings": 0,
      "num_ratings": 81,
      "num_three_star_ratings": 4,
      "num_two_star_ratings": 0
    },
    "story_distribution": {
      "average_rating": 4.654320987654321,
      "display_average_rating": "4.7",
      "display_stars": 4.5,
      "num_five_star_ratings": 61,
      "num_four_star_ratings": 13,
      "num_one_star_ratings": 0,
      "num_ratings": 81,
      "num_three_star_ratings": 6,
      "num_two_star_ratings": 1
    }
  },
  "relationships": [
    {
      "asin": "B08GC2361R",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_30EO_000001",
      "sku_lite": "PD_30EO_000001",
      "sort": "1",
      "title": "Alien: Out of the Shadows",
      "url": "/pd/Alien-Out-of-the-Shadows-Podcast/B08GC2361R"
    },
    {
      "asin": "B08GC1JF2B",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_30EO_000001",
      "sku_lite": "PS_30EO_000001",
      "sort": "1",
      "title": "season",
      "url": "/pd/season-Podcast/B08GC1JF2B"
    }
  ],
  "release_date": "2018-12-07",
  "runtime_length_min": 29,
  "sample_url": "https://samples.audible.com/pc/30eo/000001/pc_30eo_000001_sample.mp3",
  "sku": "PC_30EO_000001",
  "sku_lite": "PC_30EO_000001",
  "social_media_images": {
    "facebook": "https://m.media-amazon.com/images/I/51qUUcL9noL._SL10_UR1600,800_CR200,50,1200,630_CLa%7C1200,630%7C51qUUcL9noL.jpg%7C0,0,1200,630+107,79,402,402_PJAdblSocialShare-Gradientoverlay-smallasin-0to70,TopLeft,0,0_PJAdblSocialShare-AudibleLogo-Large,TopLeft,576,270_OU01_ZBLISTENING%20ON,593,216,52,500,AudibleSansMd,30,255,255,255_PJAdblSocialShare-PodcastIcon-Small,TopLeft,1094,50_ZBEpisode%201,106,519,48,404,AudibleSansMd,24,255,255,255.jpg",
    "twitter": "https://m.media-amazon.com/images/I/51qUUcL9noL._SL10_UR1600,800_CR200,50,1024,512_CLa%7C1024,512%7C51qUUcL9noL.jpg%7C0,0,1024,512+97,64,320,320_PJAdblSocialShare-Gradientoverlay-twitter-smallasin-0to60,TopLeft,0,0_PJAdblSocialShare-AudibleLogo-Medium,TopLeft,490,223_OU01_ZBLISTENING%20ON,483,152,55,450,AudibleSansMd,32,255,255,255_PJAdblSocialShare-PodcastIcon-Small,TopLeft,929,45_ZBEpisode%201,96,417,54,320,AudibleSansMd,24,255,255,255.jpg"
  },
  "thesaurus_subject_keywords": [
    "audible_original",
    "dramatizations"
  ],
  "title": "Episode 1",
  "ChapterInfo": {
    "brandIntroDurationMs": 0,
    "brandOutroDurationMs": 0,
    "chapters": [
      {
        "chapters": null,
        "length_ms": 1748323,
        "start_offset_ms": 0,
        "start_offset_sec": 0,
        "title": "Chapter 1"
      }
    ],
    "is_accurate": true,
    "runtime_length_ms": 1748323,
    "runtime_length_sec": 1748
  },
  "ContentReference": {
    "acr": "CR!8E9JHSKFWX2ZV3X0XBGGQSPDTSAK",
    "asin": "B08GCBT584",
    "codec": "mp4a.40.2",
    "content_format": "AAX_44_128",
    "content_size_in_bytes": 28200123,
    "file_version": "1",
    "marketplace": "AF2M0KC94RCEA",
    "sku": "PC_30EO_000001",
    "tempo": "1.0",
    "version": "17793621"
  }
}

If you look, it has "episode_number": 6,, which of course makes no sense. But then further down we see this:

  "relationships": [
    {
      "asin": "B08GC2361R",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_30EO_000001",
      "sku_lite": "PD_30EO_000001",
      "sort": "1",
      "title": "Alien: Out of the Shadows",
      "url": "/pd/Alien-Out-of-the-Shadows-Podcast/B08GC2361R"
    },
    {
      "asin": "B08GC1JF2B",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_30EO_000001",
      "sku_lite": "PS_30EO_000001",
      "sort": "1",
      "title": "season",
      "url": "/pd/season-Podcast/B08GC1JF2B"
    }

I don't know if we should be looking at "sort": "1", in the PodcastSeason or the PodcastParent section, but they both have the correct episode number listed.

Edit: Just to verify that it does appear to translate to the other episodes, here's from "Episode 7":

  "relationships": [
    {
      "asin": "B08GC2361R",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_30EO_000001",
      "sku_lite": "PD_30EO_000001",
      "sort": "7",
      "title": "Alien: Out of the Shadows",
      "url": "/pd/Alien-Out-of-the-Shadows-Podcast/B08GC2361R"
    },
    {
      "asin": "B08GC1JF2B",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_30EO_000001",
      "sku_lite": "PS_30EO_000001",
      "sort": "7",
      "title": "season",
      "url": "/pd/season-Podcast/B08GC1JF2B"
    }

There was another series that I thought it was off by one, but that was because the one with sort equal to 1 was a "Teaser". So then the episodes "appeared" to be off by one, since the "Teaser" is actually the first "Episode".

CLHatch commented 1 year ago

Well darn, it appears this all depends on who authors the series? The "Harry Potter" podcast in the OP example appears to be using the episode_number "correctly", and sort value is all over the place?

AshbyGeek commented 1 year ago

Yeah, it might have been on another thread, but that's what a couple of the old-timers here told me. Super unfortunate.

CLHatch commented 1 year ago

Since this appears to be an issue of "Some use the episode_number value, some use the sort value", would a possible solution be to have a setting per podcast of which to use for our numbering? Maybe showing both values in the table so we could choose which is "closest" to what we want?

Mbucari commented 1 year ago

@CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number.

https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284

It's kind of complicated, and I think the code does a better job of explaining itself than I could with English.

CLHatch commented 1 year ago

@CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number.

https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284

It's kind of complicated, and I think the code does a better job of explaining itself than I could with English.

I'll look at that in a bit, about to start cooking dinner. But from what I've seen, it appears the code is picking correctly for that HP series, but not for the other three I've tried so far. I'll add some screenshots of how it ordered them (the number at the beginning is from Libation, and the one in the title is what they are named).

This appears correct: image

These appear be wrong: image

image

image

CLHatch commented 1 year ago

@CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number.

https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284

It's kind of complicated, and I think the code does a better job of explaining itself than I could with English.

So if I'm looking at that right, sort only comes into play if episode_number is null, correct? How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, on a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them.

AshbyGeek commented 1 year ago

If you give me a few quick hints on how to grab that metadata that includes the sort flag, I would collect that info for the podcasts I have listened to on audible so that we can do some more manual correlation before changing code.

On Mon, Aug 7, 2023, 7:37 PM CLHatch @.***> wrote:

@CLHatch https://github.com/CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number.

https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284

It's kind of complicated, and I think the code does a better job of explaining itself than I could with English.

So if I'm looking at that right, sort only comes into play if episode_number is null, correct? How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, an a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them.

— Reply to this email directly, view it on GitHub https://github.com/rmcrackan/Libation/issues/600#issuecomment-1668707090, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUI2FKS3QXS3ZKMOWDHQLXUF33NANCNFSM6AAAAAAX75YTCU . You are receiving this because you were mentioned.Message ID: @.***>

CLHatch commented 1 year ago

If you give me a few quick hints on how to grab that metadata that includes the sort flag, I would collect that info for the podcasts I have listened to on audible so that we can do some more manual correlation before changing code. On Mon, Aug 7, 2023, 7:37 PM CLHatch @.> wrote: @CLHatch https://github.com/CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number. https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284 It's kind of complicated, and I think the code does a better job of explaining itself than I could with English. So if I'm looking at that right, sort only comes into play if episode_number is null, correct? How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, an a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them. — Reply to this email directly, view it on GitHub <#600 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUI2FKS3QXS3ZKMOWDHQLXUF33NANCNFSM6AAAAAAX75YTCU . You are receiving this because you were mentioned.Message ID: @.>

Good idea. I've literally just started looking at the podcasts for one or two days here. :-D

One way to check the sort value would be to check the option in this screenshot, and have Libation grab them. Then look at the <filename>.metadata.json file it creates alongside the audio file. image

AshbyGeek commented 1 year ago

Awesome. I've got to put my kids to bed, but after that I should have a few minutes to grab info and post it.

On Mon, Aug 7, 2023, 7:49 PM CLHatch @.***> wrote:

If you give me a few quick hints on how to grab that metadata that includes the sort flag, I would collect that info for the podcasts I have listened to on audible so that we can do some more manual correlation before changing code. … <#m-7989160781498920630> On Mon, Aug 7, 2023, 7:37 PM CLHatch @.> wrote: @CLHatch https://github.com/CLHatch https://github.com/CLHatch https://github.com/CLHatch Here's how Libation interprets the series order from Audible's sort and episode_number. https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284 https://github.com/rmcrackan/Libation/blob/768afd8ecd42a4eead72adaa0e0a7250fb943147/Source/AudibleUtilities/ApiExtended.cs#L252-L284 It's kind of complicated, and I think the code does a better job of explaining itself than I could with English. So if I'm looking at that right, sort only comes into play if episode_number is null, correct? How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, an a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them. — Reply to this email directly, view it on GitHub <#600 (comment) https://github.com/rmcrackan/Libation/issues/600#issuecomment-1668707090>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAUI2FKS3QXS3ZKMOWDHQLXUF33NANCNFSM6AAAAAAX75YTCU https://github.com/notifications/unsubscribe-auth/AAAUI2FKS3QXS3ZKMOWDHQLXUF33NANCNFSM6AAAAAAX75YTCU . You are receiving this because you were mentioned.Message ID: @.>

Good idea. I've literally just started looking at the podcasts for one or two days here. :-D

One way to check the sort value would be to check the option in this screenshot, and have Libation grab them. Then look at the

.metatada.json file it creates alongside the audio file. [image: image] — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you were mentioned.Message ID: ***@***.***>
Mbucari commented 1 year ago

So if I'm looking at that right, sort only comes into play if episode_number is null, correct?

Basically right.

How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, on a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them.

I don't have a problem with that on principle, I just don't know how to work it into the UI. Maybe a context menu item on podcasts, but it's such a niche option and only power users would have any idea what the hell it even means.

CLHatch commented 1 year ago

How about if we did like I suggested, and have the option to use sort INSTEAD of episode_number, on a per-podcast basis? Because it appears for those three that gave the incorrect ordering, doing that would fix them.

I don't have a problem with that on principle, I just don't know how to work it into the UI. Maybe a context menu item on podcasts, but it's such a niche option and only power users would have any idea what the hell it even means.

A context menu on the parent podcast item was what I was thinking of. And true, definitely a "power user" option, but I'm thinking one we sort of need, if we want to try to get podcast episodes ordered right. I have a feeling there will still be outliers that it still won't fix, but I'm also hoping it will fix the majority of them, having an option like that.

AshbyGeek commented 1 year ago

Ok, here's an example of why trusting the 'episode number' is dangerous (rehashed for old-timers, but worth noting again). I chopped out non-pertinent parts of the metadata.json

Intentionally Blank - Episode 1 "Popcornture vs Stubad"

{
  "asin": "B096NT8C9Q",
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 1,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "38ca95da-2a62-4d9c-88e2-cddc5b1e9172",
  "issue_date": "2021-06-09",
  "publisher_summary": "<p>The opening episode of Intentionally Blank begins in terribad fashion as Brandon and Dan search for the perfect podcast name and share their thoughts on The Snyder Cut, artists changing their art, and a bit about Jeopardy.</p>",
  "relationships": [
    {
      "asin": "B08JJPHMBY",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_094639",
      "sku_lite": "PD_8001_094639",
      "sort": "1",
      "title": "Intentionally Blank",
      "url": "/pd/item_name-Podcast/B08JJPHMBY"
    },
    {
      "asin": "B08LGB7LV5",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_667569",
      "sku_lite": "PS_8001_667569",
      "sort": "1",
      "title": "season 1",
      "url": "/pd/ITEM_NAME-Podcast/B08LGB7LV5"
    }
  ],
  "release_date": "2021-06-09",
  "runtime_length_min": 52,
  "season_number": 1,
  "sku": "PC_800F_646162",
  "sku_lite": "PC_800F_646162",
  "title": "Popcornture vs Stubad",
}

Episode 53 - "I Can't Give You a Hemi"

{
  "asin": "B0B3JTPW6T",
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 1,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "0ce65085-1f84-466e-94db-1a2029e017a6",
  "issue_date": "2022-06-08",
  "publication_datetime": "2022-06-08T16:00:00Z",
  "publisher_summary": "<p>Brandon and Dan start off with another historical food heist before moving on to discuss their book titles and other naming conventions in books and films. Including a tangent involving a fake listing of Brandon’s epic, The Way of Kings.</p><p><br /></p><p>You can join the discussion and vote for your favorite podcast title at r/sanderson: https://www.reddit.com/r/Sanderson/</p><p><br /></p><p>Can be listened to almost everywhere podcasts can be found.</p><p><br /></p><p>Produced by Adam Horne</p><p><br /></p><p>Sound engineering and editing by Daniel Thompson</p>",
  "relationships": [
    {
      "asin": "B08JJPHMBY",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_094639",
      "sku_lite": "PD_8001_094639",
      "sort": "53",
      "title": "Intentionally Blank",
      "url": "/pd/item_name-Podcast/B08JJPHMBY"
    },
    {
      "asin": "B0B46WRCT1",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8002_179041",
      "sku_lite": "PS_8002_179041",
      "sort": "1",
      "title": "season 2",
      "url": "/pd/season-2-Podcast/B0B46WRCT1"
    }
  ],
  "release_date": "2022-06-08",
  "runtime_length_min": 35,
  "season_number": 2,
  "sku": "PC_800W_568292",
  "sku_lite": "PC_800W_568292",
  "title": "I Can’t Give You a Hemi!",
}

Audible does show "I can't give you a Hemi" as approximately episode 53. I'm really not sure what's going on with the 'Season' numbers though.

Here's another later episode for comparison in case it is somehow pertinent:

{
  "asin": "B0CDFGNMGG",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "354671cc-314f-4816-837e-c3e652bd382c","publication_datetime": "2023-08-02T18:00:00Z",
  "publisher_summary": "<p>Brandon and Dan talk about Dan's struggle with depression and the in and out's of the world's view on mental health.<br /><br />🍔 Food Heists:<br /><br />Stealing Alligator Eggs, for a Secret Alligator Ranch, During a Hurricane\"- https://youtu.be/fZuDOxj0YSE (0:00-9:30)<br /><br />vs<br /><br />“The Snackyderms.”Elephants with diplomatic immunity make-off with sugarcane  -  https://youtu.be/xOZPEQ2SLjw?t=102 (1:42-10:10)<br /><br />🔥 Bad Story Ideas:<br /><br />\"Jack the Carjacking Car; Cold Open: Fuel as Food!\" - https://youtu.be/fZuDOxj0YSE?t=538 (8:58-14:05)<br /><br />vs<br /><br />\"Planetary Shenanigans or Sisyphus Plays Katamari Damacy\" - https://youtu.be/w1KDsehTGYs?t=4 (0:04-6:33)<br /><br />And make sure to cast your vote on this week's polls by clicking the Google form below: https://docs.google.com/forms/d/e/1FAIpQLSdhm-HWXLC6y35tBMO1JftDq3rZEbTvw2_Iaty_LADG4RDAEQ/viewform<br /><br />Which stories and heists will emerge victorious! Join us next week to find out!<br /><br />Check out our previous episode of Intentionally Blank<br />https://youtu.be/V14neRxSzD0<br /><br />Can be listened to almost everywhere podcasts can be found.<br /><br />Sound engineering and editing by Daniel Thompson</p>","relationships": [
    {
      "asin": "B08JJPHMBY",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_094639",
      "sku_lite": "PD_8001_094639",
      "sort": "112",
      "title": "Intentionally Blank",
      "url": "/pd/item_name-Podcast/B08JJPHMBY"
    },
    {
      "asin": "B08JJPVCX9",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_199025",
      "sku_lite": "PS_8001_199025",
      "sort": "40",
      "title": "season -1",
      "url": "/pd/item_name-Podcast/B08JJPVCX9"
    }
  ],
  "release_date": "2023-08-02",
  "runtime_length_min": 28,
  "sku": "PC_801L_381983",
  "sku_lite": "PC_801L_381983",
  "title": "Depression — Ep. 113 of Intentionally Blank",
}

Different podcast (Harry Potter and the Methods of Rationality)

Episode 1

{
  "asin": "B09DB1ZXV4",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 1,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "960d44ff-0acf-4ae6-afdd-31ec79814514",
  "publication_datetime": "2021-08-21T19:36:05Z",
  "publisher_summary": "<p>All rights belong to J.K Rowling. This is a fan fiction written by Eliezer Yudkowsky.</p> <p>I am Jack Voraces, a professional audiobook narrator:</p> <p>https://www.audible.com/search?searchNarrator=Jack+Voraces</p> <p>I do not intend to make any money from this podcast. It is a free audiobook for anyone to listen to and it is my hope that it will eventually evolve into a dream I have had for a while. The 500 hour audiobook. I would like to create an audiobook that is 500 hours long, totally free and available in multiple formats. The author has given permission for this recording and if you enjoyed Mother of Learning, you will likely enjoy this too. </p> <p>Each chapter is recorded live on Discord on Mondays at 20:00 BST:</p> <p>https://discord.gg/6B5hJdx</p> <p> Please do come and join us</p>",
  "relationships": [
    {
      "asin": "B08JJPXGYQ",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_125058",
      "sku_lite": "PS_8001_125058",
      "sort": "110",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B08JJPXGYQ"
    },
    {
      "asin": "B08JJPRMKH",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_110871",
      "sku_lite": "PD_8001_110871",
      "sort": "110",
      "title": "Harry Potter and The Methods of Rationality Audiobook",
      "url": "/pd/Book-to-New-Worlds-A-DD-Audiobook-Narrated-by-Jack-Voraces-Podcast/B08JJPRMKH"
    }
  ],
  "release_date": "2021-08-21",
  "runtime_length_min": 24,
  "sku": "PC_800J_079158",
  "sku_lite": "PC_800J_079158",
  "title": "Chapter 1: A Day of Very Low Probability",
}

Episode 2

{
  "asin": "B09D9Z6WR8",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 2,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "109ce8f3-f2cf-4aa1-9dd1-1bc178184be9","publication_datetime": "2021-08-21T19:37:31Z",
  "publisher_summary": "<p>All rights belong to J.K Rowling. This is a fan fiction written by Eliezer Yudkowsky.</p> <p>I am Jack Voraces, a professional audiobook narrator:</p> <p>https://www.audible.com/search?searchNarrator=Jack+Voraces</p> <p>I do not intend to make any money from this podcast. It is a free audiobook for anyone to listen to and it is my hope that it will eventually evolve into a dream I have had for a while. The 500 hour audiobook. I would like to create an audiobook that is 500 hours long, totally free and available in multiple formats. The author has given permission for this recording and if you enjoyed Mother of Learning, you will likely enjoy this too. </p> <p>Each chapter is recorded live on Discord on Mondays at 20:00 BST:</p> <p>https://discord.gg/6B5hJdx</p> <p> Please do come and join us</p>","relationships": [
    {
      "asin": "B08JJPXGYQ",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_125058",
      "sku_lite": "PS_8001_125058",
      "sort": "109",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B08JJPXGYQ"
    },
    {
      "asin": "B08JJPRMKH",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_110871",
      "sku_lite": "PD_8001_110871",
      "sort": "109",
      "title": "Harry Potter and The Methods of Rationality Audiobook",
      "url": "/pd/Book-to-New-Worlds-A-DD-Audiobook-Narrated-by-Jack-Voraces-Podcast/B08JJPRMKH"
    }
  ],
  "release_date": "2021-08-21",
  "runtime_length_min": 14,
  "sku": "PC_800J_079561",
  "sku_lite": "PC_800J_079561",
  "title": "Chapter 2: Everything I Believe Is False",
}

and a very recent episode

{
  "asin": "B0CCN2PRQ2",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 108,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "544c0488-7153-40ac-87cb-4dece495e814",
  "publication_datetime": "2023-08-04T11:31:31Z",
  "publisher_summary": "<p>All rights belong to J.K Rowling. This is a Harry Potter fan fiction written by Eliezer Yudkowsky.</p> <p>I am Jack Voraces, a professional audiobook narrator:</p> <p>https://www.audible.com/search?searchNarrator=Jack+Voraces</p> <p>I do not intend to make any money from this podcast. It is a free audiobook for anyone to listen to and it is my hope that it will eventually evolve into a dream I have had for a while. The 500 hour audiobook. I would like to create an audiobook that is 500 hours long, totally free and available in multiple formats. The author has given permission for this recording and if you enjoyed Mother of Learning, you will likely enjoy this too. </p> <p>Each chapter is recorded live on Discord on Mondays at 20:00 GMT:</p> <p>https://discord.gg/6B5hJdx</p>",
  "relationships": [
    {
      "asin": "B08JJPXGYQ",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_125058",
      "sku_lite": "PS_8001_125058",
      "sort": "1",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B08JJPXGYQ"
    },
    {
      "asin": "B08JJPRMKH",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_110871",
      "sku_lite": "PD_8001_110871",
      "sort": "1",
      "title": "Harry Potter and The Methods of Rationality Audiobook",
      "url": "/pd/Book-to-New-Worlds-A-DD-Audiobook-Narrated-by-Jack-Voraces-Podcast/B08JJPRMKH"
    }
  ],
  "release_date": "2023-08-04",
  "runtime_length_min": 23,
  "sku": "PC_801K_989263",
  "sku_lite": "PC_801K_989263",
  "title": "Chapter 103: Tests",
}

It is interesting to note that on this podcast Audible itself seems to be confused as listing episodes from "old to new" puts episode 103 (the latest) at the top of the list. No such problem for the "Intentionally Blank" podcast.


Here's a third podcast I listen to "Follow Him: A Come Follow Me Podcast"

{
  "asin": "B09P7SR4MK",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 1,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "4450aeb6-b2c2-43ed-97b3-2ed5ca62a697",
  "publication_datetime": "2021-12-27T01:00:00Z",
  "publisher_summary": "<p>Are you one of the few that already love the Old Testament or one of the few that hope to love the Old Testament? Join Dr. Kerry Muhlestein as we discuss techniques for studying Moses 1, Abraham 3, and the Old Testament. We learn how to view the Creation through new eyes, and you will see the story as never before.<br /><br />Show Notes (English, French, Spanish, Portuguese): https://followhim.co/episodes<br />Facebook: https://www.facebook.com/followhimpodcast<br />Instagram: https://www.instagram.com/followhimpodcast<br />YouTube: https://www.youtube.com/c/FollowHimOfficialChannel<br /><br />Thanks to the followHIM team:<br />Steve & Shannon Sorensen: Executive Producers<br />Dr. Hank Smith: Co-host<br />John Bytheway: Co-host<br />David Perry: Producer<br />Kyle Nelson: Marketing<br />Lisa Spice: Client Relations, Show Notes/Transcripts<br />Jamie Neilson: Social Media, Graphic Design<br />Will Stoughton: Rough Video Editor<br />Ariel Cuadra: Spanish Transcripts<br />Krystal Roberts: French Transcripts<br />Igor Willians: Portuguese Transcripts<br /><br />\"Let Zion in Her Beauty Rise\" by Marshall McDonald<br />https://www.marshallmcdonaldmusic.com/products/let-zion-in-her-beauty-rise-piano<br /><br />Please rate and review the podcast.</p>",
  "relationships": [
    {
      "asin": "B09P7T1JQW",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_881335",
      "sku_lite": "PS_8001_881335",
      "sort": "1",
      "title": "season 2",
      "url": "/pd/season-2-Podcast/B09P7T1JQW"
    },
    {
      "asin": "B08JJN19M6",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_003936",
      "sku_lite": "PD_8001_003936",
      "sort": "144",
      "title": "Follow Him: A Come, Follow Me Podcast",
      "url": "/pd/Follow-Him-A-Come-Follow-Me-Podcast-featuring-Hank-Smith-John-Bytheway-Podcast/B08JJN19M6"
    }
  ],
  "release_date": "2021-12-27",
  "runtime_length_min": 69,
  "season_number": 2,
  "sku": "PC_800O_577068",
  "sku_lite": "PC_800O_577068",
  "title": "Moses 1; Abraham 3 -- Part 1 : Dr. Kerry Muhlestein",
}

This one is actually probably episode 144 of that podcast, I didn't want to actually count that many items down the screen (after I finally found it), but that seems approximately right. No funny business with the sort order on the audible page on this one though.

Here's another episode for comparison.

{
  "asin": "B08RMPMRKH",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 2,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "13abcaf2-5a18-4e78-8370-b927be67e68d",
  "publication_datetime": "2021-01-03T08:00:00Z",
  "publisher_summary": "<p>Did you know that the story of the First Vision is the second greatest story ever told?  BYU Professor, Historian, and Editor, Dr. Steven Harper, takes us on a deep-dive into Joseph Smith History.  From Joseph's humble beginnings to facing overwhelming odds, we see Joseph Smith as the hero of a great story, one that includes each one of us.</p><p>Part I focuses on the context of Joseph Smith's childhood, family relations and religious influences that culminates in the first vision and Part II focuses on the First Vision.</p>",
  "relationships": [
    {
      "asin": "B08K58GQVX",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8001_418308",
      "sku_lite": "PS_8001_418308",
      "sort": "2",
      "title": "season 1",
      "url": "/pd/season-1-Podcast/B08K58GQVX"
    },
    {
      "asin": "B08JJN19M6",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_003936",
      "sku_lite": "PD_8001_003936",
      "sort": "2",
      "title": "Follow Him: A Come, Follow Me Podcast",
      "url": "/pd/Follow-Him-A-Come-Follow-Me-Podcast-featuring-Hank-Smith-John-Bytheway-Podcast/B08JJN19M6"
    }
  ],
  "release_date": "2021-01-03",
  "runtime_length_min": 33,
  "season_number": 1,
  "sku": "PC_8009_921671",
  "sku_lite": "PC_8009_921671",
  "title": "Joseph Smith History 1:1-26: Dr. Steven Harper: Part I",
}

I looked at a couple other episodes of this podcast and it might be that it is out of order because the 'season_number' field is ignored by Libation. Probably should make that a new issue though.


Summing up

AshbyGeek commented 1 year ago

One more podcast I went and grabbed at random just for comparison:

"official trailer"

{
  "asin": "B0BL839FS2",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_type": "trailer",
  "format_type": "original_recording",
  "generic_keyword": "c4ab4cd9-683a-4ac2-b855-a4489a146ba4",
  "publication_datetime": "2022-11-02T23:19:25Z",
  "relationships": [
    {
      "asin": "B0BL875WNG",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8002_401193",
      "sku_lite": "PS_8002_401193",
      "sort": "1",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B0BL875WNG"
    },
    {
      "asin": "B0BL7X9C15",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_569998",
      "sku_lite": "PD_8001_569998",
      "sort": "1",
      "title": "The Callisto Protocol: Helix Station",
      "url": "/pd/The-Callisto-Protocol-Helix-Station-Podcast/B0BL7X9C15"
    }
  ],
  "release_date": "2022-11-02",
  "runtime_length_min": 3,
  "sku": "PC_8013_502440",
  "sku_lite": "PC_8013_502440",
  "title": "Official Trailer | The Callisto Protocol: Helix Station",

No "season_number" field on this podcast episode.

Episode 1

{
  "asin": "B0BL8DS729",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 1,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "0bf3103e-cb6c-4ab5-b652-c8f37b525fce",
  "publication_datetime": "2022-11-03T04:00:00Z",
  "relationships": [
    {
      "asin": "B0BL875WNG",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8002_401193",
      "sku_lite": "PS_8002_401193",
      "sort": "2",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B0BL875WNG"
    },
    {
      "asin": "B0BL7X9C15",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_569998",
      "sku_lite": "PD_8001_569998",
      "sort": "2",
      "title": "The Callisto Protocol: Helix Station",
      "url": "/pd/The-Callisto-Protocol-Helix-Station-Podcast/B0BL7X9C15"
    }
  ],
  "release_date": "2022-11-03",
  "runtime_length_min": 27,
  "sku": "PC_8013_488065",
  "sku_lite": "PC_8013_488065",
  "title": "Episode 1 | The Proposition",
}

Episode 2

{
  "asin": "B0BL8863V2",
  "asset_details": [],
  "category_ladders": [],
  "content_delivery_type": "PodcastEpisode",
  "content_type": "Podcast",
  "episode_number": 2,
  "episode_type": "full",
  "format_type": "original_recording",
  "generic_keyword": "46a5cb39-fadf-4f74-a152-46e37fe52853",
  "publication_datetime": "2022-11-03T04:05:00Z",
  "relationships": [
    {
      "asin": "B0BL875WNG",
      "content_delivery_type": "PodcastSeason",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PS_8002_401193",
      "sku_lite": "PS_8002_401193",
      "sort": "3",
      "title": "season -1",
      "url": "/pd/season-1-Podcast/B0BL875WNG"
    },
    {
      "asin": "B0BL7X9C15",
      "content_delivery_type": "PodcastParent",
      "relationship_to_product": "parent",
      "relationship_type": "episode",
      "sku": "PD_8001_569998",
      "sku_lite": "PD_8001_569998",
      "sort": "3",
      "title": "The Callisto Protocol: Helix Station",
      "url": "/pd/The-Callisto-Protocol-Helix-Station-Podcast/B0BL7X9C15"
    }
  ],
  "release_date": "2022-11-03",
  "runtime_length_min": 28,
  "sku": "PC_8013_507678",
  "sku_lite": "PC_8013_507678",
  "title": "Episode 2 | Shipwrecks",
}

Maybe "season_number" only shows up if the podcast has more than 1 season listed?

MoSattler commented 9 months ago

I still have the issue that the podcast order is not correct (it's just random). https://www.audible.es/pd/Por-que-matamos-Podcast/B093ZPF63V?qid=1701450664&sr=1-1&ref_pageloadid=not_applicable&ref=a_search_c3_lProduct_1_1&pf_rd_p=edc39886-a4e3-4991-8ce5-effa92157a44&pf_rd_r=G1QFDYKMND9K7T3ZZDN4&pageLoadId=5rR7m0m7NBuLA9XW&ref_plink=not_applicable&creativeId=41e85e98-10b8-40e2-907d-6b663f04a42d

Is there any way around this where I can use the pub date?

Also, the metadata doesnt seem to be correctly encoded. E.g. publication date is missing altogether in the resulting m4b files.

CLHatch commented 9 months ago

I still have the issue that the podcast order is not correct (it's just random). https://www.audible.es/pd/Por-que-matamos-Podcast/B093ZPF63V?qid=1701450664&sr=1-1&ref_pageloadid=not_applicable&ref=a_search_c3_lProduct_1_1&pf_rd_p=edc39886-a4e3-4991-8ce5-effa92157a44&pf_rd_r=G1QFDYKMND9K7T3ZZDN4&pageLoadId=5rR7m0m7NBuLA9XW&ref_plink=not_applicable&creativeId=41e85e98-10b8-40e2-907d-6b663f04a42d

Is there any way around this where I can use the pub date?

Also, the metadata doesnt seem to be correctly encoded. E.g. publication date is missing altogether in the resulting m4b files.

Yeah, most the podcasts I've looked at it ends up being completely random. He fixed one podcast, but others are broken. It seems everyone orders them using a different method?