mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 20:15:24 +00:00
Added compatibility for Win 7 #114
This commit is contained in:
parent
dd62fa89c2
commit
7f49dc0758
179
README.md
179
README.md
@ -14,6 +14,7 @@ You can chat, help improve this repo, or just hang around for some fun in the **
|
|||||||
* [Requirement](#requirement)
|
* [Requirement](#requirement)
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Update](#update)
|
* [Update](#update)
|
||||||
|
* [Win 7](#win-7)
|
||||||
* [CONFIGURATION](#Configuration)
|
* [CONFIGURATION](#Configuration)
|
||||||
* [DOCKER](#docker)
|
* [DOCKER](#docker)
|
||||||
* [TUTORIAL](#tutorial)
|
* [TUTORIAL](#tutorial)
|
||||||
@ -65,114 +66,138 @@ python update.py
|
|||||||
python3 update.py
|
python3 update.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Win 7
|
||||||
|
|
||||||
|
Windows 7 does not enforce TLS 1.2 by default, which can lead to security issues. Follow these steps to ensure TLS 1.2 is enabled:
|
||||||
|
|
||||||
|
1. **Update Internet Explorer**:
|
||||||
|
- Ensure Internet Explorer is updated to the latest version (11).
|
||||||
|

|
||||||
|
|
||||||
|
2. **Enable TLS 1.1 and TLS 1.2**:
|
||||||
|
- Open Internet Options.
|
||||||
|
- Go to Advanced settings.
|
||||||
|
- Check "Use TLS 1.1" and "Use TLS 1.2".
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> If Internet Explorer is not updated, these Registry values won't take effect. Also, ensure update "KB3140245" is installed.
|
||||||
|
> Microsoft Knowledge Article: [KB3140245](https://support.microsoft.com/kb/3140245)
|
||||||
|
|
||||||
|
3. **Update Windows**:
|
||||||
|
- Ensure all important updates, including up to the latest 2020 Cumulative updates, are installed. This ensures the OS Trusted Certificates Store is regularly updated by Microsoft servers.
|
||||||
|
|
||||||
|
4. **Registry Configuration**:
|
||||||
|
- After installing all the latest Windows Updates, download and run the Microsoft Easy Fix tool linked in KB3140245 article ([download link](https://download.microsoft.com/download/0/6/5/0658B1A7-6D2E-474F-BC2C-D69E5B9E9A68/MicrosoftEasyFix51044.msi)).
|
||||||
|
- Alternatively, add the following values manually by copying and saving them as a `.reg` file:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
; Make all protocols available
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp\]
|
||||||
|
DefaultSecureProtocols=DWORD:0xAA0
|
||||||
|
|
||||||
|
; Make all protocols available
|
||||||
|
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp\]
|
||||||
|
DefaultSecureProtocols=DWORD:0xAA0
|
||||||
|
|
||||||
|
; TLS 1.1
|
||||||
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client]
|
||||||
|
DisabledByDefault=DWORD:0
|
||||||
|
Enabled=dword:1
|
||||||
|
|
||||||
|
; TLS 1.2
|
||||||
|
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
|
||||||
|
DisabledByDefault=DWORD:0
|
||||||
|
Enabled=dword:1
|
||||||
|
```
|
||||||
|
|
||||||
|
They should be added automatically by some .Net framework update, but in case the OS doesn't have them added already, you can put them manually, this will also improve compatibility with a lot of new .Net apps
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can change some behaviors by tweaking the configuration file.
|
You can customize the behavior of the script by tweaking the configuration file.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### Options (DEFAULT)
|
### Options (DEFAULT)
|
||||||
|
|
||||||
* debug: Whether debugging information should be displayed or not.
|
- **get_moment_title**: Whether to fetch the title of the moment or not.
|
||||||
- Default Value: false
|
- **Default Value**: false
|
||||||
|
|
||||||
* get_info: Whether additional information should be fetched or not with debug enabled.
|
- **root_path**: Path where the script will add movies and TV series folders (see [Path Examples](#Path-examples)).
|
||||||
- Default Value: false
|
- **Default Value**: media/streamingcommunity
|
||||||
|
|
||||||
* show_message: Whether messages should be displayed to the user or not.
|
- **movies_folder_name**: The folder name where all the movies will be placed. Do not put a trailing slash.
|
||||||
- Default Value: true
|
- **Default Value**: Movies
|
||||||
|
|
||||||
* clean_console: Whether the console should be cleared before displaying new information or not.
|
- **series_folder_name**: The folder name where all the TV series will be placed. Do not put a trailing slash.
|
||||||
- Default Value: true
|
- **Default Value**: Series
|
||||||
|
|
||||||
* get_moment_title: Whether to fetch the title of the moment or not.
|
- **anime_folder_name**: The folder name where all the anime will be placed. Do not put a trailing slash.
|
||||||
- Default Value: false
|
- **Default Value**: Anime
|
||||||
|
|
||||||
* root_path: Path where the script will add movies and TV series folders (see [Path Examples](#Path-examples)).
|
- **not_close**: Whether to keep the application running after completion or not.
|
||||||
- Default Value: media/streamingcommunity
|
- **Default Value**: false
|
||||||
- Example Value: /path/to/root
|
|
||||||
|
|
||||||
* movies_folder_name: The folder name where all the movies will be placed. Do not put a trailing slash.
|
---
|
||||||
- Default Value: downloaded-movies
|
|
||||||
- Example Value: Movies
|
|
||||||
|
|
||||||
* series_folder_name: The folder name where all the TV series will be placed. Do not put a trailing slash.
|
|
||||||
- Default Value: mytvseries
|
|
||||||
- Example Value: Series
|
|
||||||
|
|
||||||
* anime_folder_name: The folder name where all the anime will be placed. Do not put a trailing slash.
|
|
||||||
- Default Value: myanime
|
|
||||||
- Example Value: Anime
|
|
||||||
|
|
||||||
* not_close: Whether to keep the application running after completion or not.
|
|
||||||
- Default Value: false
|
|
||||||
|
|
||||||
### Options (SITE)
|
|
||||||
|
|
||||||
* streaming_domain: The domain of the streaming site.
|
|
||||||
- Default Value: forum
|
|
||||||
- Example Value: express
|
|
||||||
|
|
||||||
* anime_domain: The domain of the anime site.
|
|
||||||
- Default Value: to
|
|
||||||
- Example Value: estate
|
|
||||||
|
|
||||||
### Options (M3U8)
|
### Options (M3U8)
|
||||||
|
|
||||||
* tdqm_workers: The number of workers that will cooperate to download .ts files. **A high value may slow down your PC**
|
- **tdqm_workers**: The number of workers that will cooperate to download .ts files. **A high value may slow down your PC**
|
||||||
- Default Value: 20
|
- **Default Value**: 20
|
||||||
|
|
||||||
* tqdm_progress_timeout: The timeout duration for progress display updates in seconds after quit download.
|
- **tqdm_progress_timeout**: The timeout duration for progress display updates in seconds after quit download.
|
||||||
- Default Value: 10
|
- **Default Value**: 10
|
||||||
|
|
||||||
* minimum_ts_files_in_folder: The minimum number of .ts files expected in a folder.
|
- **use_openssl**: Indicates whether OpenSSL should be utilized for encryption during the conversion of TS files with key and IV.
|
||||||
- Default Value: 15
|
- **Default Value**: false
|
||||||
|
|
||||||
* download_percentage: The percentage of download completion required to consider the download complete.
|
- **use_codecs**: Specifies whether specific codecs (e.g., h264 for video, AAC for audio) should be used for converting TS files to MP4. **May slow down your PC**
|
||||||
- Default Value: 1
|
- **Default Value**: false
|
||||||
- Example Value: 0.95
|
|
||||||
|
|
||||||
* requests_timeout: The timeout duration for HTTP requests in seconds.
|
- **enable_time_quit**: Whether to enable quitting the download after a certain time period.
|
||||||
- Default Value: 5
|
- **Default Value**: false
|
||||||
|
|
||||||
* use_openssl: Indicates whether OpenSSL should be utilized for encryption during the conversion of TS files with key and IV.
|
- **tqdm_show_progress**: Whether to show progress during downloads or not. **May slow down your PC**
|
||||||
- Default Value: false
|
- **Default Value**: false
|
||||||
|
|
||||||
* use_codecs: Specifies whether specific codecs (e.g., h264 for video, AAC for audio) should be used for converting TS files to MP4. **May slow down your PC**
|
- **cleanup_tmp_folder**: Whether to clean up temporary folders after processing or not.
|
||||||
- Default Value: false
|
- **Default Value**: true
|
||||||
|
|
||||||
* enable_time_quit: Whether to enable quitting the download after a certain time period.
|
---
|
||||||
- Default Value: false
|
|
||||||
|
|
||||||
* tqdm_show_progress: Whether to show progress during downloads or not. **May slow down your PC**
|
|
||||||
- Default Value: false
|
|
||||||
|
|
||||||
* cleanup_tmp_folder: Whether to clean up temporary folders after processing or not.
|
|
||||||
- Default Value: true
|
|
||||||
|
|
||||||
### Options (M3U8_OPTIONS)
|
### Options (M3U8_OPTIONS)
|
||||||
|
|
||||||
* download_audio: Indicates whether audio files should be downloaded or not.
|
- **download_audio**: Indicates whether audio files should be downloaded or not.
|
||||||
- Default Value: true
|
- **Default Value**: true
|
||||||
|
|
||||||
* download_subtitles: Indicates whether subtitles should be downloaded or not.
|
- **download_subtitles**: Indicates whether subtitles should be downloaded or not.
|
||||||
- Default Value: true
|
- **Default Value**: true
|
||||||
|
|
||||||
* merge_subtitles: Indicates if you want to merge subs in mp4 file or separate files .vtt
|
- **merge_subtitles**: Indicates if you want to merge subs in mp4 file or separate files .vtt
|
||||||
- Default Value: true
|
- **Default Value**: true
|
||||||
|
|
||||||
* specific_list_audio: A list of specific audio languages to download.
|
- **specific_list_audio**: A list of specific audio languages to download.
|
||||||
- Default Value: ["ita"]
|
- **Default Value**: ["ita"]
|
||||||
- Example Value: ["eng", "fra"]
|
- **Example Value**: ["eng", "fra"]
|
||||||
|
|
||||||
* specific_list_subtitles: A list of specific subtitle languages to download.
|
- **specific_list_subtitles**: A list of specific subtitle languages to download.
|
||||||
- Default Value: ["eng"]
|
- **Default Value**: ["eng"]
|
||||||
- Example Value: ["spa", "por"]
|
- **Example Value**: ["spa", "por"]
|
||||||
|
|
||||||
* map_episode_name: Mapping to choose the name of all episodes of TV Shows (see [Episode Name Usage](#Episode-name-usage)).
|
- **map_episode_name**: Mapping to choose the name of all episodes of TV Shows (see [Episode Name Usage](#Episode-name-usage)).
|
||||||
- Default Value: %(tv_name)_S%(season)E%(episode)_%(episode_name)
|
- **Default Value**: %(tv_name)_S%(season)E%(episode)_%(episode_name)
|
||||||
- Example Value: %(tv_name) [S%(season)] [E%(episode)] %(episode_name)
|
- **Example Value**: %(tv_name) [S%(season)] [E%(episode)] %(episode_name)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> If you're on **Windows** you'll need to use double black slashes. On Linux/MacOS, one slash is fine.
|
> If you're on **Windows**, you'll need to use double black slashes. On Linux/MacOS, one slash is fine.
|
||||||
|
|
||||||
|
|
||||||
#### Path examples:
|
#### Path examples:
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
# Internal utilities
|
# Internal utilities
|
||||||
@ -30,7 +31,7 @@ table_show_manager = TVShowManager()
|
|||||||
|
|
||||||
|
|
||||||
# --> LOGIC
|
# --> LOGIC
|
||||||
def manage_selection(cmd_insert: str, max_count: int) -> list[int]:
|
def manage_selection(cmd_insert: str, max_count: int) -> List[int]:
|
||||||
"""
|
"""
|
||||||
Manage user selection for seasons to download.
|
Manage user selection for seasons to download.
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
from typing import Tuple
|
||||||
|
|
||||||
|
|
||||||
# External libraries
|
# External libraries
|
||||||
@ -185,7 +186,7 @@ def get_version(text: str) -> str:
|
|||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
def get_version_and_domain() -> tuple[str, str]:
|
def get_version_and_domain() -> Tuple[str, str]:
|
||||||
"""
|
"""
|
||||||
Retrieves the version and domain of a website.
|
Retrieves the version and domain of a website.
|
||||||
|
|
||||||
|
BIN
Src/Assets/win_7_install/explorer11.png
Normal file
BIN
Src/Assets/win_7_install/explorer11.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
Src/Assets/win_7_install/internet_option.png
Normal file
BIN
Src/Assets/win_7_install/internet_option.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
@ -5,6 +5,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import shutil
|
import shutil
|
||||||
|
from typing import Tuple, List, Dict
|
||||||
|
|
||||||
|
|
||||||
# External libraries
|
# External libraries
|
||||||
@ -92,7 +93,7 @@ def get_video_duration(file_path: str) -> (float):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def format_duration(seconds: float) -> list[int, int, int]:
|
def format_duration(seconds: float) -> Tuple[int, int, int]:
|
||||||
"""
|
"""
|
||||||
Format duration in seconds into hours, minutes, and seconds.
|
Format duration in seconds into hours, minutes, and seconds.
|
||||||
|
|
||||||
@ -315,7 +316,7 @@ def concatenate_and_save(file_list_path: str, output_filename: str, v_codec: str
|
|||||||
return output_file_path
|
return output_file_path
|
||||||
|
|
||||||
|
|
||||||
def join_audios(video_path: str, audio_tracks: list[dict[str, str]], prefix: str = "merged") -> str:
|
def join_audios(video_path: str, audio_tracks: List[Dict[str, str]], prefix: str = "merged") -> str:
|
||||||
"""
|
"""
|
||||||
Join video with multiple audio tracks and sync them if there are matching segments.
|
Join video with multiple audio tracks and sync them if there are matching segments.
|
||||||
|
|
||||||
@ -401,7 +402,7 @@ def join_audios(video_path: str, audio_tracks: list[dict[str, str]], prefix: str
|
|||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def transcode_with_subtitles(video: str, subtitles_list: list[dict[str, str]], output_file: str, prefix: str = "transcoded") -> str:
|
def transcode_with_subtitles(video: str, subtitles_list: List[Dict[str, str]], output_file: str, prefix: str = "transcoded") -> str:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Transcode a video with subtitles.
|
Transcode a video with subtitles.
|
||||||
|
@ -9,7 +9,17 @@ import re
|
|||||||
import urllib.parse
|
import urllib.parse
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import urllib.error
|
import urllib.error
|
||||||
from typing import Dict, Optional, Union, Unpack
|
from typing import Dict, Optional, Union
|
||||||
|
|
||||||
|
try:
|
||||||
|
from typing import Unpack
|
||||||
|
except ImportError:
|
||||||
|
# (Python <= 3.10),
|
||||||
|
try:
|
||||||
|
from typing_extensions import Unpack
|
||||||
|
except ImportError:
|
||||||
|
raise ImportError("Unable to import Unpack from typing or typing_extensions. "
|
||||||
|
"Please make sure you have the necessary libraries installed.")
|
||||||
|
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
|
@ -8,6 +8,7 @@ import hashlib
|
|||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import zipfile
|
import zipfile
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
# Costant
|
# Costant
|
||||||
@ -223,7 +224,7 @@ def compute_sha1_hash(input_string: str) -> str:
|
|||||||
return hashed_string
|
return hashed_string
|
||||||
|
|
||||||
|
|
||||||
def decode_bytes(bytes_data: bytes, encodings_to_try: list[str] = None) -> str:
|
def decode_bytes(bytes_data: bytes, encodings_to_try: List[str] = None) -> str:
|
||||||
"""
|
"""
|
||||||
Decode a byte sequence using a list of encodings and return the decoded string.
|
Decode a byte sequence using a list of encodings and return the decoded string.
|
||||||
|
|
||||||
|
9
run.py
9
run.py
@ -1,6 +1,7 @@
|
|||||||
# 10.12.23 -> 31.01.24
|
# 10.12.23 -> 31.01.24
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
import os
|
||||||
import logging
|
import logging
|
||||||
import platform
|
import platform
|
||||||
import argparse
|
import argparse
|
||||||
@ -42,6 +43,10 @@ def initialize(switch = False):
|
|||||||
Checks Python version, removes temporary folder, and displays start message.
|
Checks Python version, removes temporary folder, and displays start message.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Set terminal size for win 7
|
||||||
|
if platform.system() == "Windows" and "7" in platform.version():
|
||||||
|
os.system('mode 120, 40')
|
||||||
|
|
||||||
# Get system where script is run
|
# Get system where script is run
|
||||||
run_system = platform.system()
|
run_system = platform.system()
|
||||||
|
|
||||||
@ -55,8 +60,8 @@ def initialize(switch = False):
|
|||||||
logging.getLogger('root').setLevel(logging.ERROR)
|
logging.getLogger('root').setLevel(logging.ERROR)
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info < (3, 11):
|
if sys.version_info < (3, 7):
|
||||||
console.log("Install python version > 3.11")
|
console.log("Install python version > 3.7.16")
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user