Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [7ac004fc6d]

Overview
Comment:Reenable logging for `timer` module (seems non-functional ATM).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7ac004fc6d022de42efe95f70fc1f0d89b97fcbf
User & Date: mario on 2015-11-08 14:00:33
Other Links: manifest | tags
Context
2015-11-08
14:01
Python3 fixes (use `log.XYZ` instead of `print` statement). check-in: 00df54ba31 user: mario tags: trunk
14:00
Reenable logging for `timer` module (seems non-functional ATM). check-in: 7ac004fc6d user: mario tags: trunk
2015-09-10
19:09
Fix POST requests to use data= instead of params=, else would turn into GET-style parameters. Add extra debugging (commented out). check-in: 8f5515beb8 user: mario tags: trunk
Changes

Modified channels/timer.py from [3c5751b8b1] to [9ee919d14b].

132
133
134
135
136
137
138
139

140
141
142
143
144
145
146
132
133
134
135
136
137
138

139
140
141
142
143
144
145
146







-
+







            activity, action_method = "record", self.record
        else:
            activity, action_method = "play", self.play
        
        # add
        task = self.sched.add_daytime_task(action_method, activity, days, None, time, kronos.method.threaded, [row], {})

        #log.QUEUE( act, self.sched, (action_method, act, days, None, time, kronos.method.threaded, [row], {}), task.get_schedule_time(True) )
        log.QUEUE( activity, self.sched, (action_method, activity, days, None, time, kronos.method.threaded, [row], {}), task.get_schedule_time(True) )
    
    
    
    # converts Mon,Tue,... into numberics 1-7
    def days(self, s):
        weekdays = ["su", "mo", "tu", "we", "th", "fr", "sa", "su"]
        r = []
172
173
174
175
176
177
178
179

180
181
182
183
184
185
186
172
173
174
175
176
177
178

179
180
181
182
183
184
185
186







-
+







            url = row["url"],
            audioformat = row.get("format","audio/mpeg"), 
            listformat = row.get("listformat","href"),
        )

    # action wrapper
    def record(self, row, *args, **kwargs):
        #log.TIMER("TIMED RECORD", *args)
        log.TIMER("TIMED RECORD", *args)
        
        # extra params
        duration = self.duration(row.get(self.timefield))
        if duration:
            append = " -a %S.%d.%q -l "+str(duration*60)   # make streamripper record a whole broadcast
        else:
            append = ""