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 Package: sweeper
Priority: optional Priority: optional
Section: misc Section: misc
Version: 2.1.5-9 Version: 2.1.5-10
Architecture: mipsel Architecture: mipsel
Maintainer: af123@hummypkg.org.uk 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] 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/ 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::cf "/mod/etc/sweeper.conf"
set ::sweeper::dryrun 0 set ::sweeper::dryrun 0
set ::sweeper::lastruleresult 0 set ::sweeper::lastruleresult 0
@ -195,13 +197,7 @@ proc ::sweeper::expand {ts str {orig ""}} {
} }
#log "FNSTACK: $fnstack" 2 #log "FNSTACK: $fnstack" 2
set glist [ts genrelist] lassign [$ts genre_info] genre
set tsg [$ts get genre]
if {![dict exists $glist $tsg]} {
set genre "Unknown"
} else {
set genre [lindex $glist($tsg) 0]
}
set start [$ts get start] set start [$ts get start]
set timestamp [clock format $start -format "%Y%m%d%H%M%S"] 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} { proc ::sweeper::genre {ts genre folder} {
set glist [ts genrelist] lassign [$ts genre_info] tsgenre
if {$tsgenre eq $genre} { return 1 }
set tsg [$ts get genre]
if {![dict exists $glist $tsg]} { return 0 }
if {[lindex $glist($tsg) 0] eq $genre} { return 1 }
return 0 return 0
} }