Skip to content

Commit

Permalink
use self-signed certificate for the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienPensart committed Nov 15, 2023
1 parent 6576e3b commit 558cdd7
Show file tree
Hide file tree
Showing 7 changed files with 216 additions and 138 deletions.
116 changes: 59 additions & 57 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Commands
Options:
Global options:
-c, --config FILE Config file path [default: ~/musicbot.ini]
-l, --log FILE Log file path
-q, --quiet / --no-quiet Disable progress bars [default: no-quiet]
--color / --no-color Enable or disable color in output [default: color]
-c, --config FILE Config file path [default: ~/musicbot.ini]
-l, --log FILE Log file path
-q, --quiet / --no-quiet Disable progress bars [default: no-quiet]
--color / --no-color Enable or disable color in output [default: color]
Verbosity: [mutually_exclusive]
--debug Debug verbosity
--info Info verbosity
--warning Warning verbosity
--error Error verbosity
--critical Critical verbosity
--dry / --no-dry Do not launch real action [default: no-dry]
-V, --version Show the version and exit.
-h, --help Show this message and exit.
--debug Debug verbosity
--info Info verbosity
--warning Warning verbosity
--error Error verbosity
--critical Critical verbosity
--dry / --no-dry Do not launch real action [default: no-dry]
-V, --version Show the version and exit.
-h, --help Show this message and exit.
Commands:
completion Shell completion
Expand Down Expand Up @@ -450,23 +450,24 @@ musicbot local bests
Options:
Filter options:
--prefilter [bests-4.0|bests-4.5|bests-5.0|no-album|no-artist|no-genre|no-keyword|no-rating|no-title|to-fix]
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,
max_size,min_length,max_length,min_rating,max_rating,limit
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,max_size,min_length,
max_length,min_rating,max_rating,limit
MusicDB options:
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
--dry / --no-dry Do not launch real action [default: no-dry]
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
--dry / --no-dry Do not launch real action [default: no-dry]
Links options:
--kind, --kinds [all|local|local-http|local-ssh|remote|remote-http|remote-ssh]
Generate musics paths of types [default: local]
--relative / --no-relative Generate relative links [default: no-relative]
Generate musics paths of types [default: local]
--relative / --no-relative Generate relative links [default: no-relative]
Ordering options: [mutually_exclusive]
--shuffle / --no-shuffle Randomize selection [default: no-shuffle]
--interleave / --no-interleave Interleave tracks by artist [default: no-interleave]
--shuffle / --no-shuffle Randomize selection [default: no-shuffle]
--interleave / --no-interleave
Interleave tracks by artist [default: no-interleave]
Bests options:
--min-playlist-size INTEGER Minimum size of playlist to write [default: 1]
-h, --help Show this message and exit.
--min-playlist-size INTEGER Minimum size of playlist to write [default: 1]
-h, --help Show this message and exit.
musicbot local clean
********************
Expand Down Expand Up @@ -516,22 +517,23 @@ musicbot local playlist
Options:
MusicDB options:
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
--output [json|table|m3u] Output format [default: table]
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
--output [json|table|m3u] Output format [default: table]
Filter options:
--prefilter [bests-4.0|bests-4.5|bests-5.0|no-album|no-artist|no-genre|no-keyword|no-rating|no-title|to-fix]
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,
max_size,min_length,max_length,min_rating,max_rating,limit
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,max_size,min_length,
max_length,min_rating,max_rating,limit
Links options:
--kind, --kinds [all|local|local-http|local-ssh|remote|remote-http|remote-ssh]
Generate musics paths of types [default: local]
--relative / --no-relative Generate relative links [default: no-relative]
Generate musics paths of types [default: local]
--relative / --no-relative Generate relative links [default: no-relative]
Ordering options: [mutually_exclusive]
--shuffle / --no-shuffle Randomize selection [default: no-shuffle]
--interleave / --no-interleave Interleave tracks by artist [default: no-interleave]
-h, --help Show this message and exit.
--shuffle / --no-shuffle Randomize selection [default: no-shuffle]
--interleave / --no-interleave
Interleave tracks by artist [default: no-interleave]
-h, --help Show this message and exit.
musicbot local remove
*********************
Expand Down Expand Up @@ -588,18 +590,18 @@ musicbot local sync
Options:
MusicDB options:
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
-y, --yes Confirm action
--dry / --no-dry Do not launch real action [default: no-dry]
--dsn TEXT DSN to MusicBot EdgeDB
--graphql TEXT DSN to MusicBot GrapQL
-y, --yes Confirm action
--dry / --no-dry Do not launch real action [default: no-dry]
Filter options:
--prefilter [bests-4.0|bests-4.5|bests-5.0|no-album|no-artist|no-genre|no-keyword|no-rating|no-title|to-fix]
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,
max_size,min_length,max_length,min_rating,max_rating,limit
--flat Do not create subfolders
--delete Delete files on destination if not present in library
-h, --help Show this message and exit.
Music pre filters (repeatable)
--filter TEXT Music filters (repeatable), fields: genre,keyword,artist,title,album,pattern,min_size,max_size,min_length,
max_length,min_rating,max_rating,limit
--flat Do not create subfolders
--delete Delete files on destination if not present in library
-h, --help Show this message and exit.
musicbot local watch
********************
Expand Down Expand Up @@ -633,19 +635,19 @@ musicbot music
-h, --help Show this message and exit.
Commands:
add-keywords Add keywords to music
add-keywords Add keywords to music
delete-keywords (delete-keyword,remove-keyword,remove-keywords)
Delete keywords to music
fingerprint Print music AcoustID fingerprint
flac2mp3 (flac-to-mp3) Convert flac music to mp3
help Print help
issues Check music consistency
manual-fix Fix music file
replace-keyword Replace one keyword in music
set-tags (set-tag) Set music title
shazam (recognize) Recognize music using Shazam
show Show music
tags (tag) Print music tags
Delete keywords to music
fingerprint Print music AcoustID fingerprint
flac2mp3 (flac-to-mp3) Convert flac music to mp3
help Print help
issues Check music consistency
manual-fix Fix music file
replace-keyword Replace one keyword in music
set-tags (set-tag) Set music title
shazam (recognize) Recognize music using Shazam
show Show music
tags (tag) Print music tags
musicbot music add-keywords
***************************
Expand Down
6 changes: 3 additions & 3 deletions doc/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions musicbot/musicdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def from_dsn(

if graphql is None:
parsed = urlparse(dsn)
graphql = f"http://{parsed.hostname}:{parsed.port}/db/edgedb/graphql"
graphql = f"https://{parsed.hostname}:{parsed.port}/db/edgedb/graphql"
return cls(client=client, graphql=graphql)

@property
Expand All @@ -77,7 +77,7 @@ async def query_json(self, query: str) -> str:
async def graphql_query(self, query: str) -> httpx.Response | None:
operation = {"query": query}
try:
async with httpx.AsyncClient(timeout=60) as client:
async with httpx.AsyncClient(timeout=60, verify=False) as client:
response = await client.post(
url=self.graphql,
json=operation,
Expand Down
Loading

0 comments on commit 558cdd7

Please sign in to comment.