chrisbenincasa / tunarr

Create a classic TV experience using your own media - IPTV backed by Plex/Jellyfin
https://tunarr.com/
zlib License
148 stars 13 forks source link

Adding Media fails with status code 500 #268

Closed markdavella closed 6 months ago

markdavella commented 6 months ago

Repro:

  1. I have a channel with all bluey episodes
  2. Add a season of another show episodes (in this case Arthur Season 3, has like 60 episodes). Get this error:
Request URL:
http://localhost:8000/api/channels/f86b7435-8980-48be-8e73-b2efc8170f74/programming
Request Method:
POST
Status Code:
500 Internal Server Error
Remote Address:
[::1]:8000
Referrer Policy:
strict-origin-when-cross-origin

Response:

{
    "statusCode": 500,
    "code": "FST_ERR_FAILED_ERROR_SERIALIZATION",
    "message": "Failed to serialize an error. Error: Response doesn't match the schema. Original error: insert into `program` (`uuid`, `created_at`, `updated_at`, `source_type`, `original_air_date`, `duration`, `episode`, `file_path`, `external_source_id`, `external_key`, `plex_rating_key`, `plex_file_path`, `parent_external_key`, `grandparent_external_key`, `rating`, `season`, `show_icon`, `show_title`, `summary`, `title`, `type`, `year`) values ('9fa0e282-5e09-423c-b194-b0d76d0ce852', 1712792355346, 1712792355346, 'plex', '1998-11-16', 1481088, 1, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E01-E02 - Busters Back and The Ballad of Buster Baxter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11564', '11564', '/library/parts/19475/1452254722/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Buster returns after a extremely long trip to bond with his father and a nervous Arthur wonders if Buster''s trip made him change.', 'Buster''s Back', 'episode', 1998), ('39f0673b-cedb-413a-ae4b-b04b4b2680b8', 1712792355346, 1712792355346, 'plex', '1998-11-16', 1481088, 2, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E01-E02 - Busters Back and The Ballad of Buster Baxter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11565', '11565', '/library/parts/19476/1452254722/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Buster feels left out having missed all the adventures since he was away. He feels that everyone has changed and they feel the same about him, so Arthur plans a party so they can rekindle their friendship with Buster.', 'The Ballad of Buster Baxter', 'episode', 1998), ('20fe5499-5fbb-4398-ba56-ec5609326d3f', 1712792355346, 1712792355346, 'plex', '1998-11-17', 1585128, 3, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E03-E04 - D.W. All Fired Up and I''d Rather Read It Myself [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11566', '11566', '/library/parts/19477/1452254746/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. loves school and wants to go everyday, but when Ms. Morgan starts doing fire drills she fears for her safety and doesn''t want to go anymore.', 'D.W., All Fired Up', 'episode', 1998), ('3f295ce4-4f65-4ef0-ab56-ca7baad5161d', 1712792355346, 1712792355346, 'plex', '1998-11-17', 1585128, 4, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E03-E04 - D.W. All Fired Up and I''d Rather Read It Myself [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11567', '11567', '/library/parts/19478/1452254746/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The Tibble Twins can do everything better than D.W. So she tells them that she is able to read before them. They challenge her and she picks up a book and makes up a story, but when the Tibble''s bring the book home for their Grandma to read to them her trick is revealed.', 'I''d Rather Read It Myself', 'episode', 1998), ('1e730d0f-cc5b-4737-b29a-acaf2044da20', 1712792355346, 1712792355346, 'plex', '1998-11-18', 1585775, 5, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E05-E06 - Arthur Goes Crosswire and Sue Ellen and the Brainasaurous [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11568', '11568', '/library/parts/19479/1452254769/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Mr. Ratburn assigns partners for a project and Arthur gets teamed up with Muffy. After spending a lot of time with her, he starts to act just like her.', 'Arthur Goes Crosswire', 'episode', 1998), ('f3614f38-ff2a-495d-8ebe-2dc2f8ddd918', 1712792355346, 1712792355346, 'plex', '1998-11-18', 1585775, 6, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E05-E06 - Arthur Goes Crosswire and Sue Ellen and the Brainasaurous [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11569', '11569', '/library/parts/19480/1452254769/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Sue Ellen gets partnered with Brain in another project by Mr. Ratburn. Soon he starts to be a report hog and gets on Sue Ellen''s nerves.', 'Sue Ellen and the Brainasaurous', 'episode', 1998), ('3a8c6087-34ea-4426-9619-b5abc9a33ef4', 1712792355346, 1712792355346, 'plex', '1998-11-19', 1584583, 7, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E07-E08 - Background Blues and And Now Lets Talk to Some Kids [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11570', '11570', '/library/parts/19481/1452254789/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Mr. Ratburn assigns a project that involves family ancestors.  Muffy and Francine turn this project into a competition to see who has the best ancestors.', 'Background Blues', 'episode', 1998), ('c9ec2e70-0c2d-4f9b-8c9c-eced6d38f718', 1712792355346, 1712792355346, 'plex', '1998-11-19', 1584583, 8, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E07-E08 - Background Blues and And Now Lets Talk to Some Kids [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11571', '11571', '/library/parts/19482/1452254789/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur''s class gets picked to be on a television show in which the Brain does not want to go on.', 'And Now Let''s Talk to Some Kids', 'episode', 1998), ('b81a60fd-b82b-47fe-93d6-03a51c07f202', 1712792355346, 1712792355346, 'plex', '1998-11-20', 1482192, 9, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E09-E10 - The Chips Are Down and Revenge of the Chip [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11574', '11574', '/library/parts/19484/1452254807/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. eats a big green potato chip and to get her off his back Arthur tells her that it''s fatal and she could die. So D.W. spends this day as her last day until she finds out the truth.', 'The Chips Are Down', 'episode', 1998), ('e73043e2-0467-45f6-a9bb-7979496ec819', 1712792355346, 1712792355346, 'plex', '1998-11-20', 1482192, 10, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E09-E10 - The Chips Are Down and Revenge of the Chip [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11575', '11575', '/library/parts/19485/1452254807/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W''s mom tells the newspapers and everyone in town that story about D.W. and the green chip embarrassing her ultimately.', 'Revenge of the Chip', 'episode', 1998), ('644c24c0-ae3a-46ad-bd94-ad2ff450972a', 1712792355346, 1712792355346, 'plex', '1998-11-23', 1585450, 11, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E11-E12 - Binky Rules and Meet Binky [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11576', '11576', '/library/parts/19486/1452265647/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Someone has been writing \"Binky Rules\" all over Lakewood Elementary and Mr. Morris thinks it is Binky.  Binky says he didn''t do it, so Fern and Buster are trying to find out.', 'Binky Rules', 'episode', 1998), ('6391c8f0-a1f2-4599-ab0c-4ece3f2f6544', 1712792355346, 1712792355346, 'plex', '1998-11-23', 1585450, 12, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E11-E12 - Binky Rules and Meet Binky [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11577', '11577', '/library/parts/19487/1452265647/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Everyone gets tickets for a concert starring the new group Binky.', 'Meet Binky', 'episode', 1998), ('de64dfa0-3ab5-400a-a7b4-111f47ede724', 1712792355347, 1712792355347, 'plex', '1998-11-24', 1584984, 13, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E13-E14 - Arthur Rides the Bandwagon and Dads Dessert Dilemma [DVD][MP3 2.0][XviD]-BUYMORE.avi', 'ATN', '/library/metadata/11578', '11578', '/library/parts/19488/1452172519/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Everyone has a Woogle, the popular new toy... everyone except Arthur.  He think that they''re dweeby, until everyone else has one.', 'Arthur Rides the Bandwagon', 'episode', 1998), ('0451b7bb-e8be-4b79-902a-3e22f05b6f6f', 1712792355347, 1712792355347, 'plex', '1998-11-24', 1584984, 14, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E13-E14 - Arthur Rides the Bandwagon and Dads Dessert Dilemma [DVD][MP3 2.0][XviD]-BUYMORE.avi', 'ATN', '/library/metadata/11579', '11579', '/library/parts/19489/1452172519/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After one of Mr. Read''s scrumptious desserts makes Arthur the most popular kid in class, Arthur can''t stop asking his dad to cook. Despite his dad''s busy catering schedule, Arthur promises delectable desserts to anyone and everyone.', 'Dad''s Dessert Dilemma', 'episode', 1998), ('18da3648-861c-4ff6-9015-7bfe8da27614', 1712792355347, 1712792355347, 'plex', '1998-11-25', 1585391, 15, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E15-E16 - Popular Girls and Busters Growing Grudge [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11581', '11581', '/library/parts/19491/1452265666/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After Fern and Sue Ellen take a quiz in a teen magazine, they change the way they act.  Fern turns loud and aggressive, while Sue Ellen falls back in everything.', 'Popular Girls', 'episode', 1998), ('fc8f91cd-433d-47b3-832b-bdbd100cbb75', 1712792355347, 1712792355347, 'plex', '1998-11-25', 1585391, 16, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E15-E16 - Popular Girls and Busters Growing Grudge [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11582', '11582', '/library/parts/19492/1452265666/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Binky steals Buster''s joke for his report, Buster has a grudge against him.', 'Buster''s Growing Grudge', 'episode', 1998), ('d019a25a-5e1f-4069-856e-997cae4d0efc', 1712792355347, 1712792355347, 'plex', '1998-11-26', 1586376, 17, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E17-E18 - Arthurs Treasure Hunt and The Return of the King [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11583', '11583', '/library/parts/19493/1452254866/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Buster finds an arrowhead in his yard; everyone wants to know if there are treasures in their yards.', 'Arthur''s Treasure Hunt', 'episode', 1998), ('45f5f55d-a767-44a8-89ba-6203db1eedf1', 1712792355347, 1712792355347, 'plex', '1998-11-26', 1586376, 18, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E17-E18 - Arthurs Treasure Hunt and The Return of the King [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11584', '11584', '/library/parts/19494/1452254866/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Mr. Ratburn''s class goes to a medieval style fair, his old teacher Mr. Pryce-Jones comes with his new class. Mr. Pryce-Jones'' class wins all the games.', 'The Return of the King', 'episode', 1998), ('ef223141-0a3b-4fc7-b8c1-9ee5e69090db', 1712792355347, 1712792355347, 'plex', '1998-11-27', 1481687, 19, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E19-E20 - Attack of the Turbo Tibbles and D.W. Tricks the Tooth Fairy [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11585', '11585', '/library/parts/19495/1452254888/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The Tibble''s watch a dangerous superhero show and imitate it. Things get out of hand when they pretend that D.W. is a bad guy.', 'Attack of the Turbo Tibbles', 'episode', 1998), ('36fdfd1b-0bdc-465c-87cd-14dbf6725a21', 1712792355347, 1712792355347, 'plex', '1998-11-27', 1481687, 20, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E19-E20 - Attack of the Turbo Tibbles and D.W. Tricks the Tooth Fairy [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11586', '11586', '/library/parts/19496/1452254888/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. wants money to buy a toy, so she plans to trick the tooth fairy so she can earn enough money for it.', 'D.W. Tricks The Tooth Fairy', 'episode', 1998), ('f2f5dc9a-16d7-47fd-ac59-d34fe51693b2', 1712792355347, 1712792355347, 'plex', '1998-12-28', 1482840, 21, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E21-E22 - Double Tibble Trouble and Arthurs Almost Live Not Real Music Festival [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11587', '11587', '/library/parts/19497/1452254917/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Tommy Tibble gets sick and Timmy Tibble gets sad so D.W. and Emily pretend to be Tibbles to make Timmy feel better until Tommy is well.', 'Double Tibble Trouble', 'episode', 1998), ('c6b6d2c2-eef8-4ca8-87a8-2d2342c71fe5', 1712792355347, 1712792355347, 'plex', '1998-12-28', 1482840, 22, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E21-E22 - Double Tibble Trouble and Arthurs Almost Live Not Real Music Festival [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11588', '11588', '/library/parts/19498/1452254917/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur and Buster show D.W. that you don''t need cameras, lights, etc. to make a music video.', 'Arthur''s Almost Live Not Real Music Festival', 'episode', 1998), ('f938ab79-f313-4172-acd0-b5b7ad1ad6ed', 1712792355347, 1712792355347, 'plex', '1998-12-29', 1586591, 23, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E23-E24 - What Scared Sue Ellen and Clarissa is Cracked [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11590', '11590', '/library/parts/19500/1452254945/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After everyone has told scary stories, everything scares Sue Ellen.', 'What Scared Sue Ellen?', 'episode', 1998), ('7a06804d-75ae-427f-8bed-aa38bbec987c', 1712792355347, 1712792355347, 'plex', '1998-12-29', 1586591, 24, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E23-E24 - What Scared Sue Ellen and Clarissa is Cracked [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11591', '11591', '/library/parts/19501/1452254945/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Grandma Thora lends her doll Clarissa to D.W. for a week. She has a lot of fun with her until Clarissa breaks.', 'Clarissa is Cracked', 'episode', 1998), ('e8e2c487-baf6-4544-87ae-42b22884a786', 1712792355347, 1712792355347, 'plex', '1998-12-30', 1586885, 25, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E25-E26 - Arthurs Dummy Disaster and Francine and the Feline [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11592', '11592', '/library/parts/19502/1452254967/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When George brings his dummy Wally to school, everyone loves him.  But after awhile, they get tired of Wally.', 'Arthur''s Dummy Disaster', 'episode', 1998), ('b21e0395-a269-44b8-bdf0-cef1d98fe1b1', 1712792355347, 1712792355347, 'plex', '1998-12-30', 1586885, 26, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E25-E26 - Arthurs Dummy Disaster and Francine and the Feline [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11593', '11593', '/library/parts/19503/1452254967/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Francine never had a pet until Nemo comes along.', 'Francine and the Feline', 'episode', 1998), ('38837e48-2924-401b-bc44-7d0c80e45830', 1712792355347, 1712792355347, 'plex', '1998-12-31', 1480445, 27, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E27-E28 - Mom and Dad Have a Great Big Fight and D.W.s Perfect Wish [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11594', '11594', '/library/parts/19504/1452265783/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Mom and Dad begin to fight over spilled milk, D.W. is worried that they might be getting a divorce.', 'Mom and Dad Have a Great Big Fight', 'episode', 1998), ('32e97c47-9579-4926-9fd1-382c300e7863', 1712792355347, 1712792355347, 'plex', '1998-12-31', 1480445, 28, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E27-E28 - Mom and Dad Have a Great Big Fight and D.W.s Perfect Wish [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11595', '11595', '/library/parts/19505/1452265783/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur notices that D.W. is not excited about her birthday. So he tells her about her memories throughout her year as a four-year-old.', 'D.W.''s Perfect Wish', 'episode', 1998), ('e45a8d82-6e6b-4a62-8f49-e7b11bfd6e62', 1712792355347, 1712792355347, 'plex', '1999-01-01', 1584849, 29, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E29-E30 - Arthur and D.W. Clean Up and The Long Dull Winter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11596', '11596', '/library/parts/19506/1452255008/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur is devastated that he has to clean up his room, and D.W.''s too.', 'Arthur and D.W. Clean Up', 'episode', 1999), ('abd3d9f5-14be-4615-ac33-eaa04e9b65a7', 1712792355347, 1712792355347, 'plex', '1999-01-01', 1584849, 30, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E29-E30 - Arthur and D.W. Clean Up and The Long Dull Winter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11597', '11597', '/library/parts/19507/1452255008/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The gang decides to make up another holiday for the wintertime.', 'The Long, Dull Winter', 'episode', 1999) - UNIQUE constraint failed: program.source_type, program.external_source_id, program.external_key"
}
chrisbenincasa commented 6 months ago

