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

⌈⌋ branch:  streamtuner2


Check-in [e332cd9fe0]

Overview
Comment:Fix incorrect timespec format warning
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e332cd9fe0b0faea2b9748d6710c0b8425882c24
User & Date: mario on 2016-12-09 18:36:58
Other Links: manifest | tags
Context
2016-12-09
18:37
Typo fix and deleting old html pages exportcat/extending/live365 check-in: 32d14f2031 user: mario tags: trunk
18:36
Fix incorrect timespec format warning check-in: e332cd9fe0 user: mario tags: trunk
2016-12-04
17:34
Fix file copying. check-in: 4fbffabae1 user: mario tags: trunk
Changes

Modified channels/timer.py from [5943cf3866] to [e5d0046412].

100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

115


116
117
118
119
120
121
122
123
124

125
126
127
128
129
130
131

    # done        
    def hide(self, *w):
        return self.parent.timer_dialog.hide()

    # close dialog,get data
    def add_timer(self, *w):
        row = self.parent.row()
        row = copy.copy(row)

        # 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. Entry not saved.", timeout=22)
            return


        self.parent.timer_dialog.hide()



        # 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()

        # store
        self.save_timer(row)

    
    
    # store row in timer database
    def save_timer(self, row):
        self.streams.append(row)
        self.bookmarks.save()
        self.queue(row)







|
<


|



>

>
>





|



>







100
101
102
103
104
105
106
107

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134

    # done        
    def hide(self, *w):
        return self.parent.timer_dialog.hide()

    # close dialog,get data
    def add_timer(self, *w):
        timespec = self.parent.timer_value.get_text()


        # basic check for consistency
        if not re.match("^(\w{2,3}|\*|,)+\s+(\d+:\d+[-.\d+:]*)\s+(record|play)", timespec):
            self.parent.status("⛔ Danger, Will Robinson! → The given timer date/action is likely invalid. Entry not saved.", timeout=22)
            return

        # hide dialog
        self.parent.timer_dialog.hide()
        row = self.parent.row()
        row = copy.copy(row)

        # add data
        row["listformat"] = "href" #self.parent.channel().listformat
        if row.get(self.timefield):
            row["title"] = row["title"] + " -- " + row[self.timefield]
        row[self.timefield] = timespec

        # store
        self.save_timer(row)
        self.parent.status("Timer saved.")
    
    
    # store row in timer database
    def save_timer(self, row):
        self.streams.append(row)
        self.bookmarks.save()
        self.queue(row)