Work on big refactor
This commit is contained in:
		@@ -1,7 +1,6 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.11.11 on 2018-10-03 09:12
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-11 00:19
 | 
			
		||||
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
@@ -11,14 +10,38 @@ class Migration(migrations.Migration):
 | 
			
		||||
    initial = True
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Channel',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('channel_id', models.TextField(unique=True)),
 | 
			
		||||
                ('username', models.TextField(null=True, unique=True)),
 | 
			
		||||
                ('custom_url', models.TextField(null=True, unique=True)),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('description', models.TextField()),
 | 
			
		||||
                ('icon_default', models.TextField()),
 | 
			
		||||
                ('icon_best', models.TextField()),
 | 
			
		||||
                ('upload_playlist_id', models.TextField()),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Subscription',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('playlist_id', models.TextField(unique=True)),
 | 
			
		||||
                ('description', models.TextField()),
 | 
			
		||||
                ('icon_default', models.TextField()),
 | 
			
		||||
                ('icon_best', models.TextField()),
 | 
			
		||||
                ('auto_download', models.BooleanField(null=True)),
 | 
			
		||||
                ('download_limit', models.IntegerField(null=True)),
 | 
			
		||||
                ('download_order', models.TextField(null=True)),
 | 
			
		||||
                ('manager_delete_after_watched', models.BooleanField(null=True)),
 | 
			
		||||
                ('channel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel')),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
