Skip to content

Commit 02086f7

Browse files
committed
Bump v3.2.6
1 parent a68a4a1 commit 02086f7

File tree

35 files changed

+255
-358
lines changed

35 files changed

+255
-358
lines changed

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ python run_streaming.py
111111
Download HTTP Live Streaming (HLS) content from m3u8 URLs.
112112

113113
```python
114-
from StreamingCommunity.Download import HLS_Downloader
114+
from StreamingCommunity import HLS_Downloader
115115

116116
# Initialize with m3u8 URL and optional output path
117117
downloader = HLS_Downloader(
@@ -132,7 +132,7 @@ See [HLS example](./Test/Download/HLS.py) for complete usage.
132132
Direct MP4 file downloader with support for custom headers and referrer.
133133

134134
```python
135-
from StreamingCommunity.Download import MP4_downloader
135+
from StreamingCommunity import MP4_downloader
136136

137137
# Basic usage
138138
downloader = MP4_downloader(
@@ -164,7 +164,7 @@ See [MP4 example](./Test/Download/MP4.py) for complete usage.
164164
Download content via torrent magnet links.
165165

166166
```python
167-
from StreamingCommunity.Download import TOR_downloader
167+
from StreamingCommunity import TOR_downloader
168168

169169
# Initialize torrent client
170170
client = TOR_downloader()
@@ -488,8 +488,6 @@ To enable qBittorrent integration, follow the setup guide [here](https://github.
488488
"default_video_workser": 12,
489489
"default_audio_workser": 12,
490490
"segment_timeout": 8,
491-
"download_audio": true,
492-
"merge_audio": true,
493491
"specific_list_audio": [
494492
"ita"
495493
],
@@ -514,7 +512,6 @@ To enable qBittorrent integration, follow the setup guide [here](https://github.
514512

515513
#### Audio Settings
516514
- `download_audio`: Whether to download audio tracks
517-
- `merge_audio`: Whether to merge audio with video
518515
- `specific_list_audio`: List of audio languages to download
519516
* Can be changed with `--specific_list_audio ita,eng`
520517

StreamingCommunity/Api/Site/altadefinizione/film.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@
1212

1313
# Internal utilities
1414
from StreamingCommunity.Util.os import os_manager
15-
from StreamingCommunity.Util.message import start_message
1615
from StreamingCommunity.Util.headers import get_headers
16+
from StreamingCommunity.Util.message import start_message
1717
from StreamingCommunity.Util.config_json import config_manager
18-
from StreamingCommunity.Lib.Downloader import HLS_Downloader
1918
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance, TelegramSession
2019

2120

@@ -25,6 +24,7 @@
2524

2625

2726
# Player
27+
from StreamingCommunity import HLS_Downloader
2828
from StreamingCommunity.Api.Player.supervideo import VideoSource
2929

3030

StreamingCommunity/Api/Site/altadefinizione/series.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
# Internal utilities
1313
from StreamingCommunity.Util.message import start_message
14-
from StreamingCommunity.Lib.Downloader import HLS_Downloader
1514
from StreamingCommunity.TelegramHelp.telegram_bot import get_bot_instance, TelegramSession
1615

1716

@@ -29,6 +28,7 @@
2928

3029

3130
# Player
31+
from StreamingCommunity import HLS_Downloader
3232
from StreamingCommunity.Api.Player.supervideo import VideoSource
3333

3434

StreamingCommunity/Api/Site/animeunity/serie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# Internal utilities
1313
from StreamingCommunity.Util.os import os_manager
1414
from StreamingCommunity.Util.message import start_message
15-
from StreamingCommunity.Lib.Downloader import MP4_downloader
1615
from StreamingCommunity.TelegramHelp.telegram_bot import TelegramSession, get_bot_instance
1716

1817

@@ -24,6 +23,7 @@
2423

2524

2625
# Player
26+
from StreamingCommunity import MP4_downloader
2727
from StreamingCommunity.Api.Player.vixcloud import VideoSourceAnime
2828

2929

StreamingCommunity/Api/Site/animeworld/film.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# Internal utilities
1010
from StreamingCommunity.Util.os import os_manager
1111
from StreamingCommunity.Util.message import start_message
12-
from StreamingCommunity.Lib.Downloader import MP4_downloader
1312

1413

1514
# Logic class
@@ -19,6 +18,7 @@
1918

2019

2120
# Player
21+
from StreamingCommunity import MP4_downloader
2222
from StreamingCommunity.Api.Player.sweetpixel import VideoSource
2323

2424

StreamingCommunity/Api/Site/animeworld/serie.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# 11.03.24
22

33
import os
4-
import logging
54
from typing import Tuple
65

76

@@ -13,7 +12,6 @@
1312
# Internal utilities
1413
from StreamingCommunity.Util.os import os_manager
1514
from StreamingCommunity.Util.message import start_message
16-
from StreamingCommunity.Lib.Downloader import MP4_downloader
1715

1816

1917
# Logic class
@@ -24,6 +22,7 @@
2422

2523

2624
# Player
25+
from StreamingCommunity import MP4_downloader
2726
from StreamingCommunity.Api.Player.sweetpixel import VideoSource
2827

2928

StreamingCommunity/Api/Site/cb01new/film.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# Internal utilities
1111
from StreamingCommunity.Util.os import os_manager
1212
from StreamingCommunity.Util.message import start_message
13-
from StreamingCommunity.Lib.Downloader import HLS_Downloader
1413

1514

1615
# Logic class
@@ -19,6 +18,7 @@
1918

2019

2120
# Player
21+
from StreamingCommunity import HLS_Downloader
2222
from StreamingCommunity.Api.Player.maxstream import VideoSource
2323

2424

StreamingCommunity/Api/Site/crunchyroll/film.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99

1010

1111
# Internal utilities
12-
from StreamingCommunity.Util.os import os_manager
1312
from StreamingCommunity.Util.message import start_message
1413
from StreamingCommunity.Util.config_json import config_manager
15-
from StreamingCommunity.Util.os import get_wvd_path
16-
from StreamingCommunity.Lib.Downloader.DASH.downloader import DASH_Download
14+
from StreamingCommunity.Util.os import os_manager, get_wvd_path
1715

1816

1917
# Logic class
@@ -22,6 +20,7 @@
2220

2321

2422
# Player
23+
from StreamingCommunity import DASH_Downloader
2524
from .util.get_license import get_playback_session, get_auth_token, generate_device_id
2625

2726

@@ -55,7 +54,7 @@ def download_film(select_title: MediaItem) -> str:
5554
query_params = parse_qs(parsed_url.query)
5655

5756
# Download the episode
58-
r_proc = DASH_Download(
57+
r_proc = DASH_Downloader(
5958
cdm_device=get_wvd_path(),
6059
license_url='https://www.crunchyroll.com/license/v1/license/widevine',
6160
mpd_url=mpd_url,

StreamingCommunity/Api/Site/crunchyroll/series.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@
1212

1313
# Internal utilities
1414
from StreamingCommunity.Util.message import start_message
15-
from StreamingCommunity.Util.os import os_manager
16-
from StreamingCommunity.Util.os import get_wvd_path
17-
from StreamingCommunity.Lib.Downloader.DASH.downloader import DASH_Download
15+
from StreamingCommunity.Util.os import os_manager, get_wvd_path
1816

1917

2018
# Logic class
21-
from .util.ScrapeSerie import GetSerieInfo
19+
from .util.ScrapeSerie import GetSerieInfo, delete_stream_episode
2220
from StreamingCommunity.Api.Template.Util import (
2321
manage_selection,
2422
map_episode_title,
@@ -31,6 +29,7 @@
3129

3230

3331
# Player
32+
from StreamingCommunity import DASH_Downloader
3433
from .util.get_license import get_playback_session, get_auth_token, generate_device_id
3534

3635

@@ -65,12 +64,14 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
6564
# Generate mpd and license URLs
6665
url_id = obj_episode.get('url').split('/')[-1]
6766
device_id = generate_device_id()
68-
mpd_url, mpd_headers = get_playback_session(get_auth_token(device_id), device_id, url_id)
67+
token_mpd = get_auth_token(device_id)
68+
69+
mpd_url, mpd_headers = get_playback_session(token_mpd, device_id, url_id)
6970
parsed_url = urlparse(mpd_url)
7071
query_params = parse_qs(parsed_url.query)
7172

7273
# Download the episode
73-
r_proc = DASH_Download(
74+
r_proc = DASH_Downloader(
7475
cdm_device=get_wvd_path(),
7576
license_url='https://www.crunchyroll.com/license/v1/license/widevine',
7677
mpd_url=mpd_url,
@@ -95,6 +96,9 @@ def download_video(index_season_selected: int, index_episode_selected: int, scra
9596
try: os.remove(status['path'])
9697
except Exception: pass
9798

99+
# Delete episode stream
100+
delete_stream_episode(url_id, query_params['playbackGuid'][0], mpd_headers)
101+
98102
return status['path'], status['stopped']
99103

100104
def download_episode(index_season_selected: int, scrape_serie: GetSerieInfo, download_all: bool = False, episode_selection: str = None) -> None:

StreamingCommunity/Api/Site/crunchyroll/util/ScrapeSerie.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@ def get_season_episodes(season_id, headers, params):
4545
)
4646
return response
4747

48+
def delete_stream_episode(episode_id, stream_id, headers):
49+
"""
50+
Deletes a specific stream episode by episode ID and stream ID.
51+
"""
52+
url = f'https://www.crunchyroll.com/playback/v1/token/{episode_id}/{stream_id}'
53+
headers = get_headers()
54+
55+
response = requests.delete(
56+
url,
57+
headers=headers,
58+
impersonate="chrome110"
59+
)
60+
61+
if response.status_code == 204:
62+
return True
63+
64+
else:
65+
logging.error(f"Failed to delete stream episode: {response.status_code} - {response.text}")
66+
return False
67+
4868

4969
class GetSerieInfo:
5070
def __init__(self, series_id):

0 commit comments

Comments
 (0)