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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [68349f8772]

Overview
Comment:timer: warning for invalid dates.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 68349f877234bf375d87ad42082104377c50fdf8
User & Date: mario on 2016-12-02 20:37:15
Other Links: manifest | tags
Context
2016-12-02
20:38
Updated install/uninstall scripts, py-requests path version-independent. check-in: 66efee91b0 user: mario tags: trunk
20:37
timer: warning for invalid dates. check-in: 68349f8772 user: mario tags: trunk
20:36
Fixed VLC default path (Oliver), added quoting regexp. check-in: 1874107bb9 user: mario tags: trunk
Changes

Modified channels/timer.py from [c2e95598e0] to [54d1bc1879].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
1
2
3
4
5
6
7

8
9
10
11
12
13
14
15







-
+







# encoding: utf-8
# api: streamtuner2
# title: Recording timer
# description: Schedules play/record events for bookmarked radio stations.
# type: feature
# category: hook
# depends: kronos, action >= 1.1.1
# version: 0.7.5
# version: 0.7.6
# config: 
#   { name: timer_duration, type: select, select: "auto|streamripper|fpls", value: none, description: "Support for time ranges" }
#   { name: timer_crontab, type: bool, value: 0, description: "Utilize cron instead of runtime scheduler. (not implemented yet)" }
# priority: optional
# support: basic
#
# Provides an internal timer, to configure recording and playback times/intervals
110
111
112
113
114
115
116




117
118
119
120
121
122
123
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127







+
+
+
+







        
        # add data
        row["listformat"] = "href" #self.parent.channel().listformat
        if row.get(self.timefield):
            row["title"] = row["title"] + " -- " + row[self.timefield]
        row[self.timefield] = self.parent.timer_value.get_text()
        
        # basic check for consistency
        if not re.match("^(\w{2,3}|\*|,)+\s+(\d+:\d+[-.\d+:]*)\s+(record|play)", row[self.timefield]):
            self.parent.status("⛔ Danger, Will Robinson! → The given timer date/action is likely invalid. This won't work.", timeout=22)
        
        # store
        self.save_timer(row)
    
    
    # store row in timer database
    def save_timer(self, row):
        self.streams.append(row)