diff --git a/.github/workflows/run_pytest.yml b/.github/workflows/run_pytest.yml
index e826202..ba9dd98 100644
--- a/.github/workflows/run_pytest.yml
+++ b/.github/workflows/run_pytest.yml
@@ -33,7 +33,7 @@ jobs:
if [ -f test/requirements.txt ]; then pip install -r test/requirements.txt; fi
- name: Check Syntax with flake8
run: |
- flake8 --extend-ignore=E501 pyxtream/pyxtream.py pyxtream/rest_api.py pyxtream/schemaValidator.py pyxtream/version.py pyxtream/progress.py
+ flake8 --extend-ignore=E501 pyxtream/pyxtream.py pyxtream/rest_api.py pyxtream/schemaValidator.py pyxtream/version.py pyxtream/api.py
- name: Test with pytest
run: |
python3 -m pytest --cov=pyxtream test/test_pyxtream.py
diff --git a/README.md b/README.md
index 42cee64..546bf7d 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,7 @@ Follows the Semantic Versioning from https://semver.org/
| Date | Version | Description |
| ----------- | -----| ----------- |
+| 2026-04-03 | 0.8.0 | - Added more PyTest functions
- Refactored index.html to better show cards
- Refactored pyxtream.py with types
- Removed cli progress bar
- Fixed issue with loading series [max298](https://github.com/max298)
- Fixed empty logo issue [max298](https://github.com/max298)
| 2025-02-17 | 0.7.3 | - Added Initial PyTest and Coverage
- Added timestamp field "added" to Series to match channels "added" field
- Added string field "url" to Series to quickly get the series download address
- Added new API "get_last_7days()" returns the last added streams in the last 7 days in JSON format
- Added new API "get_download_progress()" returns information on the current download stream in JSON format
- Changed internal function _load_series_info_by_id_from_provider to allow returned value to change to JSON
- Changed search_stream function to only search in specific collections
- Refactored "rest_api.py" to make it easier to extend in the future
- Added new rest API
- Changed to Poetry environment
- Changed Functional Test to test loading series information
- Changed sample index.html to test more features|
| 2024-09-02 | 0.7.2 | - Added missing request package to setup.py
- Refactored the search stream function and now, it can search for a specific stream type
- Refactored the download stream function
- Refactored the _get_request function and removed the call to the sleep function
- Added functional test to get series json output from a series_id
- Added functional test to get EPG for a specific stream ID
- Added xtream account expiration date printed on the console during authentication
- Improved results with the Flask HTML page and differentiating between movies and series
- Improved code readability|
| 2024-05-21 | 0.7.1 | - Fixed missing jsonschema package
- Fixed provider name in functional_test
- Improved print out of connection attempts
- Added method to read latest changes in functional_test
diff --git a/functional_test.py b/functional_test.py
index 4242158..0b8e6d7 100755
--- a/functional_test.py
+++ b/functional_test.py
@@ -50,8 +50,10 @@ def str2list(input_string: str) -> list:
PROVIDER_PASSWORD,
PROVIDER_URL,
reload_time_sec=60*60*8,
+ validate_json=False,
debug_flask=True,
- enable_flask=True
+ enable_flask=True,
+ flask_port=5000
)
sleep(0.5)
diff --git a/pyxtream/__init__.py b/pyxtream/__init__.py
index cf35465..f586bba 100644
--- a/pyxtream/__init__.py
+++ b/pyxtream/__init__.py
@@ -1,6 +1,5 @@
-from .progress import progress
-from .pyxtream import XTream, Channel, Group, Serie, Episode
+from .pyxtream import Channel, Episode, Group, Season, Serie, XTream
try:
from .rest_api import FlaskWrap
diff --git a/pyxtream/api.py b/pyxtream/api.py
new file mode 100644
index 0000000..c2cdd7a
--- /dev/null
+++ b/pyxtream/api.py
@@ -0,0 +1,63 @@
+"""
+API URL builders
+"""
+
+
+def get_live_categories_URL(base: str) -> str:
+ return f"{base}&action=get_live_categories"
+
+
+def get_live_streams_URL(base: str) -> str:
+ return f"{base}&action=get_live_streams"
+
+
+def get_live_streams_URL_by_category(category_id, base: str) -> str:
+ return f"{base}&action=get_live_streams&category_id={category_id}"
+
+
+def get_vod_cat_URL(base: str) -> str:
+ return f"{base}&action=get_vod_categories"
+
+
+def get_vod_streams_URL(base: str) -> str:
+ return f"{base}&action=get_vod_streams"
+
+
+def get_vod_streams_URL_by_category(category_id, base: str) -> str:
+ return f"{base}&action=get_vod_streams&category_id={category_id}"
+
+
+def get_series_cat_URL(base: str) -> str:
+ return f"{base}&action=get_series_categories"
+
+
+def get_series_URL(base: str) -> str:
+ return f"{base}&action=get_series"
+
+
+def get_series_URL_by_category(category_id, base: str) -> str:
+ return f"{base}&action=get_series&category_id={category_id}"
+
+
+def get_series_info_URL_by_ID(series_id, base: str) -> str:
+ return f"{base}&action=get_series_info&series_id={series_id}"
+
+
+def get_VOD_info_URL_by_ID(vod_id, base: str) -> str:
+ return f"{base}&action=get_vod_info&vod_id={vod_id}"
+
+
+def get_live_epg_URL_by_stream(stream_id, base: str) -> str:
+ return f"{base}&action=get_short_epg&stream_id={stream_id}"
+
+
+def get_live_epg_URL_by_stream_and_limit(stream_id, limit, base: str) -> str:
+ return f"{base}&action=get_short_epg&stream_id={stream_id}&limit={limit}"
+
+
+def get_all_live_epg_URL_by_stream(stream_id, base: str) -> str:
+ return f"{base}&action=get_simple_data_table&stream_id={stream_id}"
+
+
+def get_all_epg_URL(base: str, username: str, password: str) -> str:
+ return f"{base}/xmltv.php?username={username}&password={password}"
diff --git a/pyxtream/html/index.html b/pyxtream/html/index.html
index 22af5b2..c4be097 100644
--- a/pyxtream/html/index.html
+++ b/pyxtream/html/index.html
@@ -15,9 +15,40 @@