File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ func extractIndex(c *cli.Context) (int, error) {
2929// InitCli loads the ProgrammeDB into memory
3030// and sets up the command line commands.
3131func InitCli () * cli.App {
32- dbpath := tv .GetDBPath ()
32+ dbpath := tv .DBPath ()
3333 db , err := tv .RestoreProgrammeDB (dbpath + tv .NipDB )
3434 if err != nil {
3535 panic (err )
@@ -230,7 +230,7 @@ VERSION:
230230 split := strings .Split (target , "\n " )
231231 for _ , i := range split {
232232 if strings .Contains (i , "Destination:" ) {
233- path := tv .GetDBPath ()
233+ path := tv .DBPath ()
234234 db .MarkSaved (path + i [24 :])
235235 }
236236 }
@@ -291,7 +291,7 @@ VERSION:
291291 HelpName : "refresh" ,
292292 ArgsUsage : " " ,
293293 Action : func (c * cli.Context ) error {
294- path := tv .GetDBPath ()
294+ path := tv .DBPath ()
295295 tv .RefreshDB (path + tv .NipDB )
296296 return nil
297297 },
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ func (pdb *ProgrammeDB) FindURL(index int) (string, error) {
197197// MarkSaved adds the filename of a downloaded programme + the
198198// date when it was downloaded to the SavedProgrammes entry in the ProgrammeDB.
199199func (pdb * ProgrammeDB ) MarkSaved (filename string ) {
200- path := GetDBPath ()
200+ path := DBPath ()
201201 pdbold , err := RestoreProgrammeDB (path + NipDB )
202202 if err != nil {
203203 log .Fatal (err )
@@ -283,7 +283,7 @@ func RefreshDB(filename string) {
283283}
284284
285285func init () {
286- dbpath := GetDBPath ()
286+ dbpath := DBPath ()
287287 filename := NipDB
288288 pdb , err := RestoreProgrammeDB (dbpath + filename )
289289 if err != nil {
Original file line number Diff line number Diff line change @@ -307,10 +307,10 @@ func collectPages(urls []Pager) []*IplayerDocumentResult {
307307 return results
308308}
309309
310- // GetDBPath returns the path to the json programme DB.
310+ // DBPath returns the path to the json programme DB.
311311// If no db exists at this path, it creates an empty db
312312// and saves it to disk.
313- func GetDBPath () string {
313+ func DBPath () string {
314314 home , err := homedir .Dir ()
315315 if err != nil {
316316 log .Fatal (err )
You can’t perform that action at this time.
0 commit comments