Date as time delta for usability?
fartyg opened this issue · 5 comments
Hey dude, so I made this script to more easily interact with lazystream: https://github.com/fartyg/dotfiles/blob/master/.scripts/hockey.py
Wouldn't it be neat if you could say --date -1 for yesterday (1 for tomorrow etc)? I find it annoying with the dates due to time zone differences. Script solves my problem but maybe this could be helpful for someone else. All the best!
Hey! Is the reason you have to do this because of timezone difference? I just checked and yeah, I'm creating today's date based on the computers local timezone. I think this should be changed to always evaluate as of Pacific time zone. Once that is in place, I'm not sure you'd need the hack you're currently doing.
So usually it goes like:
- Wake up at 5AM GMT+2 to watch a live game
- lazystream play select - "Pick a game for 2021-01-20..." "5) 5AM" (like exactly my current time)
- Either I dont find what I am looking for or I try to play something and it would say "Stream not available yet" (game is actually in 24 hours from now)
- Oops, okey so I actually want to watch the game from yesterday then
- Now I need to muck about with the --date flag
Pretty much always do I want my default to be yesterday but there are exceptions for example when you guys play at like 1PM, it would be like 7PM here (we still on same date). But yeah as you say it might be better to not look at the computer time. Will say in general here that I think yesterday/today/tomorrow is probably a very common way thinking about game dates (as opposed to figuring out 20210119 / 20210120 / 20210121 manually off of that, regardless of time zone really, having both would maybe be cool?).
With the script I also don't have to specify that I want to use mpv every time (I don't have vlc installed so maybe it should fall back to mpv?). Another thing I like is that it swallows the terminal window with devour, when the mpv window opens (to have this featured in lazystream doesn't really make sense imo).
So it's really just to avoid having to type that long command every time. Instead I can say nhl -1 (but also be a bit flexible, can check schedule for tomorrow etc).
Makes sense! So my vote is to just change the default behavior to always resolve today as of Pacific Time. This will always give the desired result for everyone I think. As soon as its midnight PT (all games should be over by then), then everyones client will start processing games for the next day
That does sound like the cleanest default here agreed. I guess this would speak better to the lazy part of lazystream also, not a bunch of parameters and complicated time zone shit at 5AM in the morning :)
:P And actually, I'm way over-complicating it by even passing the date parameter to the API when wanting "today's" game. If I don't pass a date, it'll default to returning today's games, so I'll just make that change. Then things will switch over once the API switches over so it's impossible to get wrong.