refactored to music package

This commit is contained in:
aj 2019-10-19 17:14:11 +01:00
parent 2a16f2b476
commit 77a7583913
25 changed files with 25 additions and 25 deletions

View File

@ -1,4 +1,4 @@
from spotify import app
from music import app
app = app

View File

@ -10,11 +10,11 @@ from google.cloud import tasks_v2
from google.protobuf import timestamp_pb2
from werkzeug.security import check_password_hash, generate_password_hash
from spotify.api.decorators import login_required, login_or_basic_auth, admin_required, gae_cron, cloud_task
from spotify.tasks.run_user_playlist import run_user_playlist as run_user_playlist
from spotify.tasks.play_user_playlist import play_user_playlist as play_user_playlist
from music.api.decorators import login_required, login_or_basic_auth, admin_required, gae_cron, cloud_task
from music.tasks.run_user_playlist import run_user_playlist as run_user_playlist
from music.tasks.play_user_playlist import play_user_playlist as play_user_playlist
import spotify.db.database as database
import music.db.database as database
blueprint = Blueprint('api', __name__)
db = firestore.Client()
@ -130,7 +130,7 @@ def playlist(username=None):
# if playlist_id is None or playlist_shuffle is None:
# return jsonify({'error': 'parts and id required'}), 400
from spotify.tasks.create_playlist import create_playlist as create_playlist
from music.tasks.create_playlist import create_playlist as create_playlist
to_add = {
'name': playlist_name,

View File

@ -3,7 +3,7 @@ import logging
from flask import session, request, jsonify
from spotify.db import database as database
from music.db import database as database
logger = logging.getLogger(__name__)

View File

@ -2,9 +2,9 @@ from flask import Blueprint, jsonify
from datetime import date
import logging
from spotify.api.decorators import login_or_basic_auth, lastfm_username_required
from music.api.decorators import login_or_basic_auth, lastfm_username_required
import spotify.db.database as database
import music.db.database as database
blueprint = Blueprint('fm-api', __name__)
logger = logging.getLogger(__name__)

View File

@ -2,8 +2,8 @@ from flask import Blueprint, request, jsonify
import logging
from spotify.api.decorators import login_or_basic_auth, spotify_link_required
import spotify.db.database as database
from music.api.decorators import login_or_basic_auth, spotify_link_required
import music.db.database as database
from spotframework.model.track import SpotifyTrack
from spotframework.model.uri import Uri

View File

@ -1,8 +1,8 @@
from flask import Blueprint, jsonify, request
import logging
from spotify.api.decorators import login_or_basic_auth, lastfm_username_required, spotify_link_required
import spotify.db.database as database
from music.api.decorators import login_or_basic_auth, lastfm_username_required, spotify_link_required
import music.db.database as database
from spotfm.maths.counter import Counter
from spotframework.model.uri import Uri

View File

@ -1,8 +1,8 @@
from flask import Blueprint, request, jsonify
import logging
from spotify.api.decorators import login_or_basic_auth, spotify_link_required
import spotify.db.database as database
from music.api.decorators import login_or_basic_auth, spotify_link_required
import music.db.database as database
from spotframework.engine.playlistengine import PlaylistEngine
from spotframework.model.uri import Uri

View File

@ -8,7 +8,7 @@ import logging
from base64 import b64encode
import requests
import spotify.db.database as database
import music.db.database as database
blueprint = Blueprint('authapi', __name__)

View File

@ -6,7 +6,7 @@ from werkzeug.security import check_password_hash
from spotframework.net.network import Network as SpotifyNetwork
from fmframework.net.network import Network as FmNetwork
from spotify.db.user import DatabaseUser
from music.db.user import DatabaseUser
db = firestore.Client()

View File

@ -1,5 +1,5 @@
from google.cloud import firestore
import spotify.db.database as database
import music.db.database as database
import logging
db = firestore.Client()

View File

@ -3,8 +3,8 @@ from google.cloud import firestore
import os
from spotify.auth import auth_blueprint
from spotify.api import api_blueprint, player_blueprint, fm_blueprint, spotfm_blueprint, spotify_blueprint
from music.auth import auth_blueprint
from music.api import api_blueprint, player_blueprint, fm_blueprint, spotfm_blueprint, spotify_blueprint
db = firestore.Client()

View File

@ -2,7 +2,7 @@ from google.cloud import firestore
import logging
import spotify.db.database as database
import music.db.database as database
db = firestore.Client()

View File

@ -9,8 +9,8 @@ from spotframework.engine.processor.sort import SortReleaseDate
from spotframework.engine.processor.deduplicate import DeduplicateByID
from spotframework.player.player import Player
import spotify.db.database as database
from spotify.db.part_generator import PartGenerator
import music.db.database as database
from music.db.part_generator import PartGenerator
db = firestore.Client()

View File

@ -10,8 +10,8 @@ from spotframework.engine.processor.deduplicate import DeduplicateByID
from spotframework.model.uri import Uri
import spotify.db.database as database
from spotify.db.part_generator import PartGenerator
import music.db.database as database
from music.db.part_generator import PartGenerator
db = firestore.Client()