Skip to content

Commit b6808ba

Browse files
committed
create xdetails sorting option
Adds new option to sort the xtra details that are appended to the description. Merges some of Schmell's cleanup.
1 parent aafa75b commit b6808ba

File tree

5 files changed

+183
-109
lines changed

5 files changed

+183
-109
lines changed

addon.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
22
<addon id="script.module.zap2xml"
33
name="zap2xml"
4-
version="0.4.6"
4+
version="0.5.0"
55
provider-name="edit4ever">
66
<requires>
77
<import addon="xbmc.python" version="2.1.0"/>
@@ -12,7 +12,7 @@
1212
</extension>
1313
<extension point="xbmc.addon.metadata">
1414
<summary>zap2xml xmltv grabber</summary>
15-
<description>zap2xml is an epg grabber which creates an xmltv file from data scraped from Zap2it or TVguide listings. Create your account on either site, including setting up favorites for the channels you want to download. Then configure the zap2mxml grabber in the tvheadend web interface. </description>
15+
<description>zap2xml is an epg grabber which creates an xmltv file from data scraped from Zap2it or TVguide listings. Create your account on either site, including setting up favorites for the channels you want to download. Then configure the zap2xml grabber in the tvheadend web interface. Consider adjusting your tvheadend cron settings so all users don't pull data at the same time.</description>
1616
<disclaimer>
1717
</disclaimer>
1818
<platform>all</platform>

bin/tv_grab_zap2xml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,28 @@ then
3737
PROGRAMICONS=`grep id=\"picons\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,true,-I," -e "s,false,," -e "s,\",,g"`
3838
EXTRADETAILS=`grep id=\"xdetails\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,true,-D," -e "s,false,," -e "s,\",,g"`
3939
EXTRADESCRIPTION=`grep id=\"xdesc\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,true,-X," -e "s,false,," -e "s,\",,g"`
40-
python $ADDON_DIR/zap2xml.py -u $USERID -p $PASSWORD -o $XMLTV_OUTPUT $EPGSOURCE $NUMDAYS $CHFIRST $ALLCHANNELS $CHANNELICONS $PROGRAMICONS $EXTRADETAILS $EXTRADESCRIPTION > zap2xml.log 2>&1
40+
DS1=`grep id=\"desc1\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
41+
DS2=`grep id=\"desc2\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
42+
DS3=`grep id=\"desc3\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
43+
DS4=`grep id=\"desc4\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
44+
DS5=`grep id=\"desc5\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
45+
DS6=`grep id=\"desc6\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
46+
DS7=`grep id=\"desc7\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
47+
DS8=`grep id=\"desc8\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
48+
DS9=`grep id=\"desc9\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
49+
DS10=`grep id=\"desc10\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
50+
DS11=`grep id=\"desc11\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
51+
DS12=`grep id=\"desc12\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
52+
DS13=`grep id=\"desc13\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
53+
DS14=`grep id=\"desc14\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
54+
DS15=`grep id=\"desc15\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
55+
DS16=`grep id=\"desc16\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
56+
DS17=`grep id=\"desc17\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
57+
DS18=`grep id=\"desc18\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
58+
DS19=`grep id=\"desc19\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
59+
DS20=`grep id=\"desc20\" $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=\",z," -e "s,\",y,"`
60+
DESCSORT=$DS1$DS2$DS3$DS4$DS5$DS6$DS7$DS8$DS9$DS10$DS11$DS12$DS13$DS14$DS15$DS16$DS17$DS18$DS19$DS20
61+
python $ADDON_DIR/zap2xml.py -u $USERID -p $PASSWORD -o $XMLTV_OUTPUT $EPGSOURCE $NUMDAYS $CHFIRST $ALLCHANNELS $CHANNELICONS $PROGRAMICONS $EXTRADETAILS $EXTRADESCRIPTION -V $DESCSORT > zap2xml.log 2>&1
4162
cat $XMLTV_OUTPUT
4263
cd $CD
4364
exit 0

resources/language/English/strings.xml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,40 @@
1818
<string id="32160">Download Extra Program Details</string>
1919
<string id="32169">Add Delay If Extra Downloads Cause Failure</string>
2020
<string id="32180">Delay Between http Requests</string>
21+
<string id="32200">Extra Details Order</string>
22+
<string id="32201">Extra Details Will Be Appended to Program Description in the Order Set Below</string>
23+
<string id="32210">1</string>
24+
<string id="32211">2</string>
25+
<string id="32212">3</string>
26+
<string id="32213">4</string>
27+
<string id="32214">5</string>
28+
<string id="32215">6</string>
29+
<string id="32216">7</string>
30+
<string id="32217">8</string>
31+
<string id="32218">9</string>
32+
<string id="32219">10</string>
33+
<string id="32220">11</string>
34+
<string id="32221">12</string>
35+
<string id="32222">13</string>
36+
<string id="32223">14</string>
37+
<string id="32224">15</string>
38+
<string id="32225">16</string>
39+
<string id="32226">17</string>
40+
<string id="32227">18</string>
41+
<string id="32228">19</string>
42+
<string id="32229">20</string>
43+
<string id="32300">None</string>
44+
<string id="32301">BULLET</string>
45+
<string id="32302">HYPHEN</string>
46+
<string id="32303">Plot Description</string>
47+
<string id="32304">New/Live Indicator</string>
48+
<string id="32305">HD Indicator</string>
49+
<string id="32306">CC Indicator</string>
50+
<string id="32307">Season/Episode Number</string>
51+
<string id="32308">TV Rating</string>
52+
<string id="32309">Original Air Date or Movie Release Year</string>
53+
<string id="32310">Program Title</string>
54+
<string id="32311">Episode Title</string>
55+
<string id="32312">Episode Title in Quotes</string>
56+
<string id="32313">Cast</string>
2157
</strings>
22-

resources/settings.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,27 @@
1919
<setting label="32169" type="lsep" />
2020
<setting label="32180" type="slider" id="delay" default="0" range="0,.25,3" option="float"/>
2121
</category>
22+
<category label="32200">
23+
<setting label="32201" type="lsep" />
24+
<setting label="32210" type="enum" id="desc1" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
25+
<setting label="32211" type="enum" id="desc2" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
26+
<setting label="32212" type="enum" id="desc3" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
27+
<setting label="32213" type="enum" id="desc4" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
28+
<setting label="32214" type="enum" id="desc5" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
29+
<setting label="32215" type="enum" id="desc6" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
30+
<setting label="32216" type="enum" id="desc7" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
31+
<setting label="32217" type="enum" id="desc8" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
32+
<setting label="32218" type="enum" id="desc9" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
33+
<setting label="32219" type="enum" id="desc10" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
34+
<setting label="32220" type="enum" id="desc11" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
35+
<setting label="32221" type="enum" id="desc12" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
36+
<setting label="32222" type="enum" id="desc13" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
37+
<setting label="32223" type="enum" id="desc14" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
38+
<setting label="32224" type="enum" id="desc15" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
39+
<setting label="32225" type="enum" id="desc16" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
40+
<setting label="32226" type="enum" id="desc17" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
41+
<setting label="32227" type="enum" id="desc18" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
42+
<setting label="32228" type="enum" id="desc19" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
43+
<setting label="32229" type="enum" id="desc20" lvalues="32300|32301|32302|32303|32304|32305|32306|32307|32308|32309|32310|32311|32312|32313"/>
44+
</category>
2245
</settings>

0 commit comments

Comments
 (0)