Move lookup modules to approp app

This commit is contained in:
2023-03-04 16:04:52 -05:00
parent 00aa2e892f
commit 90b7be286c
13 changed files with 10 additions and 11 deletions

View File

@ -3,9 +3,9 @@ import pytest
from django.urls import reverse from django.urls import reverse
from scrobbles.models import Scrobble from vrobbler.apps.scrobbles.models import Scrobble
from music.models import Track from vrobbler.apps.music.models import Track
from podcasts.models import Episode from vrobbler.apps.podcasts.models import Episode
@pytest.mark.django_db @pytest.mark.django_db

View File

View File

@ -1,6 +1,6 @@
import pytest import pytest
from vrobbler.apps.scrobbles.imdb import lookup_video_from_imdb from vrobbler.apps.videos.imdb import lookup_video_from_imdb
@pytest.mark.skip(reason="Need to sort out third party API testing") @pytest.mark.skip(reason="Need to sort out third party API testing")

View File

@ -12,8 +12,7 @@ from django.urls import reverse
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django_extensions.db.models import TimeStampedModel from django_extensions.db.models import TimeStampedModel
from scrobbles.mixins import ScrobblableMixin from scrobbles.mixins import ScrobblableMixin
from scrobbles.theaudiodb import lookup_artist_from_tadb from music.theaudiodb import lookup_artist_from_tadb, lookup_album_from_tadb
from vrobbler.apps.scrobbles.theaudiodb import lookup_album_from_tadb
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
BNULL = {"blank": True, "null": True} BNULL = {"blank": True, "null": True}

View File

@ -3,7 +3,7 @@ import re
from musicbrainzngs.caa import musicbrainz from musicbrainzngs.caa import musicbrainz
from scrobbles.musicbrainz import ( from music.musicbrainz import (
lookup_album_dict_from_mb, lookup_album_dict_from_mb,
lookup_artist_from_mb, lookup_artist_from_mb,
lookup_track_from_mb, lookup_track_from_mb,

View File

@ -9,9 +9,9 @@ from django.db import models
from django.urls import reverse from django.urls import reverse
from django.utils import timezone from django.utils import timezone
from django_extensions.db.models import TimeStampedModel from django_extensions.db.models import TimeStampedModel
from music.lastfm import LastFM
from music.models import Artist, Track from music.models import Artist, Track
from podcasts.models import Episode from podcasts.models import Episode
from scrobbles.lastfm import LastFM
from scrobbles.utils import check_scrobble_for_finish from scrobbles.utils import check_scrobble_for_finish
from sports.models import SportEvent from sports.models import SportEvent
from videos.models import Series, Video from videos.models import Series, Video
@ -144,7 +144,7 @@ class KoReaderImport(BaseFileImportMixin):
sqlite_file = models.FileField(upload_to=get_path, **BNULL) sqlite_file = models.FileField(upload_to=get_path, **BNULL)
def process(self, force=False): def process(self, force=False):
from scrobbles.koreader import process_koreader_sqlite_file from books.koreader import process_koreader_sqlite_file
if self.processed_finished and not force: if self.processed_finished and not force:
logger.info( logger.info(

View File

@ -34,7 +34,6 @@ from scrobbles.constants import (
) )
from scrobbles.export import export_scrobbles from scrobbles.export import export_scrobbles
from scrobbles.forms import ExportScrobbleForm, ScrobbleForm from scrobbles.forms import ExportScrobbleForm, ScrobbleForm
from scrobbles.imdb import lookup_video_from_imdb
from scrobbles.models import ( from scrobbles.models import (
AudioScrobblerTSVImport, AudioScrobblerTSVImport,
ChartRecord, ChartRecord,
@ -55,7 +54,8 @@ from scrobbles.tasks import (
process_lastfm_import, process_lastfm_import,
process_tsv_import, process_tsv_import,
) )
from scrobbles.thesportsdb import lookup_event_from_thesportsdb from sports.thesportsdb import lookup_event_from_thesportsdb
from videos.imdb import lookup_video_from_imdb
from vrobbler.apps.music.aggregators import live_charts from vrobbler.apps.music.aggregators import live_charts