Use newer genre methods

This commit is contained in:
hummypkg 2018-01-30 01:31:13 +00:00
parent 646e512109
commit e92df126f1
2 changed files with 7 additions and 15 deletions

View File

@ -1,9 +1,9 @@
Package: sweeper
Priority: optional
Section: misc
Version: 2.1.5-9
Version: 2.1.5-10
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif(>=1.4.0)
Depends: webif(>=1.4.2-10)
Description: Sweeper is a package for managing recordings in a variety of ways using custom rules [Add %bfolder token]
Tags: http://hummy.tv/forum/threads/5138/

View File

@ -1,4 +1,6 @@
require epg.class
set ::sweeper::cf "/mod/etc/sweeper.conf"
set ::sweeper::dryrun 0
set ::sweeper::lastruleresult 0
@ -195,13 +197,7 @@ proc ::sweeper::expand {ts str {orig ""}} {
}
#log "FNSTACK: $fnstack" 2
set glist [ts genrelist]
set tsg [$ts get genre]
if {![dict exists $glist $tsg]} {
set genre "Unknown"
} else {
set genre [lindex $glist($tsg) 0]
}
lassign [$ts genre_info] genre
set start [$ts get start]
set timestamp [clock format $start -format "%Y%m%d%H%M%S"]
@ -543,12 +539,8 @@ proc ::sweeper::guidance {ts str folder} {
}
proc ::sweeper::genre {ts genre folder} {
set glist [ts genrelist]
set tsg [$ts get genre]
if {![dict exists $glist $tsg]} { return 0 }
if {[lindex $glist($tsg) 0] eq $genre} { return 1 }
lassign [$ts genre_info] tsgenre
if {$tsgenre eq $genre} { return 1 }
return 0
}