fix: stream retry
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful Details

This commit is contained in:
Hazel 2024-05-15 17:14:01 +02:00
parent 19b83ce880
commit 80ad2727de
2 changed files with 2 additions and 14 deletions

View File

@ -317,7 +317,7 @@ class Connection:
name = kwargs.pop("description")
if progress > 0:
headers = dict() if headers is None else headers
headers = kwargs.get("headers", dict())
headers["Range"] = f"bytes={target.size}-"
r = self.request(

View File

@ -155,9 +155,6 @@ class Song(Base):
self.main_artist_collection.extend_object_to_attribute = {
"main_album_collection": self.album_collection
}
self.feature_artist_collection.append_object_to_attribute = {
"feature_song_collection": self
}
self.feature_artist_collection.push_to = [self.main_artist_collection]
self.main_artist_collection.pull_from = [self.feature_artist_collection]
@ -464,7 +461,6 @@ class Artist(Base):
source_collection: SourceCollection
contact_collection: Collection[Contact]
feature_song_collection: Collection[Song]
main_album_collection: Collection[Album]
label_collection: Collection[Label]
@ -479,7 +475,6 @@ class Artist(Base):
"general_genre": lambda: "",
"source_collection": SourceCollection,
"feature_song_collection": Collection,
"main_album_collection": Collection,
"contact_collection": Collection,
"label_collection": Collection,
@ -511,14 +506,10 @@ class Artist(Base):
Base.__init__(**real_kwargs)
DOWNWARDS_COLLECTION_STRING_ATTRIBUTES = ("main_album_collection", "feature_song_collection")
DOWNWARDS_COLLECTION_STRING_ATTRIBUTES = ("main_album_collection",)
UPWARDS_COLLECTION_STRING_ATTRIBUTES = ("label_collection",)
def __init_collections__(self):
self.feature_song_collection.append_object_to_attribute = {
"feature_artist_collection": self
}
self.main_album_collection.append_object_to_attribute = {
"artist_collection": self
}
@ -530,7 +521,6 @@ class Artist(Base):
def _add_other_db_objects(self, object_type: Type[OuterProxy], object_list: List[OuterProxy]):
if object_type is Song:
# this doesn't really make sense
# self.feature_song_collection.extend(object_list)
return
if object_type is Artist:
@ -628,8 +618,6 @@ class Artist(Base):
if len(self.main_album_collection) > 0:
r += f" with {len(self.main_album_collection)} albums"
if len(self.feature_song_collection) > 0:
r += f" featured in {len(self.feature_song_collection)} songs"
r += BColors.ENDC.value
return r