mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 11:39:46 +08:00
fix: remove episodes no media id
This commit is contained in:
5
db/db.go
5
db/db.go
@@ -649,8 +649,7 @@ func (c *Client) GetMovingNamingFormat() string {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (c *Client) CleanAllDanglingEpisodes() error {
|
func (c *Client) CleanAllDanglingEpisodes() error {
|
||||||
_, err := c.ent.Episode.Delete().Where(episode.MediaID(0)).Exec(context.Background())
|
_, err := c.ent.Episode.Delete().Where(episode.Not(episode.HasMedia())).Exec(context.Background())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user