Oh man, not a good sight here. How did you trigger this?

We should have checks on the unique key there and an “on conflict” on that unique key so this is definitely strange.

On Wed, Apr 10, 2024 at 7:42 PM markdavella @.***> wrote:

Request URL:http://localhost:8000/api/channels/f86b7435-8980-48be-8e73-b2efc8170f74/programming Request Method: POST Status Code: 500 Internal Server Error Remote Address:

Referrer Policy: strict-origin-when-cross-origin

Response:

{ "statusCode": 500, "code": "FST_ERR_FAILED_ERROR_SERIALIZATION", "message": "Failed to serialize an error. Error: Response doesn't match the schema. Original error: insert into program (uuid, created_at, updated_at, source_type, original_air_date, duration, episode, file_path, external_source_id, external_key, plex_rating_key, plex_file_path, parent_external_key, grandparent_external_key, rating, season, show_icon, show_title, summary, title, type, year) values ('9fa0e282-5e09-423c-b194-b0d76d0ce852', 1712792355346, 1712792355346, 'plex', '1998-11-16', 1481088, 1, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E01-E02 - Busters Back and The Ballad of Buster Baxter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11564', '11564', '/library/parts/19475/1452254722/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Buster returns after a extremely long trip to bond with his father and a nervous Arthur wonders if Buster''s trip made him change.', 'Buster''s Back', 'episode', 1998), ('39f0673b-cedb-413a-ae4b-b04b4b2680b8', 1712792355346, 1712792355346, 'plex', '1998-11-16', 1481088, 2, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E01-E02 - Busters Back and The Ballad of Buster Baxter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11565', '11565', '/library/parts/19476/1452254722/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Buster feels left out having missed all the adventures since he was away. He feels that everyone has changed and they feel the same about him, so Arthur plans a party so they can rekindle their friendship with Buster.', 'The Ballad of Buster Baxter', 'episode', 1998), ('20fe5499-5fbb-4398-ba56-ec5609326d3f', 1712792355346, 1712792355346, 'plex', '1998-11-17', 1585128, 3, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E03-E04 - D.W. All Fired Up and I''d Rather Read It Myself [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11566', '11566', '/library/parts/19477/1452254746/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. loves school and wants to go everyday, but when Ms. Morgan starts doing fire drills she fears for her safety and doesn''t want to go anymore.', 'D.W., All Fired Up', 'episode', 1998), ('3f295ce4-4f65-4ef0-ab56-ca7baad5161d', 1712792355346, 1712792355346, 'plex', '1998-11-17', 1585128, 4, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E03-E04 - D.W. All Fired Up and I''d Rather Read It Myself [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11567', '11567', '/library/parts/19478/1452254746/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The Tibble Twins can do everything better than D.W. So she tells them that she is able to read before them. They challenge her and she picks up a book and makes up a story, but when the Tibble''s bring the book home for their Grandma to read to them her trick is revealed.', 'I''d Rather Read It Myself', 'episode', 1998), ('1e730d0f-cc5b-4737-b29a-acaf2044da20', 1712792355346, 1712792355346, 'plex', '1998-11-18', 1585775, 5, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E05-E06 - Arthur Goes Crosswire and Sue Ellen and the Brainasaurous [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11568', '11568', '/library/parts/19479/1452254769/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Mr. Ratburn assigns partners for a project and Arthur gets teamed up with Muffy. After spending a lot of time with her, he starts to act just like her.', 'Arthur Goes Crosswire', 'episode', 1998), ('f3614f38-ff2a-495d-8ebe-2dc2f8ddd918', 1712792355346, 1712792355346, 'plex', '1998-11-18', 1585775, 6, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E05-E06 - Arthur Goes Crosswire and Sue Ellen and the Brainasaurous [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11569', '11569', '/library/parts/19480/1452254769/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Sue Ellen gets partnered with Brain in another project by Mr. Ratburn. Soon he starts to be a report hog and gets on Sue Ellen''s nerves.', 'Sue Ellen and the Brainasaurous', 'episode', 1998), ('3a8c6087-34ea-4426-9619-b5abc9a33ef4', 1712792355346, 1712792355346, 'plex', '1998-11-19', 1584583, 7, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E07-E08 - Background Blues and And Now Lets Talk to Some Kids [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11570', '11570', '/library/parts/19481/1452254789/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Mr. Ratburn assigns a project that involves family ancestors. Muffy and Francine turn this project into a competition to see who has the best ancestors.', 'Background Blues', 'episode', 1998), ('c9ec2e70-0c2d-4f9b-8c9c-eced6d38f718', 1712792355346, 1712792355346, 'plex', '1998-11-19', 1584583, 8, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E07-E08 - Background Blues and And Now Lets Talk to Some Kids [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11571', '11571', '/library/parts/19482/1452254789/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur''s class gets picked to be on a television show in which the Brain does not want to go on.', 'And Now Let''s Talk to Some Kids', 'episode', 1998), ('b81a60fd-b82b-47fe-93d6-03a51c07f202', 1712792355346, 1712792355346, 'plex', '1998-11-20', 1482192, 9, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E09-E10 - The Chips Are Down and Revenge of the Chip [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11574', '11574', '/library/parts/19484/1452254807/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. eats a big green potato chip and to get her off his back Arthur tells her that it''s fatal and she could die. So D.W. spends this day as her last day until she finds out the truth.', 'The Chips Are Down', 'episode', 1998), ('e73043e2-0467-45f6-a9bb-7979496ec819', 1712792355346, 1712792355346, 'plex', '1998-11-20', 1482192, 10, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E09-E10 - The Chips Are Down and Revenge of the Chip [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11575', '11575', '/library/parts/19485/1452254807/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W''s mom tells the newspapers and everyone in town that story about D.W. and the green chip embarrassing her ultimately.', 'Revenge of the Chip', 'episode', 1998), ('644c24c0-ae3a-46ad-bd94-ad2ff450972a', 1712792355346, 1712792355346, 'plex', '1998-11-23', 1585450, 11, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E11-E12 - Binky Rules and Meet Binky [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11576', '11576', '/library/parts/19486/1452265647/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Someone has been writing \"Binky Rules\" all over Lakewood Elementary and Mr. Morris thinks it is Binky. Binky says he didn''t do it, so Fern and Buster are trying to find out.', 'Binky Rules', 'episode', 1998), ('6391c8f0-a1f2-4599-ab0c-4ece3f2f6544', 1712792355346, 1712792355346, 'plex', '1998-11-23', 1585450, 12, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E11-E12 - Binky Rules and Meet Binky [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11577', '11577', '/library/parts/19487/1452265647/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Everyone gets tickets for a concert starring the new group Binky.', 'Meet Binky', 'episode', 1998), ('de64dfa0-3ab5-400a-a7b4-111f47ede724', 1712792355347, 1712792355347, 'plex', '1998-11-24', 1584984, 13, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E13-E14 - Arthur Rides the Bandwagon and Dads Dessert Dilemma [DVD][MP3 2.0][XviD]-BUYMORE.avi', 'ATN', '/library/metadata/11578', '11578', '/library/parts/19488/1452172519/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Everyone has a Woogle, the popular new toy... everyone except Arthur. He think that they''re dweeby, until everyone else has one.', 'Arthur Rides the Bandwagon', 'episode', 1998), ('0451b7bb-e8be-4b79-902a-3e22f05b6f6f', 1712792355347, 1712792355347, 'plex', '1998-11-24', 1584984, 14, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E13-E14 - Arthur Rides the Bandwagon and Dads Dessert Dilemma [DVD][MP3 2.0][XviD]-BUYMORE.avi', 'ATN', '/library/metadata/11579', '11579', '/library/parts/19489/1452172519/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After one of Mr. Read''s scrumptious desserts makes Arthur the most popular kid in class, Arthur can''t stop asking his dad to cook. Despite his dad''s busy catering schedule, Arthur promises delectable desserts to anyone and everyone.', 'Dad''s Dessert Dilemma', 'episode', 1998), ('18da3648-861c-4ff6-9015-7bfe8da27614', 1712792355347, 1712792355347, 'plex', '1998-11-25', 1585391, 15, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E15-E16 - Popular Girls and Busters Growing Grudge [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11581', '11581', '/library/parts/19491/1452265666/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After Fern and Sue Ellen take a quiz in a teen magazine, they change the way they act. Fern turns loud and aggressive, while Sue Ellen falls back in everything.', 'Popular Girls', 'episode', 1998), ('fc8f91cd-433d-47b3-832b-bdbd100cbb75', 1712792355347, 1712792355347, 'plex', '1998-11-25', 1585391, 16, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E15-E16 - Popular Girls and Busters Growing Grudge [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11582', '11582', '/library/parts/19492/1452265666/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Binky steals Buster''s joke for his report, Buster has a grudge against him.', 'Buster''s Growing Grudge', 'episode', 1998), ('d019a25a-5e1f-4069-856e-997cae4d0efc', 1712792355347, 1712792355347, 'plex', '1998-11-26', 1586376, 17, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E17-E18 - Arthurs Treasure Hunt and The Return of the King [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11583', '11583', '/library/parts/19493/1452254866/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Buster finds an arrowhead in his yard; everyone wants to know if there are treasures in their yards.', 'Arthur''s Treasure Hunt', 'episode', 1998), ('45f5f55d-a767-44a8-89ba-6203db1eedf1', 1712792355347, 1712792355347, 'plex', '1998-11-26', 1586376, 18, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E17-E18 - Arthurs Treasure Hunt and The Return of the King [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11584', '11584', '/library/parts/19494/1452254866/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Mr. Ratburn''s class goes to a medieval style fair, his old teacher Mr. Pryce-Jones comes with his new class. Mr. Pryce-Jones'' class wins all the games.', 'The Return of the King', 'episode', 1998), ('ef223141-0a3b-4fc7-b8c1-9ee5e69090db', 1712792355347, 1712792355347, 'plex', '1998-11-27', 1481687, 19, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E19-E20 - Attack of the Turbo Tibbles and D.W. Tricks the Tooth Fairy [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11585', '11585', '/library/parts/19495/1452254888/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The Tibble''s watch a dangerous superhero show and imitate it. Things get out of hand when they pretend that D.W. is a bad guy.', 'Attack of the Turbo Tibbles', 'episode', 1998), ('36fdfd1b-0bdc-465c-87cd-14dbf6725a21', 1712792355347, 1712792355347, 'plex', '1998-11-27', 1481687, 20, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E19-E20 - Attack of the Turbo Tibbles and D.W. Tricks the Tooth Fairy [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11586', '11586', '/library/parts/19496/1452254888/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'D.W. wants money to buy a toy, so she plans to trick the tooth fairy so she can earn enough money for it.', 'D.W. Tricks The Tooth Fairy', 'episode', 1998), ('f2f5dc9a-16d7-47fd-ac59-d34fe51693b2', 1712792355347, 1712792355347, 'plex', '1998-12-28', 1482840, 21, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E21-E22 - Double Tibble Trouble and Arthurs Almost Live Not Real Music Festival [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11587', '11587', '/library/parts/19497/1452254917/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Tommy Tibble gets sick and Timmy Tibble gets sad so D.W. and Emily pretend to be Tibbles to make Timmy feel better until Tommy is well.', 'Double Tibble Trouble', 'episode', 1998), ('c6b6d2c2-eef8-4ca8-87a8-2d2342c71fe5', 1712792355347, 1712792355347, 'plex', '1998-12-28', 1482840, 22, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E21-E22 - Double Tibble Trouble and Arthurs Almost Live Not Real Music Festival [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11588', '11588', '/library/parts/19498/1452254917/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur and Buster show D.W. that you don''t need cameras, lights, etc. to make a music video.', 'Arthur''s Almost Live Not Real Music Festival', 'episode', 1998), ('f938ab79-f313-4172-acd0-b5b7ad1ad6ed', 1712792355347, 1712792355347, 'plex', '1998-12-29', 1586591, 23, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E23-E24 - What Scared Sue Ellen and Clarissa is Cracked [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11590', '11590', '/library/parts/19500/1452254945/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'After everyone has told scary stories, everything scares Sue Ellen.', 'What Scared Sue Ellen?', 'episode', 1998), ('7a06804d-75ae-427f-8bed-aa38bbec987c', 1712792355347, 1712792355347, 'plex', '1998-12-29', 1586591, 24, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E23-E24 - What Scared Sue Ellen and Clarissa is Cracked [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11591', '11591', '/library/parts/19501/1452254945/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Grandma Thora lends her doll Clarissa to D.W. for a week. She has a lot of fun with her until Clarissa breaks.', 'Clarissa is Cracked', 'episode', 1998), ('e8e2c487-baf6-4544-87ae-42b22884a786', 1712792355347, 1712792355347, 'plex', '1998-12-30', 1586885, 25, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E25-E26 - Arthurs Dummy Disaster and Francine and the Feline [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11592', '11592', '/library/parts/19502/1452254967/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When George brings his dummy Wally to school, everyone loves him. But after awhile, they get tired of Wally.', 'Arthur''s Dummy Disaster', 'episode', 1998), ('b21e0395-a269-44b8-bdf0-cef1d98fe1b1', 1712792355347, 1712792355347, 'plex', '1998-12-30', 1586885, 26, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E25-E26 - Arthurs Dummy Disaster and Francine and the Feline [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11593', '11593', '/library/parts/19503/1452254967/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Francine never had a pet until Nemo comes along.', 'Francine and the Feline', 'episode', 1998), ('38837e48-2924-401b-bc44-7d0c80e45830', 1712792355347, 1712792355347, 'plex', '1998-12-31', 1480445, 27, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E27-E28 - Mom and Dad Have a Great Big Fight and D.W.s Perfect Wish [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11594', '11594', '/library/parts/19504/1452265783/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'When Mom and Dad begin to fight over spilled milk, D.W. is worried that they might be getting a divorce.', 'Mom and Dad Have a Great Big Fight', 'episode', 1998), ('32e97c47-9579-4926-9fd1-382c300e7863', 1712792355347, 1712792355347, 'plex', '1998-12-31', 1480445, 28, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E27-E28 - Mom and Dad Have a Great Big Fight and D.W.s Perfect Wish [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11595', '11595', '/library/parts/19505/1452265783/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur notices that D.W. is not excited about her birthday. So he tells her about her memories throughout her year as a four-year-old.', 'D.W.''s Perfect Wish', 'episode', 1998), ('e45a8d82-6e6b-4a62-8f49-e7b11bfd6e62', 1712792355347, 1712792355347, 'plex', '1999-01-01', 1584849, 29, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E29-E30 - Arthur and D.W. Clean Up and The Long Dull Winter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11596', '11596', '/library/parts/19506/1452255008/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'Arthur is devastated that he has to clean up his room, and D.W.''s too.', 'Arthur and D.W. Clean Up', 'episode', 1999), ('abd3d9f5-14be-4615-ac33-eaa04e9b65a7', 1712792355347, 1712792355347, 'plex', '1999-01-01', 1584849, 30, '/media/tv/Arthur (1996) {imdb-tt0169414}/Arthur (1996) - S03E29-E30 - Arthur and D.W. Clean Up and The Long Dull Winter [DVD][MP3 2.0][XviD]-BUYMORE-Obfuscated.avi', 'ATN', '/library/metadata/11597', '11597', '/library/parts/19507/1452255008/file.avi', '11563', '9377', 'TV-Y', 3, '/library/metadata/9377/thumb/1711524307', 'Arthur', 'The gang decides to make up another holiday for the wintertime.', 'The Long, Dull Winter', 'episode', 1999) - UNIQUE constraint failed: program.source_type, program.external_source_id, program.external_key" }

