mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-18 00:54:50 -04:00
Remove dummy URL methods
This commit is contained in:
parent
5ad725569d
commit
a0eebfa6b6
1 changed files with 2 additions and 7 deletions
|
@ -228,8 +228,7 @@ class Main:
|
|||
search_results = SearchResults.from_pages(source, media_type, pages)
|
||||
assert len(search_results.results) > 0
|
||||
first = search_results.results[0]
|
||||
url = self.dummy_url(source, first.media_type(), first.id)
|
||||
await self.add(url)
|
||||
await self.add_by_id(source, first.media_type(), first.id)
|
||||
|
||||
async def search_output_file(
|
||||
self, source: str, media_type: str, query: str, filepath: str, limit: int
|
||||
|
@ -248,7 +247,7 @@ class Main:
|
|||
await f.write(file_contents)
|
||||
|
||||
console.print(
|
||||
f"Wrote dummy urls for [purple]{len(search_results.results)}[/purple] results to [cyan]{filepath}!"
|
||||
f"Wrote [purple]{len(search_results.results)}[/purple] results to [cyan]{filepath} as JSON!"
|
||||
)
|
||||
|
||||
async def resolve_lastfm(self, playlist_url: str):
|
||||
|
@ -273,10 +272,6 @@ class Main:
|
|||
if playlist is not None:
|
||||
self.media.append(playlist)
|
||||
|
||||
@staticmethod
|
||||
def dummy_url(source, media_type, item_id):
|
||||
return f"http://{source}.com/{media_type}/{item_id}"
|
||||
|
||||
async def __aenter__(self):
|
||||
return self
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue