-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
28 changed files
with
703 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Voodio Change Log | ||
All notable changes to this project will be documented in this file. | ||
|
||
## [1.2.0] | ||
- 105adde Change Readme | ||
- 9a862e0 Update web static to support subtitles | ||
- 1250952 Merge branch 'feature/add-subtitle-video' into develop | ||
- f580a2d Removed comments | ||
- 0ae248d Added subtitles to json responses & parse subtitles - on web | ||
- e1ab89a Scan, detect & save .srt file info to DB | ||
- 659408d Fixed goroutines HLS extraction error & change - logging format | ||
- b3c010f Fix wrong env on build | ||
- 577a284 Update static web | ||
- 539809e Merge branch 'feature/handle-unrecognized-movie' into - develop | ||
- 25f6232 Support single unknown movie | ||
- f5a1247 Handle unrecognized movie & group movie | ||
- 903c3a9 Added go-sqlite3 runtime | ||
- d11f271 Merge branch 'master' of github.com:slaveofcode/- voodio into develop | ||
- 060ef6c Update README.md | ||
- f5984f5 Merge tag 'v1.1.1' into develop | ||
- 4ae2571 Merge branch 'release/v1.1.1' | ||
- 27ad020 Added logo | ||
- 205ddfc Merge tag 'v1.1.0' into develop | ||
|
||
## [v1.1.1] | ||
|
||
## [v1.1.0] | ||
- c6d232b Merge branch 'release/v1.1.0' | ||
- 873e945 Merge branch 'master' of github.com:slaveofcode/- voodio into release/v1.1.0 | ||
- 9654e9c Update readme | ||
- e1c12b0 Update readme | ||
- 61c443b Replace screenshot | ||
- a1cab02 Remove unused README | ||
- 81479b5 Added goreleaser config | ||
- ab7dcea Fix padding layout footer | ||
- f079056 Merge branch 'feature/add-tmdb-copyright' into develop | ||
- 579a593 Configure TMDB options for getting movie information | ||
- 03672bd Configure logo, TMDB logo and dynamic tmdb api key | ||
- b341590 Merge branch 'feature/add-opts-path' into develop | ||
- 28f2adc Removes extra UI server, combine with existing routes | ||
- f28c586 Added custom ffmpeg path | ||
- 6ad6c8e Update README.md | ||
- f233643 Update README.md | ||
- 4d48886 Update README.md | ||
- 0df288d Update README.md | ||
- 028631b Merge tag 'v1.0.0' into develop |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,44 @@ | ||
package collections | ||
|
||
import ( | ||
"path/filepath" | ||
|
||
"strings" | ||
|
||
"github.com/asticode/go-astisub" | ||
"github.com/jinzhu/gorm" | ||
"github.com/sirupsen/logrus" | ||
"github.com/slaveofcode/voodio/repository/models" | ||
) | ||
|
||
// ProcessSrt will detect .srt files on DB and convert it into .vtt to extracted movie dir | ||
func ProcessSrt(db *gorm.DB, movie *models.Movie, appDir string) error { | ||
destPath := filepath.Join(getExtractionMovieDir(appDir, movie.ID), "subs") | ||
|
||
if err := createWriteableDir(destPath); err != nil { | ||
return err | ||
} | ||
|
||
// get subs based on path movie | ||
var subs []models.Subtitle | ||
db.Where(&models.Subtitle{ | ||
DirPath: movie.DirPath, | ||
}).Find(&subs) | ||
|
||
for _, sub := range subs { | ||
// convert & save to app dir | ||
s, err := astisub.OpenFile(filepath.Join(sub.DirPath, sub.BaseName)) | ||
if err != nil { | ||
logrus.Errorln("Couldn't read the SRT file", sub.BaseName, err) | ||
} | ||
|
||
s.Write(filepath.Join(destPath, GetVTTFileName(sub.BaseName))) | ||
} | ||
|
||
return nil | ||
} | ||
|
||
// GetVTTFileName will return .vtt file based on given file name with ext | ||
func GetVTTFileName(srtFileName string) string { | ||
return strings.Split(srtFileName, ".")[0] + ".vtt" | ||
} |
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
Oops, something went wrong.