|
33 | 33 | logging.getLogger('asyncio').setLevel(logging.CRITICAL) |
34 | 34 | logging.getLogger('aiohttp').setLevel(logging.CRITICAL) |
35 | 35 |
|
36 | | -CURRENT_VERSION = "1.5.3" |
| 36 | +CURRENT_VERSION = "1.5.4" |
37 | 37 | SUPPORTED_FORMATS = [".mp4", ".mkv", ".mov", ".avi", ".ts"] |
38 | 38 | RESOLUTIONS = ["chunked", "2160p60", "2160p30", "2160p20", "1440p60", "1440p30", "1440p20", "1080p60", "1080p30", "1080p20", "720p60", "720p30", "720p20", "480p60", "480p30", "360p60", "360p30", "160p60", "160p30"] |
39 | 39 |
|
@@ -769,7 +769,7 @@ def fetch_recent_streams_api(streamer_name, max_streams=100): |
769 | 769 |
|
770 | 770 | # Convert to local time only for display purposes |
771 | 771 | dt_local = dt_utc.astimezone() |
772 | | - dt_local_str = dt_local.strftime("%d/%b/%Y %H:%M") |
| 772 | + dt_local_str = dt_local.strftime("%Y-%m-%d %H:%M:%S") |
773 | 773 |
|
774 | 774 | length_seconds = node.get("lengthSeconds", 0) |
775 | 775 | duration_hours = length_seconds / 3600.0 |
@@ -811,16 +811,19 @@ def fetch_recent_streams_api(streamer_name, max_streams=100): |
811 | 811 | pass |
812 | 812 |
|
813 | 813 | final_timestamp = dt_utc_str |
| 814 | + final_local_timestamp = dt_local_str |
814 | 815 | if extracted_timestamp: |
815 | 816 | try: |
816 | 817 | dt_from_url = datetime.fromtimestamp(int(extracted_timestamp), timezone.utc) |
817 | 818 | final_timestamp = dt_from_url.strftime("%Y-%m-%d %H:%M:%S") |
| 819 | + dt_local_from_url = dt_from_url.astimezone() |
| 820 | + final_local_timestamp = dt_local_from_url.strftime("%Y-%m-%d %H:%M:%S") |
818 | 821 | except Exception as e: |
819 | 822 | pass |
820 | 823 |
|
821 | 824 | stream = { |
822 | 825 | 'dt_utc': final_timestamp, |
823 | | - 'dt_local': dt_local_str, |
| 826 | + 'dt_local': final_local_timestamp, |
824 | 827 | 'title': node.get("title", ""), |
825 | 828 | 'duration': duration_hours, |
826 | 829 | 'stream_id': extracted_vod_id or node.get("id", ""), |
@@ -2117,7 +2120,7 @@ def selenium_get_latest_streams_from_twitchtracker(streamer_name): |
2117 | 2120 | except Exception as pe: |
2118 | 2121 | continue |
2119 | 2122 | dt_utc_norm = dt_utc_obj.strftime("%Y-%m-%d %H:%M:%S") |
2120 | | - dt_local = datetime.strftime(dt_utc_obj + timedelta(hours=timezone_offset_hours, minutes=timezone_offset_mins), "%d/%b/%Y %H:%M") |
| 2123 | + dt_local = datetime.strftime(dt_utc_obj + timedelta(hours=timezone_offset_hours, minutes=timezone_offset_mins), "%Y-%m-%d %H:%M:%S") |
2121 | 2124 | title = row[6] |
2122 | 2125 | duration = 0 |
2123 | 2126 | try: |
@@ -2186,7 +2189,7 @@ def selenium_get_latest_streams_from_twitchtracker(streamer_name): |
2186 | 2189 | dt_local_obj = datetime.strptime(row['dt_local'], "%d/%b/%Y %H:%M") |
2187 | 2190 | dt_utc_obj = dt_local_obj - timedelta(hours=timezone_offset_hours, minutes=timezone_offset_mins) |
2188 | 2191 | dt_utc = dt_utc_obj.strftime("%Y-%m-%d %H:%M:%S") |
2189 | | - dt_local = dt_local_obj.strftime("%d/%b/%Y %H:%M") |
| 2192 | + dt_local = dt_local_obj.strftime("%Y-%m-%d %H:%M:%S") |
2190 | 2193 | except Exception: |
2191 | 2194 | dt_utc = row.get('dt_utc') or '' |
2192 | 2195 | try: |
|
0 commit comments