Add book scrobbling
This commit is contained in:
@ -0,0 +1,97 @@
|
||||
# Generated by Django 4.1.5 on 2023-02-19 03:53
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django_extensions.db.fields
|
||||
import scrobbles.models
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
(
|
||||
'scrobbles',
|
||||
'0019_rename_processed_on_lastfmimport_processed_finished_and_more',
|
||||
),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='audioscrobblertsvimport',
|
||||
options={},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='lastfmimport',
|
||||
options={},
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='audioscrobblertsvimport',
|
||||
old_name='processed_on',
|
||||
new_name='processed_finished',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='audioscrobblertsvimport',
|
||||
name='processing_started',
|
||||
field=models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='KoReaderImport',
|
||||
fields=[
|
||||
(
|
||||
'id',
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name='ID',
|
||||
),
|
||||
),
|
||||
(
|
||||
'created',
|
||||
django_extensions.db.fields.CreationDateTimeField(
|
||||
auto_now_add=True, verbose_name='created'
|
||||
),
|
||||
),
|
||||
(
|
||||
'modified',
|
||||
django_extensions.db.fields.ModificationDateTimeField(
|
||||
auto_now=True, verbose_name='modified'
|
||||
),
|
||||
),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
|
||||
(
|
||||
'processing_started',
|
||||
models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
(
|
||||
'processed_finished',
|
||||
models.DateTimeField(blank=True, null=True),
|
||||
),
|
||||
('process_log', models.TextField(blank=True, null=True)),
|
||||
('process_count', models.IntegerField(blank=True, null=True)),
|
||||
(
|
||||
'sqlite_file',
|
||||
models.FileField(
|
||||
blank=True,
|
||||
null=True,
|
||||
upload_to=scrobbles.models.KoReaderImport.get_path,
|
||||
),
|
||||
),
|
||||
(
|
||||
'user',
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.DO_NOTHING,
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
]
|
||||
25
vrobbler/apps/scrobbles/migrations/0021_scrobble_book.py
Normal file
25
vrobbler/apps/scrobbles/migrations/0021_scrobble_book.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.1.5 on 2023-02-19 20:20
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('books', '0001_initial'),
|
||||
('scrobbles', '0020_alter_audioscrobblertsvimport_options_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='scrobble',
|
||||
name='book',
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.DO_NOTHING,
|
||||
to='books.book',
|
||||
),
|
||||
),
|
||||
]
|
||||
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.1.5 on 2023-02-20 00:38
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('scrobbles', '0021_scrobble_book'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='scrobble',
|
||||
name='book_pages_read',
|
||||
field=models.IntegerField(blank=True, null=True),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user