Skip to content

Commit

Permalink
Fix #4
Browse files Browse the repository at this point in the history
  • Loading branch information
wasi-master committed Apr 16, 2022
1 parent ddc2293 commit 27ea041
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
requests
requests
typing_extensions ; python_version < '3.8'
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = sponsorblock.py
version = 0.2.1
version = 0.2.2
description = An unofficial wrapper for the SponsorBlock API
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -39,6 +39,7 @@ keywords =
packages = sponsorblock
install_requires =
requests
typing_extensions ; python_version < '3.8'
python_requires = >=3.6

[options.entry_points]
Expand Down
2 changes: 1 addition & 1 deletion sponsorblock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
from .utils import SortType

__name__ = "sponsorblock.py" # noqa
__version__ = "0.2.1"
__version__ = "0.2.2"
7 changes: 6 additions & 1 deletion sponsorblock/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
import platform
import re
from enum import Enum
from typing import Dict, Literal
from datetime import datetime, timedelta
try:
from typing import Dict, Literal
except ImportError:
from typing import Dict
from typing_extensions import Literal

VIDEO_ID_REGEX = re.compile(
r"(.+?)(\/)(watch\x3Fv=)?(embed\/watch\x3Ffeature\=player_embedded\x26v=)?([a-zA-Z0-9_-]{11})+"
Expand Down Expand Up @@ -59,6 +63,7 @@ def set_env_var(key: str, value: str):
-------
Most of the time this shouldn't be used manually, but it's here in case you need to set the SPONSORBLOCK_USER_ID environment variable.
"""
print("Setting SPONSORBLOCK_USER_ID environment variable")
operating_system = platform.system()
if operating_system == "Windows":
os.system(f'setx {key} "{value}" ')
Expand Down

0 comments on commit 27ea041

Please sign in to comment.