-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05d3805
commit cd076d1
Showing
9 changed files
with
123 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"media_type": 2, | ||
"has_dash_audio": true, | ||
"is_completed": true, | ||
"total_bytes": 47675288, | ||
"downloaded_bytes": 47675288, | ||
"title": "蜡笔小新【人物志】特殊的一期:春日部防卫队——最强战队", | ||
"type_tag": "80", | ||
"cover": "http:\/\/i0.hdslb.com\/bfs\/archive\/55b5d45ee6857820890e536e8823ead726bc0cbb.jpg", | ||
"video_quality": 80, | ||
"prefered_video_quality": 80, | ||
"guessed_total_bytes": 0, | ||
"total_time_milli": 1058550, | ||
"danmaku_count": 387, | ||
"time_update_stamp": 1702664375269, | ||
"time_create_stamp": 1702664199018, | ||
"can_play_in_advance": true, | ||
"interrupt_transform_temp_file": false, | ||
"quality_pithy_description": "1080P", | ||
"quality_superscript": "", | ||
"cache_version_code": 7590200, | ||
"preferred_audio_quality": 0, | ||
"audio_quality": 0, | ||
"avid": 229337132, | ||
"spid": 0, | ||
"seasion_id": 0, | ||
"bvid": "", | ||
"owner_id": 630727239, | ||
"owner_name": "茂人小头头", | ||
"page_data": { | ||
"cid": 1148286376, | ||
"page": 1, | ||
"from": "vupload", | ||
"part": "盘点《蜡笔小新》最强组织的发展史!永远的春日部防卫队!永远的友谊!", | ||
"link": "", | ||
"rich_vid": "", | ||
"vid": "", | ||
"has_alias": false, | ||
"tid": 253, | ||
"width": 1920, | ||
"height": 1080, | ||
"rotate": 0, | ||
"download_title": "", | ||
"download_subtitle": "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package sql | ||
|
||
import ( | ||
"fmt" | ||
"gorm.io/gorm" | ||
"strconv" | ||
"time" | ||
) | ||
|
||
type Bili struct { | ||
gorm.Model | ||
ID uint `gorm:"primaryKey"` | ||
Cover string `gorm:"cover,type=string"` | ||
Title string `gorm:"title"` | ||
Owner string `gorm:"owner"` | ||
PartName string `gorm:"part_name"` | ||
Original string `gorm:"original"` | ||
CreatedAt time.Time `gorm:"created_at"` | ||
UpdatedAt time.Time `gorm:"updated_at"` | ||
} | ||
|
||
var layout = "2006-01-02 15:04:05.000000000 +0800" | ||
|
||
func S2T(timestampStr string) time.Time { | ||
timestampStr = "1702664199073" | ||
timestampInt, _ := strconv.ParseInt(timestampStr, 10, 64) | ||
t := time.Unix(timestampInt/1000, 0) | ||
formattedTime := t.Format("2006-01-02 15:04:05.000000000 +0800") | ||
fmt.Println(formattedTime) | ||
return t | ||
} | ||
|
||
func (b *Bili) SetOne() *gorm.DB { | ||
|
||
return GetEngine().Create(&b) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters