Remove mux database

This commit is contained in:
prpr 2023-07-01 00:02:48 +01:00
parent 8713ea9495
commit 90b69d0d21
3 changed files with 4 additions and 20 deletions

View File

@ -75,8 +75,7 @@ if {$cmd eq "update" || $cmd eq "upgrade"} {
putsf ""
putsf "Updating diagnostic meta information"
pkg fetchdiagmeta
putsf "Updating MUX database"
pkg fetchmuxdb
pkg removemuxdb
}
putsf "Done."

View File

@ -12,7 +12,7 @@ if {[catch {set db [sqlite3.open /var/lib/humaxtv/channel.db]} msg]} {
exit
}
pkg loadmuxdb
pkg removemuxdb
proc f2c {frequency} {
return $(int((($frequency / 1000) - 303.25) / 8))

View File

@ -260,23 +260,8 @@ proc {pkg fetchdiagmeta} {} {
$ff close
}
proc {pkg loadmuxdb} {} {
if {[llength $::muxdb]} { return }
if {![file exists "/mod/var/mux.db"]} {
catch {pkg fetchmuxdb}
} else {
set meta [open "/mod/var/mux.db" r]
set ::muxdb [read $meta]
$meta close
}
}
proc {pkg fetchmuxdb} {} {
set ::muxdb [pkg fetchfile mux.db]
set ff [open "/mod/var/mux.db" w]
puts $ff $::muxdb
$ff close
proc {pkg removemuxdb} {} {
file delete "/mod/var/mux.db"
}
proc {pkg update} {} {