mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
fix(releases): add null handling for new fields (#1892)
* fix(web): react fragment props warnings * fix(releases): handle new NULL values
This commit is contained in:
parent
9ae798c99a
commit
0cf704dba3
5 changed files with 13 additions and 10 deletions
|
@ -1257,7 +1257,7 @@ ALTER TABLE "release"
|
|||
ADD IF NOT EXISTS cut TEXT;
|
||||
|
||||
ALTER TABLE "release"
|
||||
ADD IF NOT EXISTS hybrid TEXT;
|
||||
ADD IF NOT EXISTS hybrid BOOLEAN DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE "release"
|
||||
ADD IF NOT EXISTS region TEXT;
|
||||
|
|
|
@ -367,7 +367,7 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
|
|||
var rls domain.Release
|
||||
var ras domain.ReleaseActionStatus
|
||||
|
||||
var rlsIndexer, rlsIndexerName, rlsIndexerExternalName, rlsFilter, rlsAnnounceType, infoUrl, downloadUrl, subTitle, normalizedHash, codec, hdr, rlsType, audioStr, languageStr, editionStr, cutStr, website sql.NullString
|
||||
var rlsIndexer, rlsIndexerName, rlsIndexerExternalName, rlsFilter, rlsAnnounceType, infoUrl, downloadUrl, subTitle, normalizedHash, codec, hdr, rlsType, audioStr, audioChannels, region, languageStr, editionStr, cutStr, website, mediaProcessing sql.NullString
|
||||
|
||||
var rlsIndexerID sql.NullInt64
|
||||
var rasId, rasFilterId, rasReleaseId, rasActionId sql.NullInt64
|
||||
|
@ -403,9 +403,9 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
|
|||
&rls.Container,
|
||||
&hdr,
|
||||
&audioStr,
|
||||
&rls.AudioChannels,
|
||||
&audioChannels,
|
||||
&rls.Group,
|
||||
&rls.Region,
|
||||
®ion,
|
||||
&languageStr,
|
||||
&editionStr,
|
||||
&cutStr,
|
||||
|
@ -413,7 +413,7 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
|
|||
&rls.Proper,
|
||||
&rls.Repack,
|
||||
&website,
|
||||
&rls.MediaProcessing,
|
||||
&mediaProcessing,
|
||||
&rlsType,
|
||||
&rls.Timestamp,
|
||||
&rasId, &rasStatus, &rasAction, &rasActionId, &rasType, &rasClient, &rasFilter, &rasFilterId, &rasReleaseId, pq.Array(&rasRejections), &rasTimestamp, &resp.TotalCount,
|
||||
|
@ -471,10 +471,13 @@ func (repo *ReleaseRepo) findReleases(ctx context.Context, tx *Tx, params domain
|
|||
rls.Codec = strings.Split(codec.String, ",")
|
||||
rls.HDR = strings.Split(hdr.String, ",")
|
||||
rls.Audio = strings.Split(audioStr.String, ",")
|
||||
rls.AudioChannels = audioChannels.String
|
||||
rls.Language = strings.Split(languageStr.String, ",")
|
||||
rls.Region = region.String
|
||||
rls.Edition = strings.Split(editionStr.String, ",")
|
||||
rls.Cut = strings.Split(cutStr.String, ",")
|
||||
rls.Website = website.String
|
||||
rls.MediaProcessing = mediaProcessing.String
|
||||
//rls.Type = rlsType.String
|
||||
if rlsType.Valid {
|
||||
rls.ParseType(rlsType.String)
|
||||
|
|
|
@ -1902,7 +1902,7 @@ ALTER TABLE "release"
|
|||
ADD cut TEXT;
|
||||
|
||||
ALTER TABLE "release"
|
||||
ADD hybrid TEXT;
|
||||
ADD hybrid BOOLEAN DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE "release"
|
||||
ADD region TEXT;
|
||||
|
|
|
@ -510,7 +510,7 @@ export const AgeSelect = ({
|
|||
setDuration(value);
|
||||
}}>
|
||||
{({ open }) => (
|
||||
<>
|
||||
<div>
|
||||
<div className="mt-0 relative">
|
||||
<ListboxButton className="block w-full relative shadow-sm text-sm text-left rounded-md border pl-3 pr-10 py-2.5 focus:ring-blue-500 dark:focus:ring-blue-500 focus:border-blue-500 dark:focus:border-blue-500 border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-815 dark:text-gray-400">
|
||||
<span className="block truncate text-gray-500 dark:text-white">
|
||||
|
@ -552,7 +552,7 @@ export const AgeSelect = ({
|
|||
</ListboxOptions>
|
||||
</Transition>
|
||||
</div>
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</Listbox>
|
||||
</div>
|
||||
|
|
|
@ -278,10 +278,10 @@ function DeleteReleases() {
|
|||
{[
|
||||
{
|
||||
label: (
|
||||
<>
|
||||
<span>
|
||||
Older than:
|
||||
<span className="text-red-600 dark:text-red-500"> *</span>
|
||||
</>
|
||||
</span>
|
||||
),
|
||||
content: <AgeSelect duration={duration} setDuration={setDuration} setParsedDuration={setParsedDuration}/>
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue