Skip to content

Commit 094195a

Browse files
bitsmanentgithub-actions[bot]
authored andcommitted
Add support "get_only_link" (#386)
* Restore get_only_link (disabled by default). ---------
1 parent 2acaf24 commit 094195a

File tree

5 files changed

+40
-21
lines changed

5 files changed

+40
-21
lines changed

.github/.domain/domains.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"cb01new": {
3-
"domain": "quest",
4-
"full_url": "https://cb01net.quest/",
5-
"old_domain": "pics",
6-
"time_change": "2025-09-01 20:20:23"
3+
"domain": "sbs",
4+
"full_url": "https://cb01net.sbs/",
5+
"old_domain": "quest",
6+
"time_change": "2025-09-08 18:29:32"
77
},
88
"animeunity": {
99
"domain": "so",
@@ -36,10 +36,10 @@
3636
"time_change": "2025-09-06 18:24:29"
3737
},
3838
"streamingcommunity": {
39-
"domain": "bid",
40-
"full_url": "https://streamingcommunityz.bid/",
41-
"old_domain": "chat",
42-
"time_change": "2025-09-01 15:20:03"
39+
"domain": "online",
40+
"full_url": "https://streamingcommunityz.online/",
41+
"old_domain": "bid",
42+
"time_change": "2025-09-08 15:20:32"
4343
},
4444
"altadefinizionegratis": {
4545
"domain": "ist",

GUI/config.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"ita",
3939
"eng"
4040
],
41-
"cleanup_tmp_folder": true
41+
"cleanup_tmp_folder": true,
42+
"get_only_link": false
4243
},
4344
"M3U8_CONVERSION": {
4445
"use_codec": false,
@@ -62,4 +63,4 @@
6263
"x_cr_tab_id": ""
6364
}
6465
}
65-
}
66+
}

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ To enable qBittorrent integration, follow the setup guide [here](https://github.
583583
"ita", // Specify language codes or use ["*"] to download all available subtitles
584584
"eng"
585585
],
586-
"cleanup_tmp_folder": true
586+
"cleanup_tmp_folder": true,
587+
"get_only_link": false
587588
}
588589
}
589590
```
@@ -699,6 +700,9 @@ Note: Requires updated drivers and FFmpeg with hardware acceleration support.
699700
- 240p (320x240)
700701
- 144p (256x144)
701702

703+
#### Link options
704+
- `get_only_link`: Return M3U8 playlist/index URL instead of downloading
705+
702706
</details>
703707

704708
# Global Search

StreamingCommunity/Lib/Downloader/HLS/downloader.py

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
DOWNLOAD_SPECIFIC_SUBTITLE = config_manager.get_list('M3U8_DOWNLOAD', 'specific_list_subtitles')
4040
MERGE_SUBTITLE = config_manager.get_bool('M3U8_DOWNLOAD', 'merge_subs')
4141
CLEANUP_TMP = config_manager.get_bool('M3U8_DOWNLOAD', 'cleanup_tmp_folder')
42+
GET_ONLY_LINK = config_manager.get_int('M3U8_DOWNLOAD', 'get_only_link')
4243
FILTER_CUSTOM_RESOLUTION = str(config_manager.get('M3U8_CONVERSION', 'force_resolution')).strip().lower()
4344
RETRY_LIMIT = config_manager.get_int('REQUESTS', 'max_retry')
4445
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
@@ -211,10 +212,10 @@ def log_selection(self):
211212
# Get available subtitles and their languages
212213
available_subtitles = self.parser._subtitle.get_all_uris_and_names() or []
213214
available_sub_languages = [sub.get('language') for sub in available_subtitles]
214-
215+
215216
# If "*" is in DOWNLOAD_SPECIFIC_SUBTITLE, all languages are downloadable
216217
downloadable_sub_languages = available_sub_languages if "*" in DOWNLOAD_SPECIFIC_SUBTITLE else list(set(available_sub_languages) & set(DOWNLOAD_SPECIFIC_SUBTITLE))
217-
218+
218219
if available_sub_languages:
219220
console.print(
220221
f"[cyan bold]Subtitle [/cyan bold] [green]Available:[/green] [purple]{', '.join(available_sub_languages)}[/purple] | "
@@ -260,7 +261,7 @@ def download_video(self, video_url: str):
260261

261262
if result.get('stopped', False):
262263
self.stopped = True
263-
264+
264265
return self.stopped
265266

266267
def download_audio(self, audio: Dict):
@@ -304,7 +305,7 @@ def download_all(self, video_url: str, audio_streams: List[Dict], sub_streams: L
304305
"""
305306
return_stopped = False
306307
video_file = os.path.join(self.temp_dir, 'video', '0.ts')
307-
308+
308309
if not os.path.exists(video_file):
309310
if self.download_video(video_url):
310311
if not return_stopped:
@@ -421,8 +422,20 @@ def start(self) -> Dict[str, Any]:
421422
- is_master: Whether the M3U8 was a master playlist
422423
Or raises an exception if there's an error
423424
"""
425+
426+
if GET_ONLY_LINK:
427+
console.print(f"URL: [bold red]{self.m3u8_url}[/bold red]")
428+
return {
429+
'path': None,
430+
'url': self.m3u8_url,
431+
'is_master': getattr(self.m3u8_manager, 'is_master', None),
432+
'msg': None,
433+
'error': None,
434+
'stopped': True
435+
}
436+
424437
console.print("[cyan]You can safely stop the download with [bold]Ctrl+c[bold] [cyan] \n")
425-
438+
426439
if TELEGRAM_BOT:
427440
bot = get_bot_instance()
428441

@@ -440,7 +453,7 @@ def start(self) -> Dict[str, Any]:
440453
if TELEGRAM_BOT:
441454
bot.send_message("Contenuto già scaricato!", None)
442455
return response
443-
456+
444457
self.path_manager.setup_directories()
445458

446459
# Parse M3U8 and determine if it's a master playlist
@@ -524,15 +537,15 @@ def _print_summary(self, use_shortest):
524537

525538
if missing_ts:
526539
panel_content += f"\n{missing_info}"
527-
540+
528541
new_filename = self.path_manager.output_path
529542
if missing_ts and use_shortest:
530543
new_filename = new_filename.replace(".mp4", "_failed_sync_ts.mp4")
531544
elif missing_ts:
532545
new_filename = new_filename.replace(".mp4", "_failed_ts.mp4")
533546
elif use_shortest:
534547
new_filename = new_filename.replace(".mp4", "_failed_sync.mp4")
535-
548+
536549
if missing_ts or use_shortest:
537550
os.rename(self.path_manager.output_path, new_filename)
538551
self.path_manager.output_path = new_filename
@@ -541,4 +554,4 @@ def _print_summary(self, use_shortest):
541554
panel_content,
542555
title=f"{os.path.basename(self.path_manager.output_path.replace('.mp4', ''))}",
543556
border_style="green"
544-
))
557+
))

config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"ita",
3636
"eng"
3737
],
38-
"cleanup_tmp_folder": true
38+
"cleanup_tmp_folder": true,
39+
"get_only_link": false
3940
},
4041
"M3U8_CONVERSION": {
4142
"use_codec": false,

0 commit comments

Comments
 (0)