talklib 2.1.4__tar.gz → 2.1.6__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.
- {talklib-2.1.4/src/talklib.egg-info → talklib-2.1.6}/PKG-INFO +1 -1
- {talklib-2.1.4 → talklib-2.1.6}/pyproject.toml +1 -1
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/pod.py +12 -3
- {talklib-2.1.4 → talklib-2.1.6/src/talklib.egg-info}/PKG-INFO +1 -1
- {talklib-2.1.4 → talklib-2.1.6}/LICENSE.txt +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/README.md +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/requirements.txt +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/setup.cfg +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/__init__.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/ev.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/ffmpeg.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/notify.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/show.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib/utils.py +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib.egg-info/SOURCES.txt +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib.egg-info/dependency_links.txt +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib.egg-info/requires.txt +0 -0
- {talklib-2.1.4 → talklib-2.1.6}/src/talklib.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,7 @@ import time
|
|
|
8
8
|
from typing import ClassVar, Type
|
|
9
9
|
|
|
10
10
|
from fabric import Connection, Result
|
|
11
|
+
from paramiko.ssh_exception import SSHException as paramiko_SSH_exception
|
|
11
12
|
from pydantic import BaseModel, Field, model_validator
|
|
12
13
|
|
|
13
14
|
from talklib.ev import EV
|
|
@@ -69,8 +70,13 @@ class SSH(BaseModel):
|
|
|
69
70
|
self.connection.get(remote=f"shows/{folder}/{file}")
|
|
70
71
|
self.notifications.prep_syslog(message=f"Successfully downloaded '{file}' to {os.getcwd()}")
|
|
71
72
|
return file
|
|
72
|
-
except
|
|
73
|
-
to_send = f"unable to download '{file}'
|
|
73
|
+
except paramiko_SSH_exception as e:
|
|
74
|
+
to_send = f"unable to download '{file}' due to an authentication error. Are your SSH keys correctly configured?\n\
|
|
75
|
+
The error from the SSH library is: {e}"
|
|
76
|
+
self.notifications.send_notifications(message=to_send, subject='Error')
|
|
77
|
+
raise e
|
|
78
|
+
except FileNotFoundError as e:
|
|
79
|
+
to_send = f"Unable to download {file} from /{folder}. It seems the file does not exist: {e}"
|
|
74
80
|
self.notifications.send_notifications(message=to_send, subject='Error')
|
|
75
81
|
raise e
|
|
76
82
|
|
|
@@ -115,6 +121,9 @@ class SSH(BaseModel):
|
|
|
115
121
|
ret_val.append(file.lower())
|
|
116
122
|
return ret_val
|
|
117
123
|
|
|
124
|
+
def get_feed_from_folder(self, folder: str):
|
|
125
|
+
self.download_file(file="feed.xml", folder=folder)
|
|
126
|
+
|
|
118
127
|
def check_folder_exists(self, folder: str) -> bool:
|
|
119
128
|
self.notifications.prep_syslog(message=f"checking if {folder}/ exists on server...")
|
|
120
129
|
folders = self.get_folders()
|
|
@@ -152,7 +161,7 @@ class Episode(BaseModel):
|
|
|
152
161
|
return size_in_bytes
|
|
153
162
|
|
|
154
163
|
def enclosure(self) -> str:
|
|
155
|
-
enclosure = f"https://assets.library.nashville.org/talkinglibrary/shows/{self.bucket_folder}/{self.audio_filename}"
|
|
164
|
+
enclosure = f"https://dts.podtrac.com/redirect.mp3/assets.library.nashville.org/talkinglibrary/shows/{self.bucket_folder}/{self.audio_filename}"
|
|
156
165
|
self.notifications.prep_syslog(message=f"enclosure will be {enclosure}")
|
|
157
166
|
return enclosure
|
|
158
167
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|