@@ -26,12 +49,54 @@ class Migration(migrations.Migration):
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
 | 
			
		||||
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder')),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='UserSettings',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('mark_deleted_as_watched', models.BooleanField(null=True)),
 | 
			
		||||
                ('delete_watched', models.BooleanField(null=True)),
 | 
			
		||||
                ('auto_download', models.BooleanField(null=True)),
 | 
			
		||||
                ('download_global_limit', models.IntegerField(null=True)),
 | 
			
		||||
                ('download_subscription_limit', models.IntegerField(null=True)),
 | 
			
		||||
                ('download_order', models.TextField(null=True)),
 | 
			
		||||
                ('download_path', models.TextField(null=True)),
 | 
			
		||||
                ('download_file_pattern', models.TextField(null=True)),
 | 
			
		||||
                ('download_format', models.TextField(null=True)),
 | 
			
		||||
                ('download_subtitles', models.BooleanField(null=True)),
 | 
			
		||||
                ('download_autogenerated_subtitles', models.BooleanField(null=True)),
 | 
			
		||||
                ('download_subtitles_all', models.BooleanField(null=True)),
 | 
			
		||||
                ('download_subtitles_langs', models.TextField(null=True)),
 | 
			
		||||
                ('download_subtitles_format', models.TextField(null=True)),
 | 
			
		||||
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Video',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('video_id', models.TextField()),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('description', models.TextField()),
 | 
			
		||||
                ('watched', models.BooleanField(default=False)),
 | 
			
		||||
                ('downloaded_path', models.TextField(blank=True, null=True)),
 | 
			
		||||
                ('playlist_index', models.IntegerField()),
 | 
			
		||||
                ('publish_date', models.DateTimeField()),
 | 
			
		||||
                ('icon_default', models.TextField()),
 | 
			
		||||
                ('icon_best', models.TextField()),
 | 
			
		||||
                ('subscription', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Subscription')),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='parent_folder',
 | 
			
		||||
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='user',
 | 
			
		||||
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
 
 | 
			
		||||
@@ -1,47 +0,0 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.11.11 on 2018-10-03 09:23
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0001_initial'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Video',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('ytid', models.TextField()),
 | 
			
		||||
                ('downloaded_path', models.TextField(null=True)),
 | 
			
		||||
                ('watched', models.BooleanField(default=False)),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='url',
 | 
			
		||||
            field=models.TextField(default='', unique=True),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='parent_folder',
 | 
			
		||||
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='subscriptionfolder',
 | 
			
		||||
            name='parent',
 | 
			
		||||
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='subscription',
 | 
			
		||||
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Subscription'),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
							
								
								
									
										22
									
								
								YtManagerApp/migrations/0002_subscriptionfolder_user.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								YtManagerApp/migrations/0002_subscriptionfolder_user.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-11 18:16
 | 
			
		||||
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
 | 
			
		||||
        ('YtManagerApp', '0001_initial'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscriptionfolder',
 | 
			
		||||
            name='user',
 | 
			
		||||
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.11.11 on 2018-10-03 18:25
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0002_auto_20181003_0923'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='parent_folder',
 | 
			
		||||
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='subscriptionfolder',
 | 
			
		||||
            name='parent',
 | 
			
		||||
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.SubscriptionFolder'),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
							
								
								
									
										29
									
								
								YtManagerApp/migrations/0003_auto_20181013_2018.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								YtManagerApp/migrations/0003_auto_20181013_2018.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-13 17:18
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0002_subscriptionfolder_user'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='rating',
 | 
			
		||||
            field=models.FloatField(default=0.5),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='uploader_name',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='views',
 | 
			
		||||
            field=models.IntegerField(default=0),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,18 +0,0 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-05 13:26
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0003_auto_20181003_1825'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AlterField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='downloaded_path',
 | 
			
		||||
            field=models.TextField(blank=True, null=True),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,57 +0,0 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-07 17:15
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.db.models.deletion
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0004_auto_20181005_1626'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.CreateModel(
 | 
			
		||||
            name='Channel',
 | 
			
		||||
            fields=[
 | 
			
		||||
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
 | 
			
		||||
                ('channel_id', models.TextField(unique=True)),
 | 
			
		||||
                ('username', models.TextField(null=True, unique=True)),
 | 
			
		||||
                ('custom_url', models.TextField(null=True, unique=True)),
 | 
			
		||||
                ('name', models.TextField()),
 | 
			
		||||
                ('description', models.TextField()),
 | 
			
		||||
                ('icon_default', models.TextField()),
 | 
			
		||||
                ('icon_best', models.TextField()),
 | 
			
		||||
                ('upload_playlist_id', models.TextField()),
 | 
			
		||||
            ],
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.RenameField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            old_name='url',
 | 
			
		||||
            new_name='playlist_id',
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='description',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='icon_best',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='icon_default',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='channel',
 | 
			
		||||
            field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='YtManagerApp.Channel'),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,49 +0,0 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-07 21:37
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
import django.utils.timezone
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0005_auto_20181007_2015'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.RenameField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            old_name='ytid',
 | 
			
		||||
            new_name='video_id',
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='description',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='icon_best',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='icon_default',
 | 
			
		||||
            field=models.TextField(default=None),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='playlist_index',
 | 
			
		||||
            field=models.IntegerField(default=0),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='video',
 | 
			
		||||
            name='publish_date',
 | 
			
		||||
            field=models.DateTimeField(default=django.utils.timezone.now),
 | 
			
		||||
            preserve_default=False,
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
# Generated by Django 2.1.2 on 2018-10-08 23:09
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ('YtManagerApp', '0006_auto_20181008_0037'),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    operations = [
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='downloader_enabled',
 | 
			
		||||
            field=models.BooleanField(null=True),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='downloader_limit',
 | 
			
		||||
            field=models.IntegerField(null=True),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='downloader_order',
 | 
			
		||||
            field=models.TextField(null=True),
 | 
			
		||||
        ),
 | 
			
		||||
        migrations.AddField(
 | 
			
		||||
            model_name='subscription',
 | 
			
		||||
            name='manager_delete_after_watched',
 | 
			
		||||
            field=models.BooleanField(null=True),
 | 
			
		||||
        ),
 | 
			
		||||
    ]
 | 
			
		||||
		Reference in New Issue
	
	Block a user