media-downloader 2.1.3__tar.gz → 2.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of media-downloader might be problematic. Click here for more details.
- {media_downloader-2.1.3/media_downloader.egg-info → media_downloader-2.1.5}/PKG-INFO +2 -2
- {media_downloader-2.1.3 → media_downloader-2.1.5}/README.md +1 -1
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader/__init__.py +6 -4
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader/media_downloader_mcp.py +23 -22
- {media_downloader-2.1.3 → media_downloader-2.1.5/media_downloader.egg-info}/PKG-INFO +2 -2
- {media_downloader-2.1.3 → media_downloader-2.1.5}/pyproject.toml +1 -1
- {media_downloader-2.1.3 → media_downloader-2.1.5}/LICENSE +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/MANIFEST.in +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader/__main__.py +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader/media_downloader.py +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/SOURCES.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/dependency_links.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/entry_points.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/requires.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/top_level.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/requirements.txt +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/setup.cfg +0 -0
- {media_downloader-2.1.3 → media_downloader-2.1.5}/tests/test_mcp.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: media-downloader
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5
|
|
4
4
|
Summary: Download audio/videos from the internet!
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -38,7 +38,7 @@ Dynamic: license-file
|
|
|
38
38
|

|
|
39
39
|

|
|
40
40
|
|
|
41
|
-
*Version: 2.1.
|
|
41
|
+
*Version: 2.1.5*
|
|
42
42
|
|
|
43
43
|
Download videos and audio from the internet!
|
|
44
44
|
|
|
@@ -6,8 +6,8 @@ import inspect
|
|
|
6
6
|
|
|
7
7
|
# List of modules to import from
|
|
8
8
|
MODULES = [
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
"media_downloader.media_downloader",
|
|
10
|
+
"media_downloader.media_downloader_mcp",
|
|
11
11
|
]
|
|
12
12
|
|
|
13
13
|
# Initialize __all__ to expose all public classes and functions
|
|
@@ -18,7 +18,9 @@ for module_name in MODULES:
|
|
|
18
18
|
module = importlib.import_module(module_name)
|
|
19
19
|
for name, obj in inspect.getmembers(module):
|
|
20
20
|
# Include only classes and functions, excluding private (starting with '_')
|
|
21
|
-
if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
|
|
21
|
+
if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
|
|
22
|
+
"_"
|
|
23
|
+
):
|
|
22
24
|
globals()[name] = obj
|
|
23
25
|
__all__.append(name)
|
|
24
26
|
|
|
@@ -26,4 +28,4 @@ for module_name in MODULES:
|
|
|
26
28
|
media-downloader
|
|
27
29
|
|
|
28
30
|
Download videos and audio from the internet!
|
|
29
|
-
"""
|
|
31
|
+
"""
|
|
@@ -31,7 +31,6 @@ def to_boolean(string: Union[str, bool] = None) -> bool:
|
|
|
31
31
|
raise ValueError(f"Cannot convert '{string}' to boolean")
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
|
|
35
34
|
@mcp.tool(
|
|
36
35
|
annotations={
|
|
37
36
|
"title": "Download Media",
|
|
@@ -43,18 +42,18 @@ def to_boolean(string: Union[str, bool] = None) -> bool:
|
|
|
43
42
|
tags={"collection_management"},
|
|
44
43
|
)
|
|
45
44
|
async def download_media(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
video_url: str = Field(description="Video URL to Download", default=None),
|
|
46
|
+
download_directory: Optional[str] = Field(
|
|
47
|
+
description="The directory where the media will be saved. If None, uses default directory.",
|
|
48
|
+
default=os.environ.get("DOWNLOAD_DIRECTORY", None),
|
|
49
|
+
),
|
|
50
|
+
audio_only: Optional[bool] = Field(
|
|
51
|
+
description="Downloads only the audio",
|
|
52
|
+
default=to_boolean(os.environ.get("AUDIO_ONLY", False)),
|
|
53
|
+
),
|
|
54
|
+
ctx: Context = Field(
|
|
55
|
+
description="MCP context for progress reporting.", default=None
|
|
56
|
+
),
|
|
58
57
|
) -> Dict[str, Any]:
|
|
59
58
|
"""
|
|
60
59
|
Downloads media from a given URL to the specified directory. Download as a video or audio file.
|
|
@@ -73,9 +72,9 @@ async def download_media(
|
|
|
73
72
|
"data": {
|
|
74
73
|
"video_url": video_url,
|
|
75
74
|
"download_directory": download_directory,
|
|
76
|
-
"audio_only": audio_only
|
|
75
|
+
"audio_only": audio_only,
|
|
77
76
|
},
|
|
78
|
-
"error": "video_url must not be empty"
|
|
77
|
+
"error": "video_url must not be empty",
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
if download_directory:
|
|
@@ -111,9 +110,9 @@ async def download_media(
|
|
|
111
110
|
"data": {
|
|
112
111
|
"video_url": video_url,
|
|
113
112
|
"download_directory": download_directory,
|
|
114
|
-
"audio_only": audio_only
|
|
113
|
+
"audio_only": audio_only,
|
|
115
114
|
},
|
|
116
|
-
"error": "Download failed or file not found"
|
|
115
|
+
"error": "Download failed or file not found",
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
# Report completion
|
|
@@ -129,20 +128,22 @@ async def download_media(
|
|
|
129
128
|
"file_path": file_path,
|
|
130
129
|
"download_directory": download_directory,
|
|
131
130
|
"audio_only": audio_only,
|
|
132
|
-
"video_url": video_url
|
|
133
|
-
}
|
|
131
|
+
"video_url": video_url,
|
|
132
|
+
},
|
|
134
133
|
}
|
|
135
134
|
except Exception as e:
|
|
136
|
-
logger.error(
|
|
135
|
+
logger.error(
|
|
136
|
+
f"Failed to download media: {str(e)}\nParams: video_url: {video_url}, download directory: {download_directory}, audio only: {audio_only}"
|
|
137
|
+
)
|
|
137
138
|
return {
|
|
138
139
|
"status": 500,
|
|
139
140
|
"message": "Failed to download media",
|
|
140
141
|
"data": {
|
|
141
142
|
"video_url": video_url,
|
|
142
143
|
"download_directory": download_directory,
|
|
143
|
-
"audio_only": audio_only
|
|
144
|
+
"audio_only": audio_only,
|
|
144
145
|
},
|
|
145
|
-
"error": str(e)
|
|
146
|
+
"error": str(e),
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: media-downloader
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.5
|
|
4
4
|
Summary: Download audio/videos from the internet!
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -38,7 +38,7 @@ Dynamic: license-file
|
|
|
38
38
|

|
|
39
39
|

|
|
40
40
|
|
|
41
|
-
*Version: 2.1.
|
|
41
|
+
*Version: 2.1.5*
|
|
42
42
|
|
|
43
43
|
Download videos and audio from the internet!
|
|
44
44
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "media-downloader"
|
|
7
|
-
version = "2.1.
|
|
7
|
+
version = "2.1.5"
|
|
8
8
|
description = "Download audio/videos from the internet!\nHost an MCP Server for Agentic AI to download videos!"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Audel Rouhi", email = "knucklessg1@gmail.com" }]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{media_downloader-2.1.3 → media_downloader-2.1.5}/media_downloader.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|