Skip to content

Commit

Permalink
Add 1989 TV Deluxe and remove prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
fyrk committed Oct 28, 2023
1 parent 4fc472d commit 71104a7
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 178 deletions.
2 changes: 2 additions & 0 deletions scripts/fetchTaylorAlbums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ for (const id of [
"1iZR600UW2HCS3L7p5kNB8",
// Fearless (Taylor’s Version): The I Remember What You Said Last Night Chapter
"0XCoR1j5Sa2su9uDS9AScR",
// If This Was A Movie (Taylor’s Version)
"6IZm7NfvWyXp952VF36Z5F",
// Red (Taylor’s Version): Could You Be The One Chapter
"1ZkjQ4WBB99Rq5eFGqENNX",
// Red (Taylor’s Version): She Wrote A Song About Me Chapter
Expand Down
51 changes: 30 additions & 21 deletions scripts/find_taylorsversions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -12,7 +12,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -98,7 +98,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -111,19 +111,19 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"# load manual prerelease album data\n",
"with open(\"prereleases.json\", \"r\") as f:\n",
" _prereleases = json.load(f)\n",
"albums.extend(Album.from_prerelease(p) for p in _prereleases)"
"#with open(\"prereleases.json\", \"r\") as f:\n",
"# _prereleases = json.load(f)\n",
"#albums.extend(Album.from_prerelease(p) for p in _prereleases)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -134,7 +134,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand All @@ -146,8 +146,8 @@
"No stolen found: Safe & Sound (feat. Joy Williams and John Paul White) (Taylor’s Version) (normalized: Safe & Sound)\n",
"No stolen found: Safe & Sound (feat. Joy Williams and John Paul White) (Taylor’s Version) (normalized: Safe & Sound)\n",
"No stolen found: Eyes Open (Taylor's Version) (normalized: Eyes Open)\n",
"Not using Acoustic filter, no TVs left: Track(name='Back To December - Acoustic', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003672', id='6IH2Z54gYPLqgJtxZjX80i', uri='spotify:track:6IH2Z54gYPLqgJtxZjX80i', stolen=set(), tvs={Track(name=\"Back To December (Taylor's Version)\", album=Album(name=\"Speak Now (Taylor's Version)\", is_prerelease=False, release_date='2023-07-07', group='album', type='album', id='5AEDGbliTTfjOB8TSm1sxt', prerelease_image=None, prerelease_link=None), isrc='USUG12302075', id='79uDOz0zuuWS7HWxzMmTa2', uri='spotify:track:79uDOz0zuuWS7HWxzMmTa2', stolen={Track(name=\"Back To December/Apologize/You're Not Sorry - Live/2011/Medley\", album=Album(name='Speak Now World Tour Live', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='6fyR4wBPwLHKcRtxgd4sGh', prerelease_image=None, prerelease_link=None), isrc='USCJY1103921', id='1IsquhJFJ0qcFZI7FeAEuN', uri='spotify:track:1IsquhJFJ0qcFZI7FeAEuN', stolen=set(), tvs={...}, sorted_tvs=[...]), ..., Track(name='Back To December', album=Album(name='Speak Now', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5MfAxS5zz8MlfROjGQVXhy', prerelease_image=None, prerelease_link=None), isrc='USCJY1003657', id='3DrjZArsPsoqbLzUZZV1Id', uri='spotify:track:3DrjZArsPsoqbLzUZZV1Id', stolen=set(), tvs={...}, sorted_tvs=[]), Track(name='Back To December', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003657', id='7lxADouiWFkwR7ZV2GKUcH', uri='spotify:track:7lxADouiWFkwR7ZV2GKUcH', stolen=set(), tvs={...}, sorted_tvs=[...])}, tvs=set(), sorted_tvs=[])}, sorted_tvs=[])\n",
"Not using Acoustic filter, no TVs left: Track(name='Haunted - Acoustic Version', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003673', id='62rlxI6g2PNaWsHoiRryto', uri='spotify:track:62rlxI6g2PNaWsHoiRryto', stolen=set(), tvs={Track(name=\"Haunted (Taylor's Version)\", album=Album(name=\"Speak Now (Taylor's Version)\", is_prerelease=False, release_date='2023-07-07', group='album', type='album', id='5AEDGbliTTfjOB8TSm1sxt', prerelease_image=None, prerelease_link=None), isrc='USUG12302084', id='4tMzIAFTFdqGBQLdfbPces', uri='spotify:track:4tMzIAFTFdqGBQLdfbPces', stolen={Track(name='Haunted', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='11UaQaEp2LvdspTyyuE3ur', uri='spotify:track:11UaQaEp2LvdspTyyuE3ur', stolen=set(), tvs={...}, sorted_tvs=[...]), Track(name='Haunted', album=Album(name='reputation Stadium Tour Surprise Song Playlist', is_prerelease=False, release_date='2017-11-09', group='album', type='album', id='1MPAXuTVL2Ej5x0JHiSPq8', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='6CB7DczrX9ZJB9Wkjegmaq', uri='spotify:track:6CB7DczrX9ZJB9Wkjegmaq', stolen=set(), tvs={...}, sorted_tvs=[...]), ..., Track(name='Haunted', album=Album(name='Speak Now', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5MfAxS5zz8MlfROjGQVXhy', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='28M2gifMU282QBM3fKajIS', uri='spotify:track:28M2gifMU282QBM3fKajIS', stolen=set(), tvs={...}, sorted_tvs=[]), Track(name='Haunted - Live/2011', album=Album(name='Speak Now World Tour Live', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='6fyR4wBPwLHKcRtxgd4sGh', prerelease_image=None, prerelease_link=None), isrc='USCJY1103930', id='6znB7YZhMJT2B83zfbiyLq', uri='spotify:track:6znB7YZhMJT2B83zfbiyLq', stolen=set(), tvs={...}, sorted_tvs=[...])}, tvs=set(), sorted_tvs=[])}, sorted_tvs=[])\n"
"Not using Acoustic filter, no TVs left: Track(name='Back To December - Acoustic', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003672', id='6IH2Z54gYPLqgJtxZjX80i', uri='spotify:track:6IH2Z54gYPLqgJtxZjX80i', stolen=set(), tvs={Track(name=\"Back To December (Taylor's Version)\", album=Album(name=\"Speak Now (Taylor's Version)\", is_prerelease=False, release_date='2023-07-07', group='album', type='album', id='5AEDGbliTTfjOB8TSm1sxt', prerelease_image=None, prerelease_link=None), isrc='USUG12302075', id='79uDOz0zuuWS7HWxzMmTa2', uri='spotify:track:79uDOz0zuuWS7HWxzMmTa2', stolen={Track(name='Back To December', album=Album(name='Speak Now', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5MfAxS5zz8MlfROjGQVXhy', prerelease_image=None, prerelease_link=None), isrc='USCJY1003657', id='3DrjZArsPsoqbLzUZZV1Id', uri='spotify:track:3DrjZArsPsoqbLzUZZV1Id', stolen=set(), tvs={...}, sorted_tvs=[]), Track(name='Back To December', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003657', id='7lxADouiWFkwR7ZV2GKUcH', uri='spotify:track:7lxADouiWFkwR7ZV2GKUcH', stolen=set(), tvs={...}, sorted_tvs=[...]), Track(name=\"Back To December/Apologize/You're Not Sorry - Live/2011/Medley\", album=Album(name='Speak Now World Tour Live', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='6fyR4wBPwLHKcRtxgd4sGh', prerelease_image=None, prerelease_link=None), isrc='USCJY1103921', id='1IsquhJFJ0qcFZI7FeAEuN', uri='spotify:track:1IsquhJFJ0qcFZI7FeAEuN', stolen=set(), tvs={...}, sorted_tvs=[...]), ...}, tvs=set(), sorted_tvs=[])}, sorted_tvs=[])\n",
"Not using Acoustic filter, no TVs left: Track(name='Haunted - Acoustic Version', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003673', id='62rlxI6g2PNaWsHoiRryto', uri='spotify:track:62rlxI6g2PNaWsHoiRryto', stolen=set(), tvs={Track(name=\"Haunted (Taylor's Version)\", album=Album(name=\"Speak Now (Taylor's Version)\", is_prerelease=False, release_date='2023-07-07', group='album', type='album', id='5AEDGbliTTfjOB8TSm1sxt', prerelease_image=None, prerelease_link=None), isrc='USUG12302084', id='4tMzIAFTFdqGBQLdfbPces', uri='spotify:track:4tMzIAFTFdqGBQLdfbPces', stolen={Track(name='Haunted - Live/2011', album=Album(name='Speak Now World Tour Live', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='6fyR4wBPwLHKcRtxgd4sGh', prerelease_image=None, prerelease_link=None), isrc='USCJY1103930', id='6znB7YZhMJT2B83zfbiyLq', uri='spotify:track:6znB7YZhMJT2B83zfbiyLq', stolen=set(), tvs={...}, sorted_tvs=[...]), ..., Track(name='Haunted', album=Album(name='Speak Now', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5MfAxS5zz8MlfROjGQVXhy', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='28M2gifMU282QBM3fKajIS', uri='spotify:track:28M2gifMU282QBM3fKajIS', stolen=set(), tvs={...}, sorted_tvs=[]), Track(name='Haunted', album=Album(name='Speak Now (Deluxe Edition)', is_prerelease=False, release_date='2010-10-25', group='album', type='album', id='5EpMjweRD573ASl7uNiHym', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='11UaQaEp2LvdspTyyuE3ur', uri='spotify:track:11UaQaEp2LvdspTyyuE3ur', stolen=set(), tvs={...}, sorted_tvs=[...]), Track(name='Haunted', album=Album(name='reputation Stadium Tour Surprise Song Playlist', is_prerelease=False, release_date='2017-11-09', group='album', type='album', id='1MPAXuTVL2Ej5x0JHiSPq8', prerelease_image=None, prerelease_link=None), isrc='USCJY1003666', id='6CB7DczrX9ZJB9Wkjegmaq', uri='spotify:track:6CB7DczrX9ZJB9Wkjegmaq', stolen=set(), tvs={...}, sorted_tvs=[...])}, tvs=set(), sorted_tvs=[])}, sorted_tvs=[])\n"
]
}
],
Expand Down Expand Up @@ -182,9 +182,22 @@
"\n",
" for stolen in tracks:\n",
" stolen_name = normalize_name(stolen.name)\n",
" if (stolen_name.startswith(song_name)\n",
" if (\n",
" stolen_name.startswith(song_name)\n",
" and \" Version)\" not in stolen_name # Version) also catches ATW versions\n",
" and \"Voice Memo\" not in stolen_name # 1989 (Deluxe Edition) Voice Memos\n",
"\n",
" # Bad Blood (feat. Kendrick Lamar): og is called \"Bad Blood\"\n",
" # exclude TVs without feature:\n",
" and (\n",
" stolen.id != \"6xsEAm6w9oMQYYg3jkEkMT\"\n",
" or \"(feat. Kendrick Lamar)\" in track.name\n",
" )\n",
" # exclude TV feature from og\n",
" and (\n",
" not (\"Bad Blood\" in song_name and stolen.id != \"6xsEAm6w9oMQYYg3jkEkMT\")\n",
" or \"(feat. Kendrick Lamar)\" not in track.name\n",
" )\n",
" ):\n",
" track.stolen.add(stolen)\n",
" stolen.tvs.add(track)\n",
Expand Down Expand Up @@ -215,7 +228,6 @@
" # ATWTMVTSF second to last\n",
" \"(10 Minute Version) (The Short Film)\" not in tv.name,\n",
"\n",
"\n",
" # exact title matches first\n",
" song_name == remove_parens(normalize_name(tv.name)),\n",
" # prefer non-remix (e.g. \"Love Story (Taylor's Version)\" over \"Love Story (Taylor's Version) [Elvira Remix]\")\n",
Expand Down Expand Up @@ -254,11 +266,8 @@
" }\n",
" if \"- live\" in stolen.name.lower():\n",
" tvs[stolen.isrc][\"isLive\"] = True\n",
" if (\"remix\" in stolen.name.lower() \n",
" # Bad Blood (feat. Kendrick Lamar), as long as no TV is available\n",
" or stolen.id == \"6xsEAm6w9oMQYYg3jkEkMT\"\n",
" ):\n",
" tvs[stolen.isrc][\"isRemix\"] = True\n",
" if \"remix\" in stolen.name.lower():\n",
" tvs[stolen.isrc][\"isRemixWithoutTV\"] = True\n",
" if \"acoustic\" in stolen.name.lower() and \"acoustic\" not in stolen.sorted_tvs[0].name.lower():\n",
" tvs[stolen.isrc][\"isAcousticWithoutTV\"] = True\n",
" if \"demo\" in stolen.name.lower():\n",
Expand Down Expand Up @@ -288,7 +297,7 @@
" for track in album.tracks:\n",
" print(track.name, file=f)\n",
" if track.isrc in tvs:\n",
" for tag in (\"isLive\", \"isRemix\", \"isAcousticWithoutTV\", \"isDemoWithoutTV\", \"isMixWithoutTV\"):\n",
" for tag in (\"isLive\", \"isRemixWithoutTV\", \"isAcousticWithoutTV\", \"isDemoWithoutTV\", \"isMixWithoutTV\"):\n",
" if tag in tvs[track.isrc]:\n",
" print(\" \", tag, file=f)\n",
" for tv in track.sorted_tvs:\n",
Expand All @@ -305,7 +314,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -335,7 +344,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 71104a7

Please sign in to comment.