from datetime import timedelta
import mixgen
from mixgen import Track

def ms(m, s):
    return timedelta(minutes=m, seconds=s)

name = "on the possibility"
year = 2025
rootpath = "https://joshuawise.com/resources/eoy2025/v0/"
alttext = "Russian Ridge trail snaking off into a colorful sunset on the longest-ish day of the year, with text, on the possibility: 2025, as heard by Joshua."
dreamwidth = "https://joshua0.dreamwidth.org/78261.html"
filename = "eoy2025-v0.mp3"
mp3_filesize = "154 MB"
cover_fullres_filesize = "1.4 MB"
cover_1024_filesize = "246 kB"
readme_filesize = "2.4 kB"

# TODO: throw a limiter in there and squeeze out a few db where appropriate in transitions
# TODO: check vanishing game crash mix one more time and see if something better can be done there
# TODO: adjust timing for bounce silence

notes = """

There is a lot out there in the world again.  While I was putting this mix
together, it felt like some of the adjacent songs were fighting with each
other.  I guess it makes sense: everyone is fighting with each other these
days.  But even songs that were right next to each other seemed to be at
conflict with each other!

Oddly, the more I thought about it, the more the mix felt right.  I have
spent a lot of time over my life -- and, well, especially this year --
trying to hold two or more different thoughts in my head at once.  I suspect
I have gotten a little bit better at it (though I have to confess that is
not saying a whole lot!).  Maybe that's why I was okay with -- or had to be
okay with, anyway -- all of the ways that these songs go together.

Some of these songs feel like they are offering questions.  Some of them
feel like they are offering answers.  Sometimes the answers match the
questions, sometimes they don't.  Sometimes I agree with the answers,
sometimes I don't.  Sometimes the answers agree with the other answers,
sometimes they don't.

I don't know who's right, if anyone even is any more right than anyone else. 
But that's the beauty of it -- you get to choose!  Maybe none of them are
right, or maybe one of them is right, or maybe they're all right.  They are
each for us to hold as much or as little of as we want.

Please find below the soundtrack to my 2025.

""".strip()

technotes = """

<p>This mix was cut together and edited using Ableton Live.  I used to say how
long it took me to put all the pieces together, but the answer is basically
"this is why I'm not a DJ in a club".</p>

<p>Last year, I experimentally wrote a script to generate a bunch of these
files.  I had to update Python dependencies this year, but I think it
probably did end up saving me time after all.  If you want it, here's the
source: <a href="mixgen.py">mixgen.py</a> (driver to generate the things);
<a href="info.py">info.py</a> (descriptor for this year in particular); <a
href="index.html.tpl">index.html.tpl</a>; <a
href="readme.tpl">readme.tpl</a>.</p>

""".strip()

previous = [
    ("https://joshuawise.com/resources/eoy2024/v0/", "on the inside: 2024, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2023/", "on the lookout: 2023, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2022/", "on the run: 2022, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2021/", "on the offchance: 2021, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2020/", "on the front: 2020, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2019/", "on the edge: 2019, as heard by Joshua."),
    ("https://joshuawise.com/resources/eoy2018/", "on the horizon: 2018, as heard by Joshua."),
]

tracks = [
    Track(ms(0, 0), "Nico Vega", "$5", "Make It Out Alive EP", 2024, None),
    Track(ms(3, 10), "Metric", "Black Sheep", None, 2010, None),
    Track(ms(7, 51), "Florence + the Machine", "Everybody Scream", "Everybody Scream", 2025, None),
    Track(ms(11, 46), "TECHNOPHOBIA", "Rattle in Your Chest", "Some of Us Are Looking at the Stars", 2020, "https://technophobiamusic.bandcamp.com/album/some-of-us-are-looking-at-the-stars-lp"),
    Track(ms(16, 2), "Rhys Fulber", "Only Love Will Save Us (ft. Years Of Denial & Barkosina)", "Memory Impulse Autonomy", 2025, "https://rhysfulber.bandcamp.com/album/memory-impulse-autonomy"),
    Track(ms(20, 21), "Assemblage 23", "Normal", "Null", 2025, "https://assemblage23.bandcamp.com/album/null"),
    Track(ms(24, 50), "DA BUBBLE GUM BROTHERS", "WON'T BE LONG", "Born to Be Funky", 1990, None),
    Track(ms(31, 25), "The Birthday Massacre", "The Vanishing Game", "Pathways", 2025, "https://thebirthdaymassacre.bandcamp.com/album/pathways"),
    Track(ms(35, 12), "Pendulum", "Anti-Hero (triple j Like A Version)", None, 2023, None),
    Track(ms(38, 54), "Solarstone", "shivelight", "innermost", 2025, "https://solarstone.bandcamp.com/album/innermost"),
    Track(ms(45, 52), "Seven Lions", "Past You (ft. Oaks)", "Asleep in the Garden of Infernal Stars", 2025, None),
    Track(ms(49, 50), "VNV Nation", "Silence Speaks", "Construct", 2025, "https://vnvnation.bandcamp.com/album/construct"),
    Track(ms(54, 57), "Florence + the Machine", "The Old Religion", "Everbody Scream", 2025, None),
    Track(ms(58, 31), "The Dark Clan", "Oh, Invisible", "The Dark Clan Hogs The Covers", 2012, "https://thedarkclan.bandcamp.com/album/the-dark-clan-hogs-the-covers"),
    Track(ms(62, 24), "Lorde", "Team", "Pure Heroine", 2013, None),
    Track(ms(65, 33), "Lady Gaga", "Perfect Celebrity", "MAYHEM", 2025, None),
    Track(ms(69, 26), "Seeming", "Tomorrow Place", "The World", 2025, "https://seeming.bandcamp.com/album/the-world"),
    Track(ms(73, 8), "Pendulum", "Cartagena", "Inertia", 2025, None),
    Track(ms(78, 0), "Lost Frequencies", "The Feeling (Lost Frequencies & Andromedik Deluxe Mix)", None, 2023, None),
    Track(ms(81, 18), "standards", "Cosmos", "Fruit Galaxy", 2024, "https://wearestandards.bandcamp.com/album/fruit-galaxy"),
    Track(ms(84, 18), "GoGo Penguin", "Silence Speaks", "Necessary Fictions", 2025, None),
    Track(ms(87, 26), "Seeming", "Assassin's Lovesong", "The World", 2025, "https://seeming.bandcamp.com/album/the-world"),
    Track(ms(91, 16), None, None, None, None, None),
]

if __name__ == "__main__":
    import sys
    mixgen.mixgen(sys.modules['__main__'])
