Commit 99a9fa9
Stop resending TMDB base show fields on every season batch
fetch_and_cache_seasons() batches season requests to stay under TMDB's
append_to_response item cap, but every batch included the full base-show
fields (recommendations, external_ids, aggregate_credits, alternative_titles,
watch/providers) in append_to_response, not just the first. Those fields
describe the show, not a season, so they can't change between batches of the
same fetch - refetching them per batch was pure waste that scales with
season count (a 9-season show already pays for it twice; 20+ seasons would
pay 3-4x).
Only the first batch now requests the base fields and refreshes the cached
tv_data from that response; later batches request only their season-specific
append_to_response and reuse fetched_tv_data from the first batch.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 3ed77c8 commit 99a9fa9
2 files changed
Lines changed: 54 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
900 | 900 | | |
901 | 901 | | |
902 | 902 | | |
| 903 | + | |
903 | 904 | | |
904 | 905 | | |
905 | 906 | | |
906 | 907 | | |
907 | 908 | | |
908 | 909 | | |
909 | 910 | | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
914 | 927 | | |
915 | 928 | | |
916 | 929 | | |
| |||
922 | 935 | | |
923 | 936 | | |
924 | 937 | | |
925 | | - | |
926 | | - | |
927 | | - | |
928 | | - | |
929 | | - | |
930 | | - | |
931 | | - | |
932 | | - | |
933 | | - | |
934 | | - | |
935 | | - | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
936 | 946 | | |
937 | | - | |
| 947 | + | |
938 | 948 | | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
943 | 958 | | |
944 | 959 | | |
945 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1033 | 1052 | | |
1034 | 1053 | | |
1035 | 1054 | | |
| |||
0 commit comments