-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e20938a
Showing
19 changed files
with
1,445 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Python | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
*.so | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# VSCode | ||
.vscode/ | ||
*.code-workspace | ||
|
||
# Environment | ||
venv/ | ||
env/ | ||
ENV/ | ||
my_env/ | ||
|
||
# PyInstaller | ||
build/ | ||
dist/ | ||
|
||
# Logs | ||
*.log | ||
|
||
# Config local | ||
config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['src\\main.py'], | ||
pathex=['.'], | ||
binaries=[], | ||
datas=[('src/assets', 'assets'), ('src', 'src')], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
optimize=0, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
a.binaries, | ||
a.datas, | ||
[], | ||
name='GrabNWatch', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
runtime_tmpdir=None, | ||
console=False, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
icon=['src\\assets\\icon.ico'], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# GrabNWatch | ||
|
||
GrabNWatch est une application de bureau permettant de télécharger des contenus VOD à partir d'une liste M3U. | ||
|
||
## Fonctionnalités | ||
|
||
- Chargement de playlists M3U | ||
- Recherche et filtrage des VODs par catégorie | ||
- Téléchargement avec gestion de la file d'attente | ||
- Contrôle de la bande passante | ||
- Pause/Reprise des téléchargements | ||
- Statistiques de téléchargement | ||
- Mode sombre | ||
- Configuration personnalisable | ||
|
||
## Installation | ||
|
||
1. Clonez le dépôt : | ||
```bash | ||
git clone https://github.com/WatPow/GrabNWatch.git | ||
cd GrabNWatch | ||
``` | ||
|
||
2. Créer un environnement virtuel (recommandé) : | ||
```bash | ||
python -m venv venv | ||
source venv/bin/activate # Linux/Mac | ||
venv\Scripts\activate # Windows | ||
``` | ||
|
||
3. Installez les dépendances : | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Utilisation | ||
|
||
1. Lancer l'application : | ||
```bash | ||
python src/main.py | ||
``` | ||
|
||
2. Dans l'onglet "Configuration", entrer l'URL de votre playlist M3U et cliquer sur "Sauvegarder URL" | ||
|
||
3. Dans l'onglet "Téléchargement" : | ||
- Rechercher des VODs par nom | ||
- Filtrer par catégorie | ||
- Sélectionner un VOD et cliquer sur "Télécharger" | ||
|
||
4. Dans l'onglet "File d'attente" : | ||
- Voir les téléchargements en cours et en attente | ||
- Mettre en pause/reprendre les téléchargements | ||
- Annuler les téléchargements | ||
- Voir l'historique des téléchargements | ||
|
||
## Build | ||
|
||
Pour créer un exécutable Windows : | ||
|
||
Option 1 - Utiliser le script de build (recommandé) : | ||
```bash | ||
python build.py | ||
``` | ||
|
||
L'exécutable sera créé dans le dossier `dist` sous le nom `GrabNWatch.exe`. | ||
|
||
## Structure du projet | ||
|
||
``` | ||
GrabNWatch/ | ||
├── src/ | ||
│ ├── assets/ # Ressources (icônes, etc.) | ||
│ ├── core/ # Fonctionnalités principales | ||
│ │ ├── download.py # Gestion des téléchargements | ||
│ │ ├── config.py # Gestion de la configuration | ||
│ │ └── m3u.py # Parsing M3U | ||
│ ├── ui/ # Interface utilisateur | ||
│ │ ├── main_window.py | ||
│ │ ├── download_tab.py | ||
│ │ ├── queue_tab.py | ||
│ │ ├── stats_tab.py | ||
│ │ └── config_tab.py | ||
│ └── main.py # Point d'entrée | ||
├── requirements.txt | ||
└── README.md | ||
``` | ||
|
||
## Configuration | ||
|
||
La configuration est sauvegardée dans `config.json` et comprend : | ||
- URL de la playlist M3U | ||
- Limite de bande passante (KB/s, 0 = illimité) | ||
- Mode sombre | ||
- Dossier de téléchargement | ||
- Statistiques de téléchargement | ||
|
||
## Remarques importantes | ||
|
||
- Les téléchargements sont limités à un à la fois pour éviter la surcharge | ||
- Les autres téléchargements sont automatiquement mis en file d'attente | ||
- Veuillez vous assurer de ne pas avoir de flux IPTV actifs sur d'autres appareils lors de l'utilisation de GrabNWatch, sauf si vous disposez de plusieurs lignes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import PyInstaller.__main__ | ||
import os | ||
import shutil | ||
|
||
def build(): | ||
# Nettoyer les dossiers de build précédents | ||
if os.path.exists("build"): | ||
shutil.rmtree("build") | ||
if os.path.exists("dist"): | ||
shutil.rmtree("dist") | ||
|
||
# Créer le dossier assets dans dist si nécessaire | ||
os.makedirs("dist/assets", exist_ok=True) | ||
|
||
# Copier l'icône | ||
if os.path.exists("src/assets/icon.ico"): | ||
shutil.copy("src/assets/icon.ico", "dist/assets/icon.ico") | ||
|
||
# Configuration PyInstaller | ||
PyInstaller.__main__.run([ | ||
'src/main.py', # Script principal | ||
'--name=GrabNWatch', # Nom de l'exécutable | ||
'--onefile', # Un seul fichier exécutable | ||
'--windowed', # Mode fenêtré (pas de console) | ||
'--icon=src/assets/icon.ico', # Icône de l'application | ||
'--add-data=src/assets;assets', # Inclure les assets | ||
'--add-data=src;src', # Inclure tout le package src | ||
'--clean', # Nettoyer avant la construction | ||
'--noconfirm', # Ne pas demander de confirmation | ||
'--paths=.', # Ajouter le répertoire courant au PYTHONPATH | ||
]) | ||
|
||
if __name__ == "__main__": | ||
build() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
""" | ||
GrabNWatch - Application de téléchargement de VOD depuis une playlist M3U | ||
""" | ||
|
||
__version__ = "1.0.0" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
Package contenant les fonctionnalités principales | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import json | ||
import os | ||
import logging | ||
|
||
CONFIG_FILE = "config.json" | ||
|
||
def load_config(): | ||
"""Charger la configuration depuis le fichier""" | ||
default_config = { | ||
"m3u_url": "", | ||
"bandwidth_limit": 0, | ||
"dark_mode": False, | ||
"download_dir": "downloads", | ||
"stats": { | ||
"total_downloads": 0, | ||
"total_size": 0, | ||
"average_speed": 0, | ||
"download_times": [] | ||
} | ||
} | ||
|
||
if os.path.exists(CONFIG_FILE): | ||
try: | ||
with open(CONFIG_FILE, 'r') as f: | ||
config = json.load(f) | ||
# S'assurer que toutes les clés par défaut existent | ||
for key, value in default_config.items(): | ||
if key not in config: | ||
config[key] = value | ||
return config | ||
except json.JSONDecodeError: | ||
logging.error("Erreur lors de la lecture du fichier de configuration") | ||
return default_config.copy() | ||
except Exception as e: | ||
logging.error(f"Erreur inattendue lors du chargement de la configuration: {e}") | ||
return default_config.copy() | ||
return default_config.copy() | ||
|
||
def save_config(config): | ||
"""Sauvegarder la configuration dans le fichier""" | ||
try: | ||
with open(CONFIG_FILE, 'w') as f: | ||
json.dump(config, f, indent=4) | ||
logging.info("Configuration saved successfully.") | ||
except Exception as e: | ||
logging.error(f"Erreur lors de la sauvegarde de la configuration: {e}") |
Oops, something went wrong.