— Reply to this email directly, view it on GitHub https://github.com/chrisbenincasa/tunarr/issues/268, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQRX4MFWDEQEKVFJOWZW3Y4XE6BAVCNFSM6AAAAABGBJ5CG6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZTMNRQGU2TSNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

markdavella commented 6 months ago

Oddly, now when I try to repro using same steps listed in issue, it works fine. I'll update with more info if I reproduce in the next day or so.

chrisbenincasa commented 6 months ago

Gah it's gonna be one of those bugs 😤

I'll try and repro tonight. In the meantime I have to make these error messages more digestible

markdavella commented 6 months ago

Ok, here are some repro steps that seem to work:

1.) Go to an existing channels programming 2.) Click Add Media 3.) Select a collection of movies (I chose ones that had around 30-60 movies) 4.) Before you click save, sort the programming alphabetically then click Save.

You should get a 500 after doing that.

chrisbenincasa commented 6 months ago

Awesome, I'll give this a go

chrisbenincasa commented 6 months ago

Hmmm... OK I got this as an error. Not quite the same as yours though

@tunarr/server:dev: entity: (Program) { createdAt: 2024-04-11T02:04:42.136Z } undefined
@tunarr/server:dev:     ValidationError: Value for Program.uuid is required, 'undefined' found
@tunarr/server:dev:     entity: (Program) { createdAt: 2024-04-11T02:04:42.136Z }
@tunarr/server:dev:         at ValidationError.propertyRequired (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/errors.js:69:16)
@tunarr/server:dev:         at EntityValidator.validateRequired (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/entity/EntityValidator.js:52:48)
@tunarr/server:dev:         at ChangeSetPersister.processProperties (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:87:28)
@tunarr/server:dev:         at /Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:33:46
@tunarr/server:dev:         at Array.forEach (<anonymous>)
@tunarr/server:dev:         at ChangeSetPersister.executeInserts (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:33:20)
@tunarr/server:dev:         at ChangeSetPersister.runForEachSchema (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:78:31)
@tunarr/server:dev:         at ChangeSetPersister.executeInserts (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/ChangeSetPersister.js:30:25)
@tunarr/server:dev:         at UnitOfWork.commitCreateChangeSets (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js:746:39)
@tunarr/server:dev:         at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
@tunarr/server:dev:         at async UnitOfWork.persistToDatabase (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js:710:13)
@tunarr/server:dev:         at async UnitOfWork.doCommit (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js:318:17)
@tunarr/server:dev:         at async UnitOfWork.commit (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/unit-of-work/UnitOfWork.js:285:13)
@tunarr/server:dev:         at async SqlEntityManager.flush (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/EntityManager.js:1295:9)
@tunarr/server:dev:         at async SqlEntityManager.persistAndFlush (/Users/christianbenincasa/Code/projects/tunarr/node_modules/.pnpm/@mikro-orm+core@6.1.12/node_modules/@mikro-orm/core/EntityManager.js:1258:9)
chrisbenincasa commented 6 months ago

Figured out what's going on here. This is a mismatch in how the front end and backend construct unique IDs for unpersisted items. Gonna do some work to synchronize all of this stuff tmrw. To do it totally correctly we'll also need a slight DB change, but nothing major

chrisbenincasa commented 6 months ago

There's also some additional null checking we should add in the save program path