mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 05:56:37 +00:00
increase cached title length to 200 chars, ensure title is never set over 200 chars, resolves #518 (related to #515)
This commit is contained in:
parent
99e6280334
commit
69a824e334
28
tubesync/sync/migrations/0024_auto_20240717_1535.py
Normal file
28
tubesync/sync/migrations/0024_auto_20240717_1535.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Generated by Django 3.2.25 on 2024-07-17 15:35
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('sync', '0023_media_duration_filter'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='media',
|
||||||
|
name='manual_skip',
|
||||||
|
field=models.BooleanField(db_index=True, default=False, help_text='Media marked as "skipped", won\'t be downloaded', verbose_name='manual_skip'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='media',
|
||||||
|
name='title',
|
||||||
|
field=models.CharField(blank=True, default='', help_text='Video title', max_length=200, verbose_name='title'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='source',
|
||||||
|
name='filter_text',
|
||||||
|
field=models.CharField(blank=True, default='', help_text='Regex compatible filter string for video titles', max_length=200, verbose_name='filter string'),
|
||||||
|
),
|
||||||
|
]
|
@ -889,7 +889,7 @@ class Media(models.Model):
|
|||||||
)
|
)
|
||||||
title = models.CharField(
|
title = models.CharField(
|
||||||
_('title'),
|
_('title'),
|
||||||
max_length=100,
|
max_length=200,
|
||||||
blank=True,
|
blank=True,
|
||||||
null=False,
|
null=False,
|
||||||
default='',
|
default='',
|
||||||
|
@ -297,7 +297,7 @@ def download_media_metadata(media_id):
|
|||||||
|
|
||||||
# Store title in DB so it's fast to access
|
# Store title in DB so it's fast to access
|
||||||
if media.metadata_title:
|
if media.metadata_title:
|
||||||
media.title = media.metadata_title
|
media.title = media.metadata_title[:200]
|
||||||
|
|
||||||
# Store duration in DB so it's fast to access
|
# Store duration in DB so it's fast to access
|
||||||
if media.metadata_duration:
|
if media.metadata_duration:
|
||||||
|
Loading…
Reference in New Issue
Block a user