Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6e8d8bd

Browse files
authored
fix: scene accessibility when only later scenes are inaccessible (#1897)
1 parent5865acb commit6e8d8bd

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

‎pkg/models/model_scene.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ func (o *Scene) UpdateStatus() {
314314
iflen(files)>0 {
315315
varnewestFileDate time.Time
316316
vartotalFileSizeint64
317+
anyVideoAccessible:=false
318+
317319
forj:=rangefiles {
318320
totalFileSize=totalFileSize+files[j].Size
319321

@@ -329,18 +331,11 @@ func (o *Scene) UpdateStatus() {
329331
videos=videos+1
330332

331333
iffiles[j].Exists() {
334+
anyVideoAccessible=true
335+
332336
iffiles[j].CreatedTime.After(newestFileDate)||newestFileDate.IsZero() {
333337
newestFileDate=files[j].CreatedTime
334338
}
335-
if!o.IsAccessible {
336-
o.IsAccessible=true
337-
changed=true
338-
}
339-
}else {
340-
ifo.IsAccessible {
341-
o.IsAccessible=false
342-
changed=true
343-
}
344339
}
345340
}
346341
}
@@ -360,6 +355,11 @@ func (o *Scene) UpdateStatus() {
360355
changed=true
361356
}
362357

358+
ifanyVideoAccessible!=o.IsAccessible {
359+
o.IsAccessible=anyVideoAccessible
360+
changed=true
361+
}
362+
363363
ifvideos>0&&!o.IsAvailable {
364364
o.IsAvailable=true
365365
o.Wishlist=false

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp