Some warning cleanup.

pull/10/head
Sander Vocke 5 years ago
parent 6443888faa
commit 5dcc8451bf
  1. 2
      client/src/App.tsx
  2. 2
      client/src/components/QueryBrowseWindow.tsx
  3. 8
      scripts/gpm_retrieve/gpm_retrieve.py
  4. 2
      server/endpoints/QueryEndpointHandler.ts

@ -80,7 +80,7 @@ function AppBody() {
pushQuery(fq, fo, ft); pushQuery(fq, fo, ft);
return; return;
} }
}); }, [ itemOrder, itemQuery, itemTypes ]);
const onAppBarTabChange = (value: AppBarActiveTab) => { const onAppBarTabChange = (value: AppBarActiveTab) => {
switch (value) { switch (value) {

@ -166,7 +166,7 @@ export default function QueryBrowseWindow(props: IProps) {
'songs' in json && match && setSongs(json.songs); 'songs' in json && match && setSongs(json.songs);
'artists' in json && match && setArtists(json.artists); 'artists' in json && match && setArtists(json.artists);
}); });
}); }, [ props.query, props.resultOrder, props.typesIncluded ]);
return <> return <>
<FormControl component='fieldset'> <FormControl component='fieldset'>

@ -108,13 +108,13 @@ def uploadLibrary(mudbase_api, songs):
tagIds.append(genreTagId) tagIds.append(genreTagId)
_song = { _song = {
'title': song['title'], 'title': song['title'],
'artistIds': [ artistId ] if artistId else [], 'artistIds': [ artistId ] if artistId != None else [],
'albumIds': [ albumId ] if albumId else [], 'albumIds': [ albumId ] if albumId != None else [],
'tagIds': tagIds, 'tagIds': tagIds,
'storeLinks': [ 'https://play.google.com/music/m/' + id for id in getSongStoreIds(song) ], 'storeLinks': [ 'https://play.google.com/music/m/' + id for id in getSongStoreIds(song) ],
} }
response = requests.post(mudbase_api + '/song', json = song).json() response = requests.post(mudbase_api + '/song', json = _song).json()
print(f"Created song \"{song['title']}\" with artist ID {artistId}, response: {response}") print(f"Created song \"{song['title']}\" with artist ID {artistId}, album ID {albumId}, response: {response}")
def getData(api): def getData(api):
return { return {

@ -114,7 +114,7 @@ export const QueryEndpointHandler: EndpointHandler = async (req: any, res: any)
// Custom pagination is implemented before responding. // Custom pagination is implemented before responding.
where: getSequelizeWhere(reqObject.query, QueryType.Song), where: getSequelizeWhere(reqObject.query, QueryType.Song),
order: getSequelizeOrder(reqObject.ordering, QueryType.Song), order: getSequelizeOrder(reqObject.ordering, QueryType.Song),
include: [models.Artist, models.Album, models.Tag, models.Ranking], include: [ models.Artist, models.Album, models.Tag, models.Ranking ],
//limit: reqObject.limit, //limit: reqObject.limit,
//offset: reqObject.offset, //offset: reqObject.offset,
}) })

Loading…
Cancel
Save