tunapie-2.1.19/0000755000175000017500000000000012453576551012246 5ustar jamesjamestunapie-2.1.19/src/0000755000175000017500000000000012453576641013035 5ustar jamesjamestunapie-2.1.19/src/remfave.png0000644000175000017500000000105111171214563015151 0ustar jamesjamesPNG  IHDR$sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8=QX6*b%FBHDm*`oK[?vBmVPlZd,'1{;Mh5gp[owY8q=mPn<̍*n8x'zU*PC,LZMQ}tTC F1vq0^ZU $zu ϡy{c#=f=c幏VMc7 [iEݮvk `Wf-J]GɜφDYp*kxZN]쟀Kc|U#H38v)A&4ƅ1fBixC^oLle fFSq"_Ⱥ.aQEG?M <ϧZssX&!Lc\@ c #1E1C1B", ", c #1D1A18", "' c #1D1B1A", ") c #383838", "! c #4A4A4A", "~ c #505050", "{ c #424242", "] c #232222", "^ c #191410", "/ c #171311", "( c #1E1D1C", "_ c #383737", ": c #464646", "< c #424141", "[ c #242323", "} c #1E1B19", "| c #1C1A19", "1 c #494949", "2 c #686868", "3 c #13160D", "4 c #718E43", "5 c #495B2C", "6 c #3B3B3B", "7 c #333333", "8 c #1F150F", "9 c #4D3323", "0 c #583A28", "a c #3B271B", "b c #2A1C14", "c c #2E1E15", "d c #5B3C28", "e c #915F41", "f c #AA704B", "g c #B97952", "h c #AA6F4B", "i c #784E35", "j c #583A27", "k c #523624", "l c #67432D", "m c #9A6545", "n c #C07E55", "o c #BD7C53", "p c #A46B48", "q c #7C5137", "r c #68442E", "s c #6B4730", "t c #996444", "u c #B67750", "v c #785037", "w c #0D0D0C", "x c #8F8F8F", "y c #161714", "z c #5C7437", "A c #8DB054", "B c #769447", "C c #131610", "D c #6B6B6B", "E c #626262", "F c #1B1A19", "G c #563826", "H c #C27F56", "I c #D38A5D", "J c #D38B5E", "K c #D2895D", "L c #D0885C", "M c #D48B5E", "N c #CB855A", "O c #291B12", "P c #030302", "Q c #12140E", "R c #1D2412", "S c #5F7839", "T c #8BAF53", "U c #8DB154", "V c #8CB054", "W c #5D7537", "X c #131510", "Y c #4C4C4C", "Z c #5A5A5A", "` c #2E2E2D", " . c #201611", ".. c #8E5D3F", "+. c #B57750", "@. c #100F09", "#. c #657F3D", "$. c #81A14D", "%. c #89AC52", "&. c #8CB053", "*. c #6F8B43", "=. c #2B3619", "-. c #11140D", ";. c #1F201E", ">. c #2C2C2C", ",. c #4D4D4D", "'. c #161210", "). c #221710", "!. c #2D1E15", "~. c #352318", "{. c #7C5136", "]. c #BB7B53", "^. c #110F08", "/. c #708D43", "(. c #8BAE52", "_. c #7FA04C", ":. c #718F43", "<. c #66803D", "[. c #536832", "}. c #34411F", "|. c #11130D", "1. c #636464", "2. c #302F2F", "3. c #84563B", "4. c #CC865A", "5. c #D1895C", "6. c #D38A5E", "7. c #C88359", "8. c #BA7A52", "9. c #A06947", "0. c #8D5C3E", "a. c #8C5C3E", "b. c #B3754F", "c. c #A56C49", "d. c #A76D4A", "e. c #D1895D", "f. c #593B28", "g. c #1E2512", "h. c #81A24D", "i. c #86A950", "j. c #61793A", "k. c #11120D", "l. c #1D1C1C", "m. c #D28A5D", "n. c #CD875B", "o. c #AC714D", "p. c #784F35", "q. c #63412C", "r. c #573926", "s. c #513524", "t. c #342217", "u. c #19100B", "v. c #100A07", "w. c #110908", "x. c #1A0C0B", "y. c #1D0D0C", "z. c #1C0C0C", "A. c #120908", "B. c #110907", "C. c #0E0706", "D. c #312016", "E. c #CC855A", "F. c #C78358", "G. c #302015", "H. c #4A5D2C", "I. c #84A64E", "J. c #4C602D", "K. c #87A950", "L. c #6A863F", "M. c #1B2210", "N. c #789748", "O. c #8CAF53", "P. c #3D4D24", "Q. c #323231", "R. c #5C5C5C", "S. c #3E3E3E", "T. c #333332", "U. c #272625", "V. c #15120F", "W. c #583B29", "X. c #CE875B", "Y. c #C37F56", "Z. c #6E4933", "`. c #3B271A", " + c #4B3121", ".+ c #64422D", "++ c #81553A", "@+ c #8C5C3F", "#+ c #6A462F", "$+ c #2B1C13", "%+ c #0F0907", "&+ c #1E0D0D", "*+ c #2C1413", "=+ c #361817", "-+ c #371817", ";+ c #421E1D", ">+ c #532524", ",+ c #5F2B2A", "'+ c #662D2C", ")+ c #692E2D", "!+ c #6A2E2D", "~+ c #652C2B", "{+ c #612B2A", "]+ c #381B1A", "^+ c #100707", "/+ c #2F1F14", "(+ c #3E291C", "_+ c #303C1E", ":+ c #546A32", "<+ c #87AA50", "[+ c #749245", "}+ c #11150A", "|+ c #485A2B", "1+ c #8AAE52", "2+ c #779647", "3+ c #0E100A", "4+ c #131212", "5+ c #573A28", "6+ c #8F5E3F", "7+ c #A26A47", "8+ c #BA7A53", "9+ c #C68258", "0+ c #3A271B", "a+ c #190C0B", "b+ c #361919", "c+ c #3C1A1A", "d+ c #2B1413", "e+ c #1E0E0E", "f+ c #1B0C0B", "g+ c #241010", "h+ c #411D1C", "i+ c #5E2A29", "j+ c #6B2F2E", "k+ c #5F2928", "l+ c #3E1C1B", "m+ c #271312", "n+ c #030101", "o+ c #303B1F", "p+ c #88AB51", "q+ c #1D2512", "r+ c #526731", "s+ c #33401E", "t+ c #323F1E", "u+ c #8AAD52", "v+ c #1E2612", "w+ c #545454", "x+ c #0B0B0B", "y+ c #704A33", "z+ c #523625", "A+ c #190B0B", "B+ c #622B2A", "C+ c #642C2B", "D+ c #0C0706", "E+ c #637C3C", "F+ c #7A9A49", "G+ c #0C0F07", "H+ c #779547", "I+ c #84A64F", "J+ c #101409", "K+ c #67823E", "L+ c #1C2311", "M+ c #0F0F0F", "N+ c #21160F", "O+ c #825539", "P+ c #1A100B", "Q+ c #1C0D0D", "R+ c #592726", "S+ c #0F0908", "T+ c #698440", "U+ c #6B8640", "V+ c #0E1209", "W+ c #83A54E", "X+ c #2C381B", "Y+ c #86A850", "Z+ c #85A750", "`+ c #10140B", " @ c #5E5E5E", ".@ c #2D2D2D", "+@ c #11100F", "@@ c #A26A48", "#@ c #4F3423", "$@ c #100808", "%@ c #421D1C", "&@ c #682D2C", "*@ c #682F2E", "=@ c #140B0A", "-@ c #5C7337", ";@ c #0B0E07", ">@ c #789747", ",@ c #7C9C4A", "'@ c #13180B", ")@ c #607939", "!@ c #779548", "~@ c #090A07", "{@ c #3D3D3D", "]@ c #625C57", "^@ c #55504B", "/@ c #171412", "(@ c #271A11", "_@ c #0C0805", ":@ c #20100F", "<@ c #582827", "[@ c #1E0E0D", "}@ c #4F6131", "|@ c #242E15", "1@ c #151A0C", "2@ c #6C8740", "3@ c #657F3C", "4@ c #0E1108", "5@ c #5B7236", "6@ c #6D8941", "7@ c #121211", "8@ c #504B47", "9@ c #CEC1B6", "0@ c #B9ADA3", "a@ c #69625D", "b@ c #0E0909", "c@ c #180B0B", "d@ c #220F0F", "e@ c #2D1515", "f@ c #3C1C1B", "g@ c #522424", "h@ c #2E1616", "i@ c #404F27", "j@ c #3A4822", "k@ c #202813", "l@ c #89AC51", "m@ c #394822", "n@ c #0D1108", "o@ c #485B2B", "p@ c #2B371A", "q@ c #566C34", "r@ c #617A3A", "s@ c #242424", "t@ c #1D1C1A", "u@ c #C1B5AB", "v@ c #D0C3B8", "w@ c #CFC2B7", "x@ c #C6B9AF", "y@ c #A69B93", "z@ c #898079", "A@ c #756D67", "B@ c #5C5651", "C@ c #3D3936", "D@ c #1A1817", "E@ c #0D0909", "F@ c #1A0C0C", "G@ c #3E1D1C", "H@ c #5C2928", "I@ c #3A1A19", "J@ c #2A341A", "K@ c #192010", "L@ c #85A74F", "M@ c #374521", "N@ c #708D42", "O@ c #799848", "P@ c #6F8B42", "Q@ c #556935", "R@ c #3B3B3A", "S@ c #282828", "T@ c #8D847C", "U@ c #C4B7AD", "V@ c #A99F96", "W@ c #746D67", "X@ c #2F2C2A", "Y@ c #0F0B0B", "Z@ c #200F0F", "`@ c #461F1E", " # c #4A2221", ".# c #181D0F", "+# c #13180C", "@# c #495C2C", "## c #415227", "$# c #283219", "%# c #6C8841", "&# c #303C1D", "*# c #47582C", "=# c #414140", "-# c #423E3A", ";# c #CCBFB5", "># c #CBBEB4", ",# c #AEA49B", "'# c #6D6660", ")# c #1A1816", "!# c #230F0F", "~# c #4F2322", "{# c #552625", "]# c #0A0C06", "^# c #607839", "/# c #0D1008", "(# c #364420", "_# c #80A14D", ":# c #69833F", "<# c #576C36", "[# c #3F4F26", "}# c #454444", "|# c #161615", "1# c #AFA49B", "2# c #B2A79D", "3# c #57524D", "4# c #12100F", "5# c #2E1515", "6# c #5D2928", "7# c #592727", "8# c #070604", "9# c #526730", "0# c #66803E", "a# c #2E3A1C", "b# c #070503", "c# c #040202", "d# c #0D0906", "e# c #000000", "f# c #555555", "g# c #363636", "h# c #716A64", "i# c #A89D94", "j# c #383431", "k# c #0E0908", "l# c #652F2E", "m# c #0F0C09", "n# c #273018", "o# c #120808", "p# c #47141A", "q# c #82232F", "r# c #380F14", "s# c #3B1216", "t# c #4B151C", "u# c #010000", "v# c #11140A", "w# c #14190D", "x# c #393939", "y# c #565656", "z# c #3B3835", "A# c #CBBEB3", "B# c #978D85", "C# c #292624", "D# c #170B0B", "E# c #0D0706", "F# c #69843E", "G# c #13160B", "H# c #3B1015", "I# c #922835", "J# c #A32B3A", "K# c #3D1217", "L# c #0B0304", "M# c #50151D", "N# c #5B1820", "O# c #0A0506", "P# c #70706F", "Q# c #35312F", "R# c #C3B6AC", "S# c #5F5954", "T# c #0E0A0A", "U# c #2D1413", "V# c #522524", "W# c #682E2D", "X# c #130909", "Y# c #2D381A", "Z# c #3E1015", "`# c #9F2938", " $ c #A42B3A", ".$ c #741F2A", "+$ c #020101", "@$ c #370E13", "#$ c #9A2836", "$$ c #A22A39", "%$ c #57171F", "&$ c #1E1D1D", "*$ c #606060", "=$ c #363330", "-$ c #9F958C", ";$ c #4B4743", ">$ c #171413", ",$ c #100909", "'$ c #291312", ")$ c #4A2120", "!$ c #672D2C", "~$ c #1A0B0B", "{$ c #343F1D", "]$ c #862430", "^$ c #9F2A38", "/$ c #A32B39", "($ c #A02A39", "_$ c #71222B", ":$ c #701F29", "<$ c #A32A39", "[$ c #9E2938", "}$ c #340E13", "|$ c #444544", "1$ c #56514C", "2$ c #CEC1B7", "3$ c #C0B4AA", "4$ c #988E86", "5$ c #58534E", "6$ c #1B1817", "7$ c #4F2423", "8$ c #6A2F2E", "9$ c #020201", "0$ c #150709", "a$ c #9C2A38", "b$ c #982836", "c$ c #260B0F", "d$ c #411217", "e$ c #932633", "f$ c #53171E", "g$ c #120506", "h$ c #972735", "i$ c #6E1D27", "j$ c #1D1D1D", "k$ c #3A3A3A", "l$ c #817973", "m$ c #BDB1A7", "n$ c #6A645E", "o$ c #13100F", "p$ c #23100F", "q$ c #522423", "r$ c #240F0F", "s$ c #120708", "t$ c #731F2A", "u$ c #7B202B", "v$ c #2D0C10", "w$ c #26090D", "x$ c #942634", "y$ c #8F2734", "z$ c #110506", "A$ c #2E1114", "B$ c #7A232D", "C$ c #4A141A", "D$ c #561920", "E$ c #7F2B35", "F$ c #110F0F", "G$ c #303030", "H$ c #978E86", "I$ c #544F4A", "J$ c #141110", "K$ c #160A0A", "L$ c #391A1A", "M$ c #5B2928", "N$ c #200F0E", "O$ c #49131A", "P$ c #972835", "Q$ c #290C0F", "R$ c #411117", "S$ c #330F13", "T$ c #010101", "U$ c #251112", "V$ c #080404", "W$ c #070202", "X$ c #60232B", "Y$ c #90877F", "Z$ c #B9AEA4", "`$ c #837B74", " % c #3A3633", ".% c #100D0C", "+% c #361818", "@% c #512423", "#% c #632C2B", "$% c #1F0F0F", "%% c #51151C", "&% c #A02A38", "*% c #8C2532", "=% c #75252F", "-% c #411218", ";% c #060202", ">% c #030102", ",% c #230B0E", "'% c #601922", ")% c #882330", "!% c #862531", "~% c #0F0C0D", "{% c #535353", "]% c #1F1E1C", "^% c #756E68", "/% c #B6ABA1", "(% c #CCC0B5", "_% c #B0A59C", ":% c #7C746E", "<% c #433F3C", "[% c #181615", "}% c #180C0B", "|% c #251010", "1% c #0F0707", "2% c #471319", "3% c #992836", "4% c #5D1A22", "5% c #240B0E", "6% c #0D0405", "7% c #17090B", "8% c #190A0B", "9% c #631C25", "0% c #932734", "a% c #0D0607", "b% c #343333", "c% c #171616", "d% c #4A4642", "e% c #9D948B", "f% c #CBBFB4", "g% c #C2B6AC", "h% c #877E77", "i% c #211F1D", "j% c #200B0E", "k% c #1E090C", "l% c #1B0A0B", "m% c #4D171C", "n% c #732229", "o% c #82262E", "p% c #56191E", "q% c #2E0E11", "r% c #411519", "s% c #150608", "t% c #1B0709", "u% c #82222D", "v% c #8C2632", "w% c #090506", "x% c #474848", "y% c #1A1A1A", "z% c #393532", "A% c #827A73", "B% c #CEC2B7", "C% c #CDC0B6", "D% c #100405", "E% c #481419", "F% c #7D242C", "G% c #86272F", "H% c #431619", "I% c #3D1216", "J% c #83262E", "K% c #3B1114", "L% c #1E080A", "M% c #6C1E28", "N% c #111010", "O% c #2A2A2A", "P% c #494441", "Q% c #7B746D", "R% c #A0968E", "S% c #C3B7AC", "T% c #C8BCB1", "U% c #1F1C1A", "V% c #611D23", "W% c #85272F", "X% c #82262D", "Y% c #7B242B", "Z% c #84262E", "`% c #7E242C", " & c #160708", ".& c #140608", "+& c #1C1C1B", "@& c #1B1918", "#& c #3F3B37", "$& c #706964", "%& c #BCB0A6", "&& c #120E0E", "*& c #712228", "=& c #310F12", "-& c #333232", ";& c #373737", ">& c #534E4A", ",& c #A69B92", "'& c #CCBFB4", ")& c #B3A89F", "!& c #120B0B", "~& c #7C242C", "{& c #431317", "]& c #413F3F", "^& c #161515", "/& c #C5B9AE", "(& c #B8ACA3", "_& c #110D0C", ":& c #421519", "<& c #414040", "[& c #222221", "}& c #23211F", "|& c #B8ADA3", "1& c #322E2C", "2& c #491519", "3& c #280C0E", "4& c #515050", "5& c #191816", "6& c #57514D", "7& c #A59B92", "8& c #CABEB3", "9& c #867E77", "0& c #180809", "a& c #81252D", "b& c #85262E", "c& c #621C22", "d& c #130F10", "e& c #171717", "f& c #312E2B", "g& c #7B736D", "h& c #B8ACA2", "i& c #120E0D", "j& c #6E242A", "k& c #431519", "l& c #110A0B", "m& c #5C5B5B", "n& c #585857", "o& c #171615", "p& c #9F958D", "q& c #CABDB3", "r& c #2C2927", "s& c #110809", "t& c #651F25", "u& c #7F252C", "v& c #59191F", "w& c #170809", "x& c #2F2F2F", "y& c #706F6F", "z& c #454545", "A& c #1A1A19", "B& c #35312E", "C& c #807871", "D& c #4E4945", "E& c #131313", "F& c #100708", "G& c #4C161B", "H& c #602025", "I& c #571C21", "J& c #451519", "K& c #290D0F", "L& c #150708", "M& c #1E1C1D", "N& c #716A65", "O& c #67615C", "P& c #4C4B4B", "Q& c #5F5E5E", "R& c #2C2B2B", "S& c #1E1D1E", "T& c #2E2D2D", "U& c #3D3C3C", "V& c #4E4D4D", "W& c #696767", "X& c #636363", "Y& c #353535", "Z& c #1A1918", "`& c #968C85", " * c #C7BBB0", ".* c #68625D", "+* c #434243", "@* c #22201F", "#* c #4F4A46", "$* c #857D76", "%* c #BCB1A7", "&* c #404040", "** c #4A4949", "=* c #2F2E2E", "-* c #1F1D1C", ";* c #706963", ">* c #4E4A46", ",* c #484748", "'* c #050404", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " . + ", " @ # $ % ", " @ & * = - ; > , ' ) ! ~ { ] ^ / ( _ : < [ , } | 1 2 3 4 5 6 ", " 7 8 9 0 a b c d e f g h i j k l m n o p q r s t u g v w x % y z A B C D ", " E F G H I J K L L I M M M M M J J M M M M M M M M M M N O P Q R S T U V W X Y ", " Z ` ...L M M M M M M M M M M M M M M M M M M M M M M M M +.@.#.$.%.U U U U &.*.=.-.;.>.6 ! ", " ,.'.).!.!.!.~.{.H M M M M M M M M M M M M M M M M M M M M M M M M M M ].^./.U U U U U U U U (._.:.<.[.}.|.1. ", " 2.3.4.L L L 5.M M M M M M M M M M M M M 6.5.7.8.9.0.a.a.9.b.b.c.d.N M e.f.g.h.U U U U U U U U U i.&.U &.j.k. ", " l.m M M M M M 6.m.I M M M M n.o.p.q.r.r.s.t.u.v.w.x.y.z.A.B.B.w.C.D.a.E.F.G.H.U I.J.K.U U U U L.M.N.U U O.P.Q. ", " R.S.T.U.V.W.X.M M M Y.Z.9 `. +.+++@+#+$+%+&+*+=+-+-+;+>+,+'+)+!+!+'+~+~+'+{+]+^+/+.+(+_+&.:+M.<+U U U [+}+|+1+U U U 2+3+ ", " 4+5+6+7+8+L M M M 9+0+a+b+c+b+d+e+f+g+h+i+)+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+k+l+m+n+o+p+q+r+U U U O.s+t+u+U U U U 1+v+w+ ", " x+y+M M M M M M ].z+A+B+j+j+j+j+!+!+!+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+C+D+E+F+G+H+U U U I+J+K+U U U U U u+L+Y ", " M+N+n M M M X.O+P+Q+R+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+'+S+T+U+V+W+U U U <+v+X+Y+U U U U Z+`+ @ ", " .@+@0+@@4.o.#@$@%@&@j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+*@=@-@/.;@>@U U U U ,@'@)@U U U U !@~@ ", " {@]@^@/@(@_@:@<@!+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+!+[@}@K.|@1@2@U U (.3@4@5@Z+U U U 6@7@ ", " ! 8@9@0@a@' b@c@d@e@f@g@{+)+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+h@i@U I.j@k@u+l@m@n@o@p@q@U U U r@s@ ", " t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@)+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+I@J@&.U r+K@%.L@M@N@O@V+P@U T U Q@R@ ", " S@T@v@v@v@v@v@v@v@9@U@V@W@X@Y@Z@`@&@j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+ #.#K./.+#@#A U &.&.##$#u+%#&#<+*#=# ", " Y -#;#v@v@v@v@v@v@v@v@v@v@>#,#'#)#!#~#)+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+{#]#^#/#(#K.U T _#:#;@<#,@.#1@K.[#}# ", " |#1#v@v@v@v@v@v@v@v@v@v@v@v@v@2#3#4#5#6#!+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+7#8#9#m@i.p+0#a#@.b#c#d#4@e#M@!@$ f# ", " g#h#v@v@v@v@v@v@v@v@v@v@v@v@v@v@w@i#j#k#=+C+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+l#m#H+T B n#o#p#q#r#s#t#u#n+v#w#x# ", " y#z#9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@A#B#C#D#g@!+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+j+~+E#F#[+G#H#I#J#J#K#L#n+u#M#N#O#P# ", " D Q#9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@R#S#T#U#V#C+!+j+j+j+j+j+j+j+j+j+j+j+j+j+W#X#W Y#Z#`# $ $ $.$n++$@$#$$$%$&$ ", " *$=$9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@9@-$;$>$,$'$)$!$j+j+j+j+j+j+j+j+j+j+j+!+~${$_@]$ $^$/$ $($_$:$]$<$ $[$}$|$ ", " : 1$w@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@2$3$4$5$6$A+7$)+j+j+j+j+j+j+j+j+j+8$d@9$0$a$b$c$d$e$ $J#f$g$h$ $ $i$j$ ", " k$l$v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@w@m$n$o$p$q$!$j+j+j+j+j+j+j+j+r$s$t$J#$$u$v$w$x$y$z$A$B$C$D$E$F$ ", " G$H$v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@w@2#I$J$K$L$M$)+j+j+j+j+8$N$O$J# $ $ $P$Q$R$S$T$U$V$e#W$X$F$ ", " + Y$v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@2$Z$`$ %.%F@+%@%#%)+)+$%%% $ $&%*%=%-%;%>%e#u#,%'%)%!%~% ", " {%]%^%/%9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@(%_%:%<%[%b@}%|%1%2%3%4%5%6%7%8%T$e#e#;%9%#$ $0%a% ", " *$b%c%d%e%f%v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@9@g%y@h%a@i%j%k%l%m%n%o%p%u#+$q%r%s%t%u%v%w% ", " x%y%z%A%3$B%v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@C%Q#D%E%F%G%G%G%H%L#I%J%G%F%K%L%M%N% ", " {%O%F P%Q%R%S%9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@T%U%V%W%G%G%G%G%X%Y%Z%G%G%G%`% &.&{@ ", " Y ) +&@&#&$&2#9@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@%&&&*&G%G%G%G%G%G%G%G%G%G%G%W%=&-& ", " {%;&|#>&,&'&v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@)&!&~&G%G%G%G%G%G%G%G%G%G%G%G%{&]& ", " - ^& %Y$/&v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@(&_&n%G%G%G%G%G%G%G%G%G%G%G%G%:&<& ", " ~ [&}&h#|&w@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@f%1&2&G%G%G%G%G%G%G%G%G%G%G%Z%3&4& ", " = + 5&6&7&8&v@v@v@v@v@v@v@v@v@v@v@v@v@v@v@9&0&a&G%G%G%G%G%G%G%G%G%b&c&d& ", " - e&f&g&h&B%v@v@v@v@v@v@v@v@v@v@v@v@(&i&j&W%G%G%G%G%G%G%G%Y%k&l&m& ", " n&+ o&>&p&q&v@v@v@v@v@v@v@v@v@v@f%r&s&t&W%G%G%G%b&u&v&w&x&y& ", " z&A&B&C&u@v@v@v@v@v@v@v@v@w@D&E&F&G&H&I&J&K&L&M&m& ", " w+S@}&N&|&w@v@v@v@v@v@v@O&P&Q&R&S&T&U&V&W& ", " X&Y&Z&D&`& *w@v@v@v@.*+* ", " & &$@*#*$*%*w@.*&* ", " **=*-*;*>*,* ", " 2 + '*w+ ", " Y& ", " ", " ", " ", " ", " ", " ", " "}; tunapie-2.1.19/src/TunaSearch.py0000644000175000017500000000635211171216607015437 0ustar jamesjames#Boa:Dialog:Search #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 2.0.0 21/4/07 import wx import tunapie2_main def create(parent): return Search(parent) [wxID_SEARCH, wxID_SEARCHCANCELBUTTON, wxID_SEARCHSEARCHBUTTON, wxID_SEARCHSEARCHTEXT, ] = [wx.NewId() for _init_ctrls in range(4)] class Search(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_SEARCH, name=u'Search', parent=prnt, pos=wx.Point(308, 321), size=wx.Size(443, 102), style=wx.DEFAULT_DIALOG_STYLE, title=u'Search') self.SetClientSize(wx.Size(443, 102)) self.SetThemeEnabled(True) self.SetAutoLayout(True) self.searchtext = wx.TextCtrl(id=wxID_SEARCHSEARCHTEXT, name=u'searchtext', parent=self, pos=wx.Point(24, 16), size=wx.Size(400, 25), style=0, value=u'') self.searchtext.SetAutoLayout(True) self.searchtext.SetThemeEnabled(True) self.cancelbutton = wx.Button(id=wxID_SEARCHCANCELBUTTON, label=u'Cancel', name=u'cancelbutton', parent=self, pos=wx.Point(64, 56), size=wx.Size(85, 30), style=0) self.cancelbutton.SetAutoLayout(True) self.cancelbutton.SetThemeEnabled(True) self.cancelbutton.Bind(wx.EVT_BUTTON, self.OnCancelbuttonButton, id=wxID_SEARCHCANCELBUTTON) self.searchbutton = wx.Button(id=wxID_SEARCHSEARCHBUTTON, label=u'Search', name=u'searchbutton', parent=self, pos=wx.Point(296, 56), size=wx.Size(80, 30), style=0) self.searchbutton.SetAutoLayout(True) self.searchbutton.SetThemeEnabled(True) self.searchbutton.SetDefault() self.searchbutton.Bind(wx.EVT_BUTTON, self.OnSearchbuttonButton, id=wxID_SEARCHSEARCHBUTTON) def __init__(self, parent): self._init_ctrls(parent) def setfontsize(self,size): self.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.cancelbutton.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.searchbutton.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.searchtext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) def OnCancelbuttonButton(self, event): self.Close() def OnSearchbuttonButton(self, event): tunapie2_main.searchname=self.searchtext.GetLineText(0) self.Close() tunapie-2.1.19/src/AboutTuner.py0000644000175000017500000001216111171216607015465 0ustar jamesjames#Boa:Dialog:About #TunaPie (c)2005-2009 James Stone. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 0.2.54 23/10/08 import wx from wx.lib.anchors import LayoutAnchors import wx.lib.stattext def create(parent): return About(parent) [wxID_ABOUT, wxID_ABOUTBUTTON1, wxID_ABOUTGENSTATICTEXT1, wxID_ABOUTGENSTATICTEXT2, wxID_ABOUTGENSTATICTEXT3, ] = [wx.NewId() for _init_ctrls in range(5)] class About(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_ABOUT, name='About', parent=prnt, pos=wx.Point(507, 387), size=wx.Size(438, 124), style=wx.DEFAULT_DIALOG_STYLE, title='About TunaPie') self.SetClientSize(wx.Size(438, 124)) self.Show(True) self.SetBackgroundColour(wx.Colour(220, 218, 213)) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.SetThemeEnabled(True) self.genStaticText1 = wx.lib.stattext.GenStaticText(ID=wxID_ABOUTGENSTATICTEXT1, label='TunaPie: A tuner for Shoutcast Radio and Internet TV.', name='genStaticText1', parent=self, pos=wx.Point(8, 16), size=wx.Size(258, 13), style=0) self.genStaticText1.SetFont(wx.Font(8, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText1.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText1.SetConstraints(LayoutAnchors(self.genStaticText1, True, True, True, True)) self.genStaticText1.SetAutoLayout(True) self.genStaticText1.SetThemeEnabled(True) self.genStaticText1.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText2 = wx.lib.stattext.GenStaticText(ID=wxID_ABOUTGENSTATICTEXT2, label=u'Version 2.1.17 (c) 2005-2009 James Stone jamesmstone@gmail.com', name='genStaticText2', parent=self, pos=wx.Point(10, 48), size=wx.Size(333, 12), style=0) self.genStaticText2.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText2.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText2.SetConstraints(LayoutAnchors(self.genStaticText2, True, True, True, True)) self.genStaticText2.SetAutoLayout(True) self.genStaticText2.SetThemeEnabled(True) self.genStaticText2.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText3 = wx.lib.stattext.GenStaticText(ID=wxID_ABOUTGENSTATICTEXT3, label='Released under the GNU GPL', name='genStaticText3', parent=self, pos=wx.Point(8, 80), size=wx.Size(145, 13), style=0) self.genStaticText3.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText3.SetFont(wx.Font(8, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetConstraints(LayoutAnchors(self.genStaticText3, True, True, True, True)) self.genStaticText3.SetAutoLayout(True) self.genStaticText3.SetThemeEnabled(True) self.genStaticText3.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.button1 = wx.Button(id=wxID_ABOUTBUTTON1, label='OK', name='button1', parent=self, pos=wx.Point(330, 88), size=wx.Size(80, 24), style=0) self.button1.SetBackgroundColour(wx.Colour(220, 218, 213)) self.button1.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button1.SetConstraints(LayoutAnchors(self.button1, True, True, True, True)) self.button1.SetAutoLayout(True) self.button1.SetThemeEnabled(True) self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button, id=wxID_ABOUTBUTTON1) def __init__(self, parent): self._init_ctrls(parent) def setfontsize(self, newsize): size=int(newsize) self.genStaticText1.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText2.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button1.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def OnButton1Button(self, event): self.Close() tunapie-2.1.19/src/RecordTime.py0000644000175000017500000003020011432513407015422 0ustar jamesjames#Boa:Dialog:RecordStream #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. #Written using Boa-Constructor. #Version 0.0.7 05/09/07 import wx import wx.lib.masked.textctrl import wx.lib.intctrl import wx.lib.masked.timectrl import wx.lib.stattext import tuner import subprocess import urllib #import mx.DateTime import time def create(parent): return RecordStream(parent) [wxID_RECORDSTREAM, wxID_RECORDSTREAMCANCELBUTTON, wxID_RECORDSTREAMDATECHOICE, wxID_RECORDSTREAMGENSTATICTEXT1, wxID_RECORDSTREAMGENSTATICTEXT2, wxID_RECORDSTREAMGENSTATICTEXT3, wxID_RECORDSTREAMGENSTATICTEXT4, wxID_RECORDSTREAMGENSTATICTEXT5, wxID_RECORDSTREAMGENSTATICTEXT6, wxID_RECORDSTREAMLATERRADIO, wxID_RECORDSTREAMMONTHCHOICE, wxID_RECORDSTREAMNOWRADIO, wxID_RECORDSTREAMOKBUTTON, wxID_RECORDSTREAMSTOPHOURS, wxID_RECORDSTREAMSTOPMINS, wxID_RECORDSTREAMTIME, ] = [wx.NewId() for _init_ctrls in range(16)] class RecordStream(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_RECORDSTREAM, name=u'RecordStream', parent=prnt, pos=wx.Point(516, 218), size=wx.Size(280, 216), style=wx.DEFAULT_DIALOG_STYLE, title=u'Record Stream') self.SetClientSize(wx.Size(280, 216)) self.SetBackgroundColour(wx.Colour(212, 216, 224)) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.SetThemeEnabled(True) self.genStaticText1 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT1, label=u'Start Recording', name='genStaticText1', parent=self, pos=wx.Point(8, 8), size=wx.Size(72, 16), style=0) self.genStaticText1.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText1.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText1.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText1.SetThemeEnabled(True) self.nowradio = wx.RadioButton(id=wxID_RECORDSTREAMNOWRADIO, label=u'Immediately!', name=u'nowradio', parent=self, pos=wx.Point(24, 32), size=wx.Size(112, 24), style=0) self.nowradio.SetValue(True) self.nowradio.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.nowradio.SetThemeEnabled(True) self.laterradio = wx.RadioButton(id=wxID_RECORDSTREAMLATERRADIO, label=u'At:', name=u'laterradio', parent=self, pos=wx.Point(24, 64), size=wx.Size(48, 24), style=0) self.laterradio.SetValue(False) self.laterradio.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.laterradio.SetThemeEnabled(True) self.time = wx.lib.masked.timectrl.TimeCtrl(display_seconds=True, fmt24hr=False, id=wxID_RECORDSTREAMTIME, name=u'time', oob_color=wx.NamedColour('Yellow'), parent=self, pos=wx.Point(72, 64), size=wx.Size(53, 22), style=0, useFixedWidthFont=True, value=u'00:00') self.time.SetFormat('24HHMM') self.time.SetBestFittingSize(wx.Size(53, 22)) self.genStaticText2 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT2, label=u'(H:M 24H)', name='genStaticText2', parent=self, pos=wx.Point(176, 72), size=wx.Size(46, 16), style=0) self.genStaticText2.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText2.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText2.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText2.SetThemeEnabled(True) self.genStaticText3 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT3, label=u'On:', name='genStaticText3', parent=self, pos=wx.Point(24, 104), size=wx.Size(17, 16), style=0) self.genStaticText3.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText3.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText3.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText3.SetThemeEnabled(True) self.monthchoice = wx.Choice(choices=['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], id=wxID_RECORDSTREAMMONTHCHOICE, name=u'monthchoice', parent=self, pos=wx.Point(112, 104), size=wx.Size(120, 24), style=0) self.monthchoice.SetSelection(0) self.monthchoice.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.monthchoice.SetThemeEnabled(True) self.cancelbutton = wx.Button(id=wxID_RECORDSTREAMCANCELBUTTON, label=u'Cancel', name=u'cancelbutton', parent=self, pos=wx.Point(24, 184), size=wx.Size(96, 24), style=0) self.cancelbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.cancelbutton.SetThemeEnabled(True) self.cancelbutton.Bind(wx.EVT_BUTTON, self.OnCancelbuttonButton, id=wxID_RECORDSTREAMCANCELBUTTON) self.OKbutton = wx.Button(id=wxID_RECORDSTREAMOKBUTTON, label=u'OK', name=u'OKbutton', parent=self, pos=wx.Point(160, 184), size=wx.Size(96, 24), style=0) self.OKbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.OKbutton.SetThemeEnabled(True) self.OKbutton.SetDefault() self.OKbutton.Bind(wx.EVT_BUTTON, self.OnOKbuttonButton, id=wxID_RECORDSTREAMOKBUTTON) self.datechoice = wx.Choice(choices=["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"], id=wxID_RECORDSTREAMDATECHOICE, name=u'datechoice', parent=self, pos=wx.Point(56, 104), size=wx.Size(48, 24), style=0) self.datechoice.SetSelection(0) self.datechoice.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.datechoice.SetThemeEnabled(True) self.genStaticText4 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT4, label=u'Stopping in', name='genStaticText4', parent=self, pos=wx.Point(24, 144), size=wx.Size(53, 16), style=0) self.genStaticText4.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText4.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText4.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText4.SetThemeEnabled(True) self.stophours = wx.lib.intctrl.IntCtrl(allow_long=False, allow_none=False, default_color=wx.BLACK, id=wxID_RECORDSTREAMSTOPHOURS, limited=False, max=None, min=None, name=u'stophours', oob_color=wx.RED, parent=self, pos=wx.Point(104, 144), size=wx.Size(24, 22), style=0, value=0) self.stophours.SetThemeEnabled(True) self.stopmins = wx.lib.intctrl.IntCtrl(allow_long=False, allow_none=False, default_color=wx.BLACK, id=wxID_RECORDSTREAMSTOPMINS, limited=False, max=None, min=None, name=u'stopmins', oob_color=wx.RED, parent=self, pos=wx.Point(176, 144), size=wx.Size(24, 22), style=0, value=0) self.stopmins.SetThemeEnabled(True) self.genStaticText5 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT5, label=u'hours', name='genStaticText5', parent=self, pos=wx.Point(136, 152), size=wx.Size(26, 16), style=0) self.genStaticText5.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText5.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText5.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText5.SetThemeEnabled(True) self.genStaticText6 = wx.lib.stattext.GenStaticText(ID=wxID_RECORDSTREAMGENSTATICTEXT6, label=u'minutes', name='genStaticText6', parent=self, pos=wx.Point(208, 152), size=wx.Size(36, 16), style=0) self.genStaticText6.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.genStaticText6.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText6.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText6.SetThemeEnabled(True) def __init__(self, parent): self._init_ctrls(parent) self.shoutice = parent.shoutice timenow=time.localtime(time.time()) #date,time=str(mx.DateTime.now()).split() self.year,self.month,self.day=str(timenow[0]),str(timenow[1]),str(timenow[2]) self.hours,self.minutes=str(timenow[3]),str(timenow[4]) self.time.SetValue(self.hours+':'+self.minutes) self.monthchoice.SetSelection(int(self.month)-1) self.datechoice.SetSelection(int(self.day)-1) def setfontsize(self, newsize): size=int(newsize) self.genStaticText1.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.nowradio.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.laterradio.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText2.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.monthchoice.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.cancelbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.OKbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.datechoice.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText4.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText5.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText6.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def setoptions(self, recordoptions): self.recordoptions=recordoptions return def OnCancelbuttonButton(self, event): self.Close() def OnOKbuttonButton(self, event): ripper=self.recordoptions[1] pls=self.recordoptions[2] rdir=self.recordoptions[3] if self.shoutice == 1: playlist=urllib.urlopen(pls) tempfile=playlist.read() url=tempfile[tempfile.find('//')+2:tempfile.find('\n',50)] else: url=pls[pls.find('//')+2:] r=ripper.split(' ') if (self.nowradio.GetValue()==True): args=' -e \"'+r[0] else: args=r[0] args+=' http://'+url i=0 directoryset=0 for argument in r: i+=1 if i==1: continue args+=' '+argument if argument=='-d': directoryset=1 if not(directoryset): args+=' -d' args+=' '+rdir if (self.nowradio.GetValue()==True): args+='\"' tuner.recordselection(self.recordoptions[0], args) self.Close() return args +=' -l '+str((self.stophours.GetValue()*3600)+(self.stopmins.GetValue()*60)) print ('at '+self.time.GetValue()+' '+self.monthchoice.GetStringSelection()\ +' '+self.datechoice.GetStringSelection()+'\n'+'call: '+args) atcommand=subprocess.Popen('at '+self.time.GetValue()+' '+self.monthchoice.GetStringSelection()\ +' '+self.datechoice.GetStringSelection(),shell=True, close_fds=True, stdin=subprocess.PIPE) atcommand.communicate(args) self.Close() tunapie-2.1.19/src/rec.png0000644000175000017500000000070111171214563014276 0ustar jamesjamesPNG  IHDR;֕JsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<>IDAT(ӱNTQ߹0,†HO7x%)x h14Y T`蕬͜?sLmR[la ׸qMG)=%e׌)wJVج#e8oc>.OwҐ=f@"`)^gØy Oԛ;NڭgLp:L]fM f,4tX~ a9Qb9t+z^I >D&RA+u_#:b& ^!6p%O'h#kVޟx_K{IENDB`tunapie-2.1.19/src/AddStream.py0000644000175000017500000001664711171216607015256 0ustar jamesjames#Boa:Frame:AddURL #TunaPie (c)2005-2009 James Stone. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 0.0.2 30/01/09 import wx import wx.lib.buttons import wx.lib.masked.numctrl import wx.lib.masked.textctrl import wx.lib.stattext import tuner def create(parent): return AddURL(parent) [wxID_ADDURL, wxID_ADDURLBITRATETEXT, wxID_ADDURLBITRATETEXTCTRL, wxID_ADDURLCANCELBUTTON, wxID_ADDURLGENRETEXT, wxID_ADDURLGENRETEXTCTRL, wxID_ADDURLNAMETEXT, wxID_ADDURLNAMETEXTCTRL, wxID_ADDURLOKBUTTON, wxID_ADDURLTYPECHOICE, wxID_ADDURLTYPETEXT, wxID_ADDURLURLTEXT, wxID_ADDURLURLTEXTCTRL, ] = [wx.NewId() for _init_ctrls in range(13)] class AddURL(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_ADDURL, name=u'AddURL', parent=prnt, pos=wx.Point(542, 257), size=wx.Size(427, 229), style=wx.DEFAULT_DIALOG_STYLE, title=u'Edit Stream Info') self.SetClientSize(wx.Size(427, 229)) self.SetBackgroundColour(wx.Colour(212, 216, 224)) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.SetThemeEnabled(True) self.nametext = wx.lib.stattext.GenStaticText(ID=wxID_ADDURLNAMETEXT, label=u'Name', name=u'nametext', parent=self, pos=wx.Point(24, 24), size=wx.Size(39, 17), style=0) self.urltext = wx.lib.stattext.GenStaticText(ID=wxID_ADDURLURLTEXT, label=u'URL', name=u'urltext', parent=self, pos=wx.Point(24, 64), size=wx.Size(25, 17), style=0) self.typetext = wx.lib.stattext.GenStaticText(ID=wxID_ADDURLTYPETEXT, label=u'Type', name=u'typetext', parent=self, pos=wx.Point(24, 104), size=wx.Size(29, 17), style=0) self.genretext = wx.lib.stattext.GenStaticText(ID=wxID_ADDURLGENRETEXT, label=u'Genre', name=u'genretext', parent=self, pos=wx.Point(24, 144), size=wx.Size(39, 17), style=0) self.bitratetext = wx.lib.stattext.GenStaticText(ID=wxID_ADDURLBITRATETEXT, label=u'Bitrate', name=u'bitratetext', parent=self, pos=wx.Point(24, 184), size=wx.Size(43, 17), style=0) self.typechoice = wx.Choice(choices=['TV', 'Radio'], id=wxID_ADDURLTYPECHOICE, name=u'typechoice', parent=self, pos=wx.Point(88, 104), size=wx.Size(144, 27), style=0) self.typechoice.SetSelection(1) self.okbutton = wx.Button(id=wxID_ADDURLOKBUTTON, label=u'OK', name=u'okbutton', parent=self, pos=wx.Point(304, 184), size=wx.Size(86, 24), style=0) self.okbutton.SetAutoLayout(True) self.okbutton.SetThemeEnabled(True) self.okbutton.Bind(wx.EVT_BUTTON, self.OnOkbuttonButton, id=wxID_ADDURLOKBUTTON) self.cancelbutton = wx.Button(id=wxID_ADDURLCANCELBUTTON, label=u'Cancel', name=u'cancelbutton', parent=self, pos=wx.Point(192, 184), size=wx.Size(88, 24), style=0) self.okbutton.SetAutoLayout(True) self.okbutton.SetThemeEnabled(True) self.cancelbutton.Bind(wx.EVT_BUTTON, self.OnCancelbuttonButton, id=wxID_ADDURLCANCELBUTTON) self.nametextctrl = wx.TextCtrl(id=wxID_ADDURLNAMETEXTCTRL, name=u'nametextctrl', parent=self, pos=wx.Point(88, 24), size=wx.Size(304, 25), style=0, value=u'') self.urltextctrl = wx.TextCtrl(id=wxID_ADDURLURLTEXTCTRL, name=u'urltextctrl', parent=self, pos=wx.Point(88, 64), size=wx.Size(304, 25), style=0, value=u'') self.genretextctrl = wx.TextCtrl(id=wxID_ADDURLGENRETEXTCTRL, name=u'genretextctrl', parent=self, pos=wx.Point(88, 144), size=wx.Size(304, 25), style=0, value=u'') self.bitratetextctrl = wx.TextCtrl(id=wxID_ADDURLBITRATETEXTCTRL, name=u'bitratetextctrl', parent=self, pos=wx.Point(88, 184), size=wx.Size(80, 25), style=0, value=u'') def __init__(self, parent): self._init_ctrls(parent) self.parent=parent def setfontsize(self, newsize): size=int(newsize) self.nametext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.urltext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.typetext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genretext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.bitratetext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.nametextctrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.urltextctrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.typechoice.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genretextctrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.bitratetextctrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.okbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.cancelbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def OnOkbuttonButton(self, event): self.parent.favname.append(self.nametextctrl.GetValue()) self.parent.favurl.append(self.urltextctrl.GetValue()) self.parent.favmod.append(self.typechoice.GetCurrentSelection()) self.parent.favplay.append("") try: self.parent.favbit.append(str(int(self.bitratetextctrl.GetValue()))) except ValueError: self.parent.favbit.append("0") self.parent.favgen.append(self.genretextctrl.GetValue()) self.parent.favlist.append("0") self.parent.favname,self.parent.favlist, self.parent.favgen, self.parent.favbit, self.parent.favurl, \ self.parent.favplay, self.parent.favmod=self.parent.sort(self.parent.fcol,self.parent.favname,self.parent.favlist,\ self.parent.favgen, self.parent.favbit, self.parent.favurl, self.parent.favplay, self.parent.reverse, self.parent.favmod) self.parent.addtolistctrl(self.parent.FaveListCtrl, self.parent.favname,self.parent.favgen,self.parent.favbit,self.parent.favlist,self.parent.favplay,self.parent.favmod) tuner.savefavorites(self.parent.home,self.parent.favname,self.parent.favurl,self.parent.favlist,\ self.parent.favplay,self.parent.favbit,self.parent.favgen,self.parent.favmod) self.Close() def OnCancelbuttonButton(self, event): self.Close() tunapie-2.1.19/src/tv.png0000644000175000017500000000145611171214563014166 0ustar jamesjamesPNG  IHDRbsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDATHŖ[Har~jˋih5";xH-J(V7O0a2( 71MC]1~}I ZRg|l#=gl鷮5yQhmž:rsed>o|6#,,ثB *Zs+B u-RXxX~~],;D]C3O/l_G"*W.@ J%t˛T]m?ҳot,Dh5^9É$q>b5TLYN& cǃ妽;]]]կV LL8xM=$Zz9p lJ\c#u5F9xGG*!`M'2..ci7o yɩl3ACB~ra(ڶibjSSv\N>$@JJ::4XQ@gs t~.o &>ENIENDB`tunapie-2.1.19/src/stop.png0000644000175000017500000000053611171214563014520 0ustar jamesjamesPNG  IHDR;֕JsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT(;0DߚԡHHAR @()U: @`g%I)@el#05QC;|`eAG'L /|TIENDB`tunapie-2.1.19/src/find.png0000644000175000017500000000132411171214563014447 0ustar jamesjamesPNG  IHDRRgsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<QIDAT8OHa_ۜ4 b0XJ*EPK/KC "Cv*u Hj)s?nns.?6+sxx"x.Q&Sq,P~ti鹔}3 |yšng[; %@\/hJPnwdEv"^{bZ()ͬO8aލ|`!T8~b;Jym5wO +p5 Y0WȮ+P&A9 d!j زfݤjfm:Ԅb%"(\VsĪW7;KMMǟΥN`hXQ]XڭN9H/9osk @ulp(8ط{.c-a# (ib76V:5*Y0 Nڒ_>IENDB`tunapie-2.1.19/src/RecordQueue.py0000644000175000017500000000731411171216607015624 0ustar jamesjames#Boa:Dialog:recqueue #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 0.0.5 27/04/07 import wx import os def create(parent): return recqueue(parent) [wxID_RECQUEUE, wxID_RECQUEUEDELETEBUTTON, wxID_RECQUEUEOKBUTTON, wxID_RECQUEUEQUEUELIST, ] = [wx.NewId() for _init_ctrls in range(4)] class recqueue(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_RECQUEUE, name=u'recqueue', parent=prnt, pos=wx.Point(296, 167), size=wx.Size(390, 445), style=wx.DEFAULT_DIALOG_STYLE, title=u'Scheduled Recordings') self.SetClientSize(wx.Size(390, 445)) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.SetThemeEnabled(True) self.queuelist = wx.ListBox(choices=[], id=wxID_RECQUEUEQUEUELIST, name=u'queuelist', parent=self, pos=wx.Point(16, 16), size=wx.Size(352, 384), style=0) self.queuelist.SetThemeEnabled(True) self.deleteButton = wx.Button(id=wxID_RECQUEUEDELETEBUTTON, label=u'Delete', name=u'deleteButton', parent=self, pos=wx.Point(48, 408), size=wx.Size(85, 24), style=0) self.deleteButton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.deleteButton.SetAutoLayout(True) self.deleteButton.SetThemeEnabled(True) self.deleteButton.Bind(wx.EVT_BUTTON, self.OnDeleteButtonButton, id=wxID_RECQUEUEDELETEBUTTON) self.OKbutton = wx.Button(id=wxID_RECQUEUEOKBUTTON, label=u'OK', name=u'OKbutton', parent=self, pos=wx.Point(250, 408), size=wx.Size(85, 24), style=0) self.OKbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.OKbutton.SetThemeEnabled(True) self.OKbutton.SetAutoLayout(True) self.OKbutton.SetDefault() self.OKbutton.Bind(wx.EVT_BUTTON, self.OnOKbuttonButton, id=wxID_RECQUEUEOKBUTTON) def __init__(self, parent): self._init_ctrls(parent) self.refreshqlist() def setfontsize(self,newsize): size=int(newsize) self.deleteButton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.OKbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def refreshqlist(self): input,output=os.popen2('atq') olines=output.readlines() for item in olines: self.queuelist.Append(item) def OnDeleteButtonButton(self, event): selected=self.queuelist.GetSelection() if selected==-1: return queueevent=self.queuelist.GetStringSelection() queueitems=queueevent.split() null,null=os.popen4('atrm '+queueitems[0]) self.queuelist.Clear() self.refreshqlist() def OnOKbuttonButton(self, event): self.Close() tunapie-2.1.19/src/TunerPrefs.py0000644000175000017500000005340611171216607015501 0ustar jamesjames#Boa:Dialog:preferences #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 0.4.13 16/09/08 import wx import wx.lib.masked.numctrl import wx.lib.stattext import tuner def create(parent): return preferences(parent) [wxID_PREFERENCES, wxID_PREFERENCESAUDIOBROWSE, wxID_PREFERENCESAUDIOPATH, wxID_PREFERENCESBROWSER, wxID_PREFERENCESBROWSERBUTTON, wxID_PREFERENCESBROWSERTEXT, wxID_PREFERENCESBUTTON1, wxID_PREFERENCESBUTTON2, wxID_PREFERENCESFONTSLIDE, wxID_PREFERENCESGENSTATICTEXT1, wxID_PREFERENCESGENSTATICTEXT2, wxID_PREFERENCESGENSTATICTEXT3, wxID_PREFERENCESGENSTATICTEXT4, wxID_PREFERENCESGENSTATICTEXT5, wxID_PREFERENCESGENSTATICTEXT6, wxID_PREFERENCESGENSTATICTEXT7, wxID_PREFERENCESICECASTBUTTON, wxID_PREFERENCESMAXDISP, wxID_PREFERENCESRIPDIR, wxID_PREFERENCESRIPDIRBROWSE, wxID_PREFERENCESRIPPATH, wxID_PREFERENCESSERVERTEXT, wxID_PREFERENCESSHOUTCASTBUTTON, wxID_PREFERENCESSTREAMRIPBROWSE, wxID_PREFERENCESTERMPATH, wxID_PREFERENCESTEXTCTRL1, wxID_PREFERENCESVIDEOBROWSE, wxID_PREFERENCESVIDEOPATH, wxID_PREFERENCESXTERMBROWSE, ] = [wx.NewId() for _init_ctrls in range(29)] class preferences(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_PREFERENCES, name='preferences', parent=prnt, pos=wx.Point(294, 190), size=wx.Size(447, 342), style=wx.DEFAULT_DIALOG_STYLE, title='Preferences') self.SetClientSize(wx.Size(447, 342)) self.SetBackgroundColour(wx.Colour(222, 223, 206)) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.SetThemeEnabled(True) self.genStaticText1 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT1, label=u'Audio player:', name='genStaticText1', parent=self, pos=wx.Point(8, 16), size=wx.Size(63, 13), style=0) self.genStaticText1.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText1.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText1.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText1.SetThemeEnabled(True) self.genStaticText2 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT2, label=u'Nsv (video) player:', name='genStaticText2', parent=self, pos=wx.Point(8, 48), size=wx.Size(92, 13), style=0) self.genStaticText2.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText2.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText2.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText2.SetThemeEnabled(True) self.button1 = wx.Button(id=wxID_PREFERENCESBUTTON1, label='Save', name='button1', parent=self, pos=wx.Point(290, 304), size=wx.Size(80, 24), style=0) self.button1.SetDefault() self.button1.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button1.SetThemeEnabled(True) self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button, id=wxID_PREFERENCESBUTTON1) self.button2 = wx.Button(id=wxID_PREFERENCESBUTTON2, label='Cancel', name='button2', parent=self, pos=wx.Point(80, 304), size=wx.Size(80, 24), style=0) self.button2.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button2.SetThemeEnabled(True) self.button2.Bind(wx.EVT_BUTTON, self.OnButton2Button, id=wxID_PREFERENCESBUTTON2) self.audiopath = wx.TextCtrl(id=wxID_PREFERENCESAUDIOPATH, name='audiopath', parent=self, pos=wx.Point(144, 16), size=wx.Size(200, 22), style=0, value='/usr/bin/xmms') self.audiopath.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.audiopath.SetBackgroundColour(wx.Colour(255, 253, 239)) self.audiopath.SetThemeEnabled(True) self.audiopath.SetBestFittingSize(wx.Size(200, 22)) self.videopath = wx.TextCtrl(id=wxID_PREFERENCESVIDEOPATH, name='videopath', parent=self, pos=wx.Point(144, 48), size=wx.Size(200, 22), style=0, value='/usr/bin/mplayer') self.videopath.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.videopath.SetBackgroundColour(wx.Colour(255, 253, 239)) self.videopath.SetThemeEnabled(True) self.videopath.SetBestFittingSize(wx.Size(200, 22)) self.genStaticText3 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT3, label=u'Xterminal:', name='genStaticText3', parent=self, pos=wx.Point(8, 80), size=wx.Size(49, 13), style=0) self.genStaticText3.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText3.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText3.SetThemeEnabled(True) self.genStaticText4 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT4, label=u'Streamripper:', name='genStaticText4', parent=self, pos=wx.Point(8, 112), size=wx.Size(68, 13), style=0) self.genStaticText4.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText4.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText4.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText4.SetThemeEnabled(True) self.termpath = wx.TextCtrl(id=wxID_PREFERENCESTERMPATH, name='termpath', parent=self, pos=wx.Point(144, 80), size=wx.Size(200, 22), style=0, value='/usr/bin/x-terminal-emulator') self.termpath.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.termpath.SetBackgroundColour(wx.Colour(255, 253, 239)) self.termpath.SetThemeEnabled(True) self.termpath.SetBestFittingSize(wx.Size(200, 22)) self.rippath = wx.TextCtrl(id=wxID_PREFERENCESRIPPATH, name='rippath', parent=self, pos=wx.Point(144, 112), size=wx.Size(200, 22), style=0, value='/usr/bin/streamripper') self.rippath.SetFont(wx.Font(7, 77, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.rippath.SetBackgroundColour(wx.Colour(255, 253, 239)) self.rippath.SetThemeEnabled(True) self.rippath.SetBestFittingSize(wx.Size(200, 22)) self.genStaticText5 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT5, label=u'Path to rip directory:', name='genStaticText5', parent=self, pos=wx.Point(8, 176), size=wx.Size(100, 13), style=0) self.genStaticText5.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText5.SetBackgroundColour(wx.Colour(220, 218, 213)) self.genStaticText5.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.genStaticText5.SetThemeEnabled(True) self.ripdir = wx.TextCtrl(id=wxID_PREFERENCESRIPDIR, name=u'ripdir', parent=self, pos=wx.Point(144, 176), size=wx.Size(200, 22), style=0, value=u'~/.tunapie/streamripper') self.ripdir.SetBackgroundColour(wx.Colour(255, 253, 239)) self.ripdir.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.ripdir.SetThemeEnabled(True) self.ripdir.SetBestFittingSize(wx.Size(200, 22)) self.servertext = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESSERVERTEXT, label=u'Server:', name=u'servertext', parent=self, pos=wx.Point(80, 277), size=wx.Size(36, 13), style=0) self.servertext.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.servertext.SetBackgroundColour(wx.Colour(220, 218, 213)) self.servertext.SetThemeEnabled(True) self.servertext.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.icecastbutton = wx.RadioButton(id=wxID_PREFERENCESICECASTBUTTON, label=u'Icecast', name=u'icecastbutton', parent=self, pos=wx.Point(160, 272), size=wx.Size(96, 24), style=0) self.icecastbutton.SetValue(True) self.icecastbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.icecastbutton.SetThemeEnabled(True) self.shoutcastbutton = wx.RadioButton(id=wxID_PREFERENCESSHOUTCASTBUTTON, label=u'Shoutcast', name=u'shoutcastbutton', parent=self, pos=wx.Point(272, 272), size=wx.Size(96, 24), style=0) self.shoutcastbutton.SetValue(False) self.shoutcastbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.shoutcastbutton.SetThemeEnabled(True) self.audiobrowse = wx.Button(id=wxID_PREFERENCESAUDIOBROWSE, label=u'Browse', name=u'audiobrowse', parent=self, pos=wx.Point(380, 16), size=wx.Size(53, 22), style=0) self.audiobrowse.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.audiobrowse.SetThemeEnabled(True) self.audiobrowse.Bind(wx.EVT_BUTTON, self.OnAudiobrowseButton, id=wxID_PREFERENCESAUDIOBROWSE) self.videobrowse = wx.Button(id=wxID_PREFERENCESVIDEOBROWSE, label=u'Browse', name=u'videobrowse', parent=self, pos=wx.Point(380, 48), size=wx.Size(53, 22), style=0) self.videobrowse.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.videobrowse.Bind(wx.EVT_BUTTON, self.OnVideobrowseButton, id=wxID_PREFERENCESVIDEOBROWSE) self.xtermbrowse = wx.Button(id=wxID_PREFERENCESXTERMBROWSE, label=u'Browse', name=u'xtermbrowse', parent=self, pos=wx.Point(380, 80), size=wx.Size(53, 22), style=0) self.xtermbrowse.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.xtermbrowse.SetThemeEnabled(True) self.xtermbrowse.Bind(wx.EVT_BUTTON, self.OnXtermbrowseButton, id=wxID_PREFERENCESXTERMBROWSE) self.streamripbrowse = wx.Button(id=wxID_PREFERENCESSTREAMRIPBROWSE, label=u'Browse', name=u'streamripbrowse', parent=self, pos=wx.Point(380, 112), size=wx.Size(53, 22), style=0) self.streamripbrowse.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.streamripbrowse.SetThemeEnabled(True) self.streamripbrowse.Bind(wx.EVT_BUTTON, self.OnStreamripbrowseButton, id=wxID_PREFERENCESSTREAMRIPBROWSE) self.ripdirbrowse = wx.Button(id=wxID_PREFERENCESRIPDIRBROWSE, label=u'Browse', name=u'ripdirbrowse', parent=self, pos=wx.Point(380, 176), size=wx.Size(53, 24), style=0) self.ripdirbrowse.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.ripdirbrowse.SetThemeEnabled(True) self.ripdirbrowse.Bind(wx.EVT_BUTTON, self.OnRipdirbrowseButton, id=wxID_PREFERENCESRIPDIRBROWSE) self.genStaticText6 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT6, label=u'Max. streams to display in main list (50-500):', name='genStaticText6', parent=self, pos=wx.Point(56, 208), size=wx.Size(218, 13), style=0) self.genStaticText6.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText6.SetThemeEnabled(True) self.maxdisp = wx.TextCtrl(id=wxID_PREFERENCESMAXDISP, name=u'maxdisp', parent=self, pos=wx.Point(336, 208), size=wx.Size(40, 22), style=0, value=u'100') self.maxdisp.SetThemeEnabled(True) self.maxdisp.SetBackgroundColour(wx.Colour(255, 253, 239)) self.maxdisp.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.maxdisp.SetBestFittingSize(wx.Size(40, 22)) self.genStaticText7 = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESGENSTATICTEXT7, label=u'Default font size:', name='genStaticText7', parent=self, pos=wx.Point(56, 240), size=wx.Size(83, 13), style=0) self.genStaticText7.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText7.SetThemeEnabled(True) self.fontslide = wx.Slider(id=wxID_PREFERENCESFONTSLIDE, maxValue=12, minValue=5, name=u'fontslide', parent=self, point=wx.Point(176, 240), size=wx.Size(140, 20), style=wx.SL_HORIZONTAL, value=8) self.fontslide.SetThemeEnabled(True) self.fontslide.SetMin(5) self.fontslide.SetMax(12) self.fontslide.SetBestFittingSize(wx.Size(140, 20)) self.fontslide.SetLabel(u'') self.fontslide.SetPageSize(2) self.fontslide.Bind(wx.EVT_SCROLL, self.OnFontslideScroll) self.textCtrl1 = wx.TextCtrl(id=wxID_PREFERENCESTEXTCTRL1, name='textCtrl1', parent=self, pos=wx.Point(336, 240), size=wx.Size(32, 24), style=0, value=u'8') self.textCtrl1.SetBackgroundColour(wx.Colour(255, 253, 239)) self.textCtrl1.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.textCtrl1.SetEditable(False) self.textCtrl1.SetThemeEnabled(True) self.textCtrl1.Enable(True) self.browsertext = wx.lib.stattext.GenStaticText(ID=wxID_PREFERENCESBROWSERTEXT, label=u'Web browser:', name=u'browsertext', parent=self, pos=wx.Point(8, 144), size=wx.Size(66, 13), style=0) self.browsertext.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browsertext.SetThemeEnabled(True) self.browser = wx.TextCtrl(id=wxID_PREFERENCESBROWSER, name=u'browser', parent=self, pos=wx.Point(144, 144), size=wx.Size(200, 22), style=0, value=u'/usr/bin/firefox') self.browser.SetBackgroundColour(wx.Colour(255, 253, 239)) self.browser.SetThemeEnabled(True) self.browser.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browserbutton = wx.Button(id=wxID_PREFERENCESBROWSERBUTTON, label=u'Browse', name=u'browserbutton', parent=self, pos=wx.Point(380, 144), size=wx.Size(53, 22), style=0) self.browserbutton.SetFont(wx.Font(7, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browserbutton.SetThemeEnabled(True) self.browserbutton.Bind(wx.EVT_BUTTON, self.OnBrowserbuttonButton, id=wxID_PREFERENCESBROWSERBUTTON) def __init__(self, parent): self._init_ctrls(parent) def setfontsize(self, newsize): size=int(newsize) self.genStaticText1.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText2.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button1.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.button2.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.audiopath.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.videopath.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText3.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText4.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.termpath.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.rippath.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText5.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.ripdir.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.servertext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.icecastbutton.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.shoutcastbutton.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.audiobrowse.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.videobrowse.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.xtermbrowse.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.streamripbrowse.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText6.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.ripdirbrowse.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.maxdisp.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.genStaticText7.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.textCtrl1.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browser.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browserbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.browsertext.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def setvars(self,media,video,term,rip,home,rdir,shoutice,maxd,fontsize,browser): self.audiopath.SetValue(media) self.videopath.SetValue(video) self.termpath.SetValue(term) self.rippath.SetValue(rip) self.ripdir.SetValue(rdir) self.shoutcastbutton.SetValue(bool(int(shoutice))) self.maxdisp.SetValue(str(int(maxd))) self.fontslide.SetValue(int(fontsize)) self.textCtrl1.SetValue(str(int(fontsize))) self.browser.SetValue(browser) self.home=home def OnButton2Button(self, event): self.Close() def OnButton1Button(self, event): try: if (int(self.maxdisp.GetValue())<50): self.maxdisp.SetValue('50') except ValueError: self.maxdisp.SetValue('100') if (int(self.maxdisp.GetValue())>500): self.maxdisp.SetValue('500') tuner.writeprefs(self.home,self.audiopath.GetValue(),\ self.videopath.GetValue(),self.termpath.GetValue(),\ self.rippath.GetValue(), self.ripdir.GetValue(),\ self.shoutcastbutton.GetValue(), self.maxdisp.GetValue(),\ self.fontslide.GetValue(), self.browser.GetValue()) self.Close() def OnAudiobrowseButton(self, event): dlg = wx.FileDialog(self, "Choose a file", "/usr/bin", "", "*", wx.OPEN) try: if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() self.audiopath.SetValue(filename) finally: dlg.Destroy() def OnVideobrowseButton(self, event): dlg = wx.FileDialog(self, "Choose a file", "/usr/bin", "", "*", wx.OPEN) try: if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() self.videopath.SetValue(filename) finally: dlg.Destroy() def OnXtermbrowseButton(self, event): dlg = wx.FileDialog(self, "Choose a file", "/usr/bin", "", "*", wx.OPEN) try: if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() self.termpath.SetValue(filename) finally: dlg.Destroy() def OnStreamripbrowseButton(self, event): dlg = wx.FileDialog(self, "Choose a file", "/usr/bin", "", "*", wx.OPEN) try: if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() self.rippath.SetValue(filename) finally: dlg.Destroy() def OnBrowserbuttonButton(self, event): dlg = wx.FileDialog(self, "Choose a file", "/usr/bin", "", "*", wx.OPEN) try: if dlg.ShowModal() == wx.ID_OK: filename = dlg.GetPath() self.browser.SetValue(filename) finally: dlg.Destroy() def OnRipdirbrowseButton(self, event): dlg = wx.DirDialog(self, "Choose a directory", self.home) try: if dlg.ShowModal() == wx.ID_OK: dir = dlg.GetPath() self.ripdir.SetValue(dir) finally: dlg.Destroy() def OnFontslideScroll(self, event): size=str(self.fontslide.GetValue()) self.textCtrl1.SetValue(size) self.setfontsize(size) tunapie-2.1.19/src/Tunapie.py0000644000175000017500000000271211171216607015003 0ustar jamesjames#Boa:App:BoaApp #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 2.1 04/09/07 import wxversion wxversion.ensureMinimal("2.6") import wx import tunapie2_main import os import sys modules ={u'tunapie2_main': [1, 'Main frame of Application', u'tunapie2_main.py']} class BoaApp(wx.App): def OnInit(self): path=sys.argv[0][:sys.argv[0].find('Tunapie.py')] try: os.chdir(path) except OSError: pass wx.InitAllImageHandlers() self.main = tunapie2_main.create(None) self.main.Show() self.SetTopWindow(self.main) return True def main(): application = BoaApp(0) application.MainLoop() if __name__ == '__main__': main() tunapie-2.1.19/src/fave.png0000644000175000017500000000077511171214563014461 0ustar jamesjamesPNG  IHDRH-sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<zIDAT(;/DQsx4G"DQR1JeZ?`(JC([WCOIENDB`tunapie-2.1.19/src/info.png0000644000175000017500000000070511171214563014464 0ustar jamesjamesPNG  IHDR sBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<BIDAT(1hAoZi!vBHcRYk%DkA΃I ,FB;Q+-&i`cX{3Φ/na?E."Bjila|B䲟<`W$k [+x0.Be}䤦R^cCxѡ+CjԺ{)alcC_zz?15K= nG.1TaNjl~8M ~ȭIxj{jswΙIZZ6"~w\aIENDB`tunapie-2.1.19/src/radio.png0000644000175000017500000000110511171214563014622 0ustar jamesjamesPNG  IHDRۥsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8?oAg&gb J))4o@-5=( "H{wpDFzڙ'3<bI0gzsน wbߐ4f0 I28 ŬKڝ)9Hgp ,pb  u5O+)<2DZJ2X5hإibنhz ER:}b%:XحHmZ 5Z˭Z,5s0-EXCVBqy'^ѲnlbKeX^V6Cg{ԘTo*6};Ac6~ yJv;6Xæ@x[tpafrbj<>k{Mt$3-1: found=0 else: found=1 firstrun=0 id=id.split(" ") try: id=str(int(id[0])) except: try: id=str(int(id[1])) except: return found commands.getoutput("kill -15 %s" % id) if commands.getoutput("ps "+flag+"U "+me+" "+flag+"o pid "+flag+"o command").find(id) > -1: commands.getoutput("kill -9 %s" % id) return found def unblock(fd): fl = fcntl.fcntl(fd, fcntl.F_GETFL) try: fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NDELAY) except AttributeError: fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.FNDELAY) def decode(file,radio,adult,fav=0): stationurl=[] stationname=[] stationgenre=[] stationplaying=[] stationbitrate=[] stationlisteners=[] stationmod=[] f=open(file,'r') pos=0 oldpos=0 data=f.read() while 1: name=data.find('name="',pos) if(name==-1 or pos-1: stationname=['Server Returned 503 - Unavailable'] else: stationname=['No Streams Available!'] stationurl=[' '] stationgenre=['Nothing!'] stationplaying=['Nothing!'] stationbitrate=['0'] stationlisteners=['0'] if(fav==0): return(stationurl,stationname,stationgenre,\ stationplaying,stationbitrate,stationlisteners) return(stationname,stationurl,stationgenre,stationplaying,\ stationbitrate,stationlisteners,stationmod) oldpos=pos nameend=data.find('"',name+6) url=data.find('id="',nameend) urlend=data.find('"',url+4) bitrate=data.find('br="',urlend) bitrateend=data.find('"',bitrate+4) genre=data.find('genre="',bitrateend) genreend=data.find('"',genre+7) playing=data.find('ct="',bitrateend) playingend=data.find('"',playing+4) listeners=data.find('lc="',playingend) listenersend=data.find('"',listeners+4) pos=listenersend+1 if(radio==0): rating=data.find('rt="',oldpos) ratingend=data.find('"',rating+4) if(not(adult)): if(radio==0): if(data[rating+4:ratingend]=="NC17"): continue if fav==1: mod=data.find('mod="',oldpos) modend=data.find('"',mod+5) try: stationmod.append(int(data[mod+5:modend])) except ValueError: if (data[mod+5:modend]=='True'): stationmod.append(1) else: stationmod.append(0) pos=modend+1 if pos',pos) if(name==-1 or pos',nameend) urlend=data.find('', urlend) servertypeend=data.find('', servertypeend) bitrateend=data.find('',bitrateend) genreend=data.find('',genreend) playingend=data.find('-1: pos=playingend+6 continue pos=playingend+6 if pos-1 or notempfile: subprocess.Popen([mediaplayer,pls]) os.unlink(temp[1]) return plist=playlist.readlines() if len(plist)==1: subprocess.Popen([mediaplayer,plist[0]]) os.unlink(temp[1]) return for line in plist: tfile.write(line) tfile.close() subprocess.Popen([mediaplayer,temp[1]]) time.sleep(5) os.unlink(temp[1]) def playvid(mediaplayer,pls): subprocess.Popen([mediaplayer, pls]) def savefavorites(home,favname,favurl,favlist,favplay,favbit,favgen,favmod): favfile=open(home+'/.tunapie/favorites','w') for i in range(len(favname)): favfile.write('name="'+favname[i]+'"\n') favfile.write('id="'+favurl[i]+'"\n') favfile.write('br="'+favbit[i]+'"\n') favfile.write('genre="'+favgen[i]+'"\n') favfile.write('ct="'+favplay[i]+'"\n') favfile.write('lc="'+favlist[i]+'"\n') favfile.write('mod="'+str(favmod[i])+'"\n') def writeprefs(home,audio,video,term,rip,rdir,shoutice,maxd,fontsize,browser): preffile=open(home+'/.tunapie/prefs','w') preffile.write("audioplayer="+audio+'\n') preffile.write("videoplayer="+video+'\n') preffile.write("xterm="+term+'\n') preffile.write("streamripper="+rip+'\n') preffile.write("ripdirectory="+rdir+'\n') preffile.write("icecast(0)/shoutcast(1)="+str(int(shoutice))+'\n') preffile.write("max streams to display="+str(int(maxd))+'\n') preffile.write("font size="+str(int(fontsize))+'\n') preffile.write("web browser="+browser+'\n') def readprefs(home,rdir,shoutice,maxd,fontsize): try: preffile=open(home+'/.tunapie/prefs','r') except IOError: return "","","","",rdir,shoutice,maxd,fontsize,"" preferences=preffile.read().split('\n') returnvals=[] for i in preferences: try:returnvals.append(i.split("=")[1]) except IndexError: pass if len(returnvals)<9: return "","","","",rdir,shoutice,maxd,fontsize,"" return(returnvals[0],returnvals[1],returnvals[2],returnvals[3],\ returnvals[4],returnvals[5],returnvals[6], returnvals[7],\ returnvals[8]) def recordselection(terminal,args): subprocess.Popen(terminal+" "+args,shell=True) def showpage(browser,url): subprocess.Popen([browser,url]) def adultset(): try: adultconfig=open('/etc/tunapie.config') except IOError: return 0 setadult=adultconfig.readline() return int(setadult) def fixunicode(text): fixed="" for letter in text: try: fixed=fixed+letter.encode() except: pass #fixed = unicodedata.normalize('NFKD', temp).encode('ASCII', 'replace') return fixed tunapie-2.1.19/src/play.png0000644000175000017500000000067511171214563014504 0ustar jamesjamesPNG  IHDR;֕JsBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<:IDAT(=TA "b&f`JcŠ2& & _f ]:8יzd}zױ[xXK4Y~ŁK\E%ࡔ׸{!!#`˯֒ ßR;3x#cǛXk_j7q{?;'RKۑv9؃`3]sHw٘/K'8.ג8`e |ÕZ򣽠~[pоIENDB`tunapie-2.1.19/src/tunapie2_main.py0000644000175000017500000017725312453576641016161 0ustar jamesjames#Boa:Frame:TunapieFrame #TunaPie (c)2005-2009 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 2.0.17 30/01/09 import wx from wx.lib.anchors import LayoutAnchors import wx.grid import tuner import RecordTime import TunerPrefs import AboutTuner import RecordQueue import TunerInfoDialog import AddStream import os import socket import time import thread import urllib import getpass import TunaSearch import commands import select searchname="" def create(parent): return TunapieFrame(parent) [wxID_TUNAPIEFRAME, wxID_TUNAPIEFRAMEFAVELISTCTRL, wxID_TUNAPIEFRAMEFAVESPLITTER, wxID_TUNAPIEFRAMEGENREBOX, wxID_TUNAPIEFRAMEMAINLISTCTRL, wxID_TUNAPIEFRAMEMAINSPLITTER, wxID_TUNAPIEFRAMETUNAPIESTATUS, wxID_TUNAPIEFRAMETUNAPIETOOLBAR, ] = [wx.NewId() for _init_ctrls in range(8)] [wxID_FRAME1TOOLBAR1TOOLS0, wxID_FRAME1TOOLBAR1TOOLS1, wxID_FRAME1TOOLBAR1TOOLS2, ] = [wx.NewId() for _init_coll_toolBar1_Tools in range(3)] [wxID_TUNAPIEFRAMETUNAPIETOOLBARADDFAVE, wxID_TUNAPIEFRAMETUNAPIETOOLBARFIND, wxID_TUNAPIEFRAMETUNAPIETOOLBARINFO, wxID_TUNAPIEFRAMETUNAPIETOOLBARPLAY, wxID_TUNAPIEFRAMETUNAPIETOOLBARRADIO, wxID_TUNAPIEFRAMETUNAPIETOOLBARREC, wxID_TUNAPIEFRAMETUNAPIETOOLBARREMFAVE, wxID_TUNAPIEFRAMETUNAPIETOOLBARSTOP, wxID_TUNAPIEFRAMETUNAPIETOOLBARTV, ] = [wx.NewId() for _init_coll_TunapieToolBar_Tools in range(9)] [wxID_TUNAPIEFRAMEMAINCONTEXTADDFAVE, wxID_TUNAPIEFRAMEMAINCONTEXTINFO, wxID_TUNAPIEFRAMEMAINCONTEXTPLAY, wxID_TUNAPIEFRAMEMAINCONTEXTRECORD, ] = [wx.NewId() for _init_coll_maincontext_Items in range(4)] [wxID_TUNAPIEFRAMEFAVECONTEXTINFO, wxID_TUNAPIEFRAMEFAVECONTEXTPLAY, wxID_TUNAPIEFRAMEFAVECONTEXTRECORD, wxID_TUNAPIEFRAMEFAVECONTEXTREMOVE, wxID_TUNAPIEFRAMEFAVECONTEXTADDURL] = [wx.NewId() for _init_coll_favecontext_Items in range(5)] [wxID_TUNAPIEFRAMEFILEMENUPREFERENCES, wxID_TUNAPIEFRAMEFILEMENUQUIT, wxID_TUNAPIEFRAMEFILEMENURECORDQUEUE, wxID_TUNAPIEFRAMEFILEMENURELOAD, ] = [wx.NewId() for _init_coll_Filemenu_Items in range(4)] [wxID_TUNAPIEFRAMEHELPMENUABOUT] = [wx.NewId() for _init_coll_Helpmenu_Items in range(1)] class TunapieFrame(wx.Frame): def _init_coll_maincontext_Items(self, parent): # generated method, don't edit parent.Append(help='', id=wxID_TUNAPIEFRAMEMAINCONTEXTPLAY, kind=wx.ITEM_NORMAL, text=u'Play') parent.Append(help='', id=wxID_TUNAPIEFRAMEMAINCONTEXTINFO, kind=wx.ITEM_NORMAL, text=u'Info') parent.Append(help='', id=wxID_TUNAPIEFRAMEMAINCONTEXTRECORD, kind=wx.ITEM_NORMAL, text=u'Record') parent.Append(help='', id=wxID_TUNAPIEFRAMEMAINCONTEXTADDFAVE, kind=wx.ITEM_NORMAL, text=u'Add to Favorites') self.Bind(wx.EVT_MENU, self.OnMaincontextAddfaveMenu, id=wxID_TUNAPIEFRAMEMAINCONTEXTADDFAVE) self.Bind(wx.EVT_MENU, self.OnMaincontextPlayMenu, id=wxID_TUNAPIEFRAMEMAINCONTEXTPLAY) self.Bind(wx.EVT_MENU, self.OnMaincontextRecordMenu, id=wxID_TUNAPIEFRAMEMAINCONTEXTRECORD) self.Bind(wx.EVT_MENU, self.OnMaincontextInfoMenu, id=wxID_TUNAPIEFRAMEMAINCONTEXTINFO) def _init_coll_favecontext_Items(self, parent): # generated method, don't edit parent.Append(help='', id=wxID_TUNAPIEFRAMEFAVECONTEXTPLAY, kind=wx.ITEM_NORMAL, text=u'Play') parent.Append(help='', id=wxID_TUNAPIEFRAMEFAVECONTEXTINFO, kind=wx.ITEM_NORMAL, text=u'Info') parent.Append(help='', id=wxID_TUNAPIEFRAMEFAVECONTEXTRECORD, kind=wx.ITEM_NORMAL, text=u'Record') parent.Append(help='', id=wxID_TUNAPIEFRAMEFAVECONTEXTREMOVE, kind=wx.ITEM_NORMAL, text=u'Remove From Favorites') parent.Append(help='', id=wxID_TUNAPIEFRAMEFAVECONTEXTADDURL, kind=wx.ITEM_NORMAL, text=u'Add User Defined Station') self.Bind(wx.EVT_MENU, self.OnFavecontextPlayMenu, id=wxID_TUNAPIEFRAMEFAVECONTEXTPLAY) self.Bind(wx.EVT_MENU, self.OnFavecontextRemoveMenu, id=wxID_TUNAPIEFRAMEFAVECONTEXTREMOVE) self.Bind(wx.EVT_MENU, self.OnFavecontextRecordMenu, id=wxID_TUNAPIEFRAMEFAVECONTEXTRECORD) self.Bind(wx.EVT_MENU, self.OnFavecontextInfoMenu, id=wxID_TUNAPIEFRAMEFAVECONTEXTINFO) self.Bind(wx.EVT_MENU, self.OnFavecontextURLMenu, id=wxID_TUNAPIEFRAMEFAVECONTEXTADDURL) def _init_coll_menuBar1_Menus(self, parent): # generated method, don't edit parent.Append(menu=self.Filemenu, title=u'File') parent.Append(menu=self.Helpmenu, title=u'Help') def _init_coll_Helpmenu_Items(self, parent): # generated method, don't edit parent.Append(help='', id=wxID_TUNAPIEFRAMEHELPMENUABOUT, kind=wx.ITEM_NORMAL, text=u'About') self.Bind(wx.EVT_MENU, self.OnHelpmenuAboutMenu, id=wxID_TUNAPIEFRAMEHELPMENUABOUT) def _init_coll_Filemenu_Items(self, parent): # generated method, don't edit parent.Append(help='', id=wxID_TUNAPIEFRAMEFILEMENUPREFERENCES, kind=wx.ITEM_NORMAL, text=u'Preferences') parent.Append(help='', id=wxID_TUNAPIEFRAMEFILEMENURECORDQUEUE, kind=wx.ITEM_NORMAL, text=u'Record Queue') parent.Append(help='', id=wxID_TUNAPIEFRAMEFILEMENURELOAD, kind=wx.ITEM_NORMAL, text=u'Reload') parent.Append(help='', id=wxID_TUNAPIEFRAMEFILEMENUQUIT, kind=wx.ITEM_NORMAL, text=u'Quit') self.Bind(wx.EVT_MENU, self.OnFilemenuPreferencesMenu, id=wxID_TUNAPIEFRAMEFILEMENUPREFERENCES) self.Bind(wx.EVT_MENU, self.OnFilemenuRecordqueueMenu, id=wxID_TUNAPIEFRAMEFILEMENURECORDQUEUE) self.Bind(wx.EVT_MENU, self.OnFilemenuReloadMenu, id=wxID_TUNAPIEFRAMEFILEMENURELOAD) self.Bind(wx.EVT_MENU, self.OnFilemenuQuitMenu, id=wxID_TUNAPIEFRAMEFILEMENUQUIT) def _init_coll_MainListCtrl_Columns(self, parent): # generated method, don't edit parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT, heading=u'Station Name', width=200) parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT, heading=u'Genre', width=150) parent.InsertColumn(col=2, format=wx.LIST_FORMAT_LEFT, heading=u'Bitrate', width=100) parent.InsertColumn(col=3, format=wx.LIST_FORMAT_LEFT, heading=u'Listeners', width=100) parent.InsertColumn(col=4, format=wx.LIST_FORMAT_LEFT, heading=u'TV/Radio', width=100) parent.InsertColumn(col=5, format=wx.LIST_FORMAT_LEFT, heading=u'Now Playing', width=150) def _init_coll_TunapieStatus_Fields(self, parent): # generated method, don't edit parent.SetFieldsCount(1) parent.SetStatusText(number=0, text=u'') parent.SetStatusWidths([-1]) def _init_coll_FaveListCtrl_Columns(self, parent): # generated method, don't edit parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT, heading=u'Favorites', width=200) parent.InsertColumn(col=1, format=wx.LIST_FORMAT_LEFT, heading=u'Genre', width=150) parent.InsertColumn(col=2, format=wx.LIST_FORMAT_LEFT, heading=u'Bitrate', width=100) parent.InsertColumn(col=3, format=wx.LIST_FORMAT_LEFT, heading=u'Listeners', width=100) parent.InsertColumn(col=4, format=wx.LIST_FORMAT_LEFT, heading=u'TV/Radio', width=100) parent.InsertColumn(col=5, format=wx.LIST_FORMAT_LEFT, heading=u'Now Playing', width=150) def _init_coll_GenreBox_Columns(self, parent): # generated method, don't edit parent.InsertColumn(col=0, format=wx.LIST_FORMAT_LEFT, heading=u'Genre', width=400) def _init_coll_TunapieToolBar_Tools(self, parent): # generated method, don't edit parent.DoAddTool(bitmap=wx.Bitmap(u'play.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARPLAY, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Play') parent.DoAddTool(bitmap=wx.Bitmap(u'stop.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARSTOP, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Stop') parent.DoAddTool(bitmap=wx.Bitmap(u'rec.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARREC, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Record') parent.DoAddTool(bitmap=wx.Bitmap(u'radio.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARRADIO, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Radio') parent.DoAddTool(bitmap=wx.Bitmap(u'tv.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARTV, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'TV') parent.DoAddTool(bitmap=wx.Bitmap(u'fave.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARADDFAVE, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Add To Favorites') parent.DoAddTool(bitmap=wx.Bitmap(u'remfave.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARREMFAVE, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Remove From Favorites') parent.DoAddTool(bitmap=wx.Bitmap(u'find.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARFIND, kind=wx.ITEM_NORMAL, label=u'', longHelp='', shortHelp=u'Search') parent.DoAddTool(bitmap=wx.Bitmap(u'info.png', wx.BITMAP_TYPE_PNG), bmpDisabled=wx.NullBitmap, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARINFO, kind=wx.ITEM_NORMAL, label='', longHelp='', shortHelp=u'Stream Info') self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarRadioTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARRADIO) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarTvTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARTV) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarPlayTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARPLAY) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarStopTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARSTOP) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarRecTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARREC) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarAddfaveTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARADDFAVE) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarRemfaveTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARREMFAVE) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarFindTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARFIND) self.Bind(wx.EVT_TOOL, self.OnTunapieToolBarInfoTool, id=wxID_TUNAPIEFRAMETUNAPIETOOLBARINFO) parent.Realize() def _init_utils(self): # generated method, don't edit self.menuBar1 = wx.MenuBar() self.Filemenu = wx.Menu(title=u'') self.maincontext = wx.Menu(title=u'') self.favecontext = wx.Menu(title='') self.Helpmenu = wx.Menu(title='') self._init_coll_menuBar1_Menus(self.menuBar1) self._init_coll_Filemenu_Items(self.Filemenu) self._init_coll_maincontext_Items(self.maincontext) self._init_coll_favecontext_Items(self.favecontext) self._init_coll_Helpmenu_Items(self.Helpmenu) def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=wxID_TUNAPIEFRAME, name=u'TunapieFrame', parent=prnt, pos=wx.Point(105, 147), size=wx.Size(600, 400), style=wx.DEFAULT_FRAME_STYLE, title=u'Tunapie2') self._init_utils() self.SetClientSize(wx.Size(600, 400)) self.SetAutoLayout(True) self.SetMenuBar(self.menuBar1) self.SetIcon(wx.Icon('../pixmaps/tplogo.xpm',wx.BITMAP_TYPE_XPM)) self.Bind(wx.EVT_KEY_UP, self.OnTunapieFrameKeyUp) self.Bind(wx.EVT_CLOSE, self.OnTunapieFrameClose) self.TunapieStatus = wx.StatusBar(id=wxID_TUNAPIEFRAMETUNAPIESTATUS, name=u'TunapieStatus', parent=self, style=wx.ST_SIZEGRIP | wx.RAISED_BORDER) self.TunapieStatus.SetFieldsCount(1) self._init_coll_TunapieStatus_Fields(self.TunapieStatus) self.SetStatusBar(self.TunapieStatus) if commands.getoutput("uname")=='Darwin': mainsize=380 else: mainsize=348 self.mainsplitter = wx.SplitterWindow(id=wxID_TUNAPIEFRAMEMAINSPLITTER, name=u'mainsplitter', parent=self, pos=wx.Point(0, 0), size=wx.Size(600,mainsize), style=wx.SP_3D) self.mainsplitter.SetMinimumPaneSize(2) self.mainsplitter.SetConstraints(LayoutAnchors(self.mainsplitter, True, True, True, True)) self.mainsplitter.SetThemeEnabled(True) self.favesplitter = wx.SplitterWindow(id=wxID_TUNAPIEFRAMEFAVESPLITTER, name=u'favesplitter', parent=self.mainsplitter, pos=wx.Point(352, -24), size=wx.Size(200, 200), style=wx.SP_3D) self.favesplitter.SetMinimumPaneSize(2) self.favesplitter.SetThemeEnabled(True) self.FaveListCtrl = wx.ListCtrl(id=wxID_TUNAPIEFRAMEFAVELISTCTRL, name=u'FaveListCtrl', parent=self.favesplitter, pos=wx.Point(8, 120), size=wx.Size(200, 200), style=wx.LC_SINGLE_SEL | wx.LC_REPORT) self.FaveListCtrl.SetThemeEnabled(True) self.FaveListCtrl.SetMinSize(wx.Size(0, 0)) self._init_coll_FaveListCtrl_Columns(self.FaveListCtrl) self.FaveListCtrl.Bind(wx.EVT_LIST_COL_CLICK, self.OnFaveListCtrlListColClick, id=wxID_TUNAPIEFRAMEFAVELISTCTRL) self.FaveListCtrl.Bind(wx.EVT_LEFT_DCLICK, self.OnFaveListCtrlLeftDclick) self.FaveListCtrl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnFaveListCtrlListItemRightClick, id=wxID_TUNAPIEFRAMEFAVELISTCTRL) self.FaveListCtrl.Bind(wx.EVT_SET_FOCUS, self.OnFaveListCtrlSetFocus) self.MainListCtrl = wx.ListCtrl(id=wxID_TUNAPIEFRAMEMAINLISTCTRL, name=u'MainListCtrl', parent=self.mainsplitter, pos=wx.Point(-104, -72), size=wx.Size(200, 200), style=wx.LC_SINGLE_SEL | wx.LC_REPORT) self.MainListCtrl.SetThemeEnabled(True) self.MainListCtrl.SetMinSize(wx.Size(0, 0)) self.MainListCtrl.SetLabel(u'') self._init_coll_MainListCtrl_Columns(self.MainListCtrl) self.MainListCtrl.Bind(wx.EVT_LIST_COL_CLICK, self.OnMainListCtrlListColClick, id=wxID_TUNAPIEFRAMEMAINLISTCTRL) self.MainListCtrl.Bind(wx.EVT_LEFT_DCLICK, self.OnMainListCtrlLeftDclick) self.MainListCtrl.Bind(wx.EVT_LIST_ITEM_RIGHT_CLICK, self.OnMainListCtrlListItemRightClick, id=wxID_TUNAPIEFRAMEMAINLISTCTRL) self.MainListCtrl.Bind(wx.EVT_SET_FOCUS, self.OnMainListCtrlSetFocus) self.TunapieToolBar = wx.ToolBar(id=wxID_TUNAPIEFRAMETUNAPIETOOLBAR, name=u'TunapieToolBar', parent=self, pos=wx.Point(0, 27), size=wx.Size(365, 35), style=wx.TB_DOCKABLE | wx.TB_HORIZONTAL | wx.NO_BORDER) self.SetToolBar(self.TunapieToolBar) self.GenreBox = wx.ListCtrl(id=wxID_TUNAPIEFRAMEGENREBOX, name=u'GenreBox', parent=self.favesplitter, pos=wx.Point(56, 32), size=wx.Size(200, 100), style=wx.LC_NO_HEADER | wx.LC_SINGLE_SEL | wx.LC_REPORT) self.GenreBox.SetThemeEnabled(True) self.GenreBox.SetMinSize(wx.Size(0, 0)) self._init_coll_GenreBox_Columns(self.GenreBox) self.GenreBox.Bind(wx.EVT_SET_FOCUS, self.OnGenreBoxSetFocus) self.GenreBox.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnGenreBoxListItemSelected, id=wxID_TUNAPIEFRAMEGENREBOX) self._init_coll_TunapieToolBar_Tools(self.TunapieToolBar) def __init__(self, parent): self._init_ctrls(parent) #Note: remember to check splitter size=816x448 #self.SetClientSize(wx.Size(200, 200)) self.home=os.environ.get('HOME') self.mainsplitter.SplitVertically(self.MainListCtrl,self.favesplitter) self.favesplitter.SplitHorizontally(self.FaveListCtrl,self.GenreBox) try: geomfile=open(self.home+'/.tunapie/geom','r') geometry=geomfile.read().split('\n') size=geometry[0].split(' ') try: self.SetSize(wx.Size(int(size[0]),int(size[1]))) pos=geometry[1].split(' ') self.SetPosition(wx.Point(int(pos[0]),int(pos[1]))) self.mainsplitter.SetSashPosition(int(geometry[2])) self.favesplitter.SetSashPosition(int(geometry[3])) maincolumnwidths=geometry[4].split(' ') for i in range(6): self.MainListCtrl.SetColumnWidth(i,int(maincolumnwidths[i])) favecolumnwidths=geometry[5].split(' ') for i in range(6): self.FaveListCtrl.SetColumnWidth(i,int(favecolumnwidths[i])) except ValueError: pass except IOError: pass self.radioselected=1 #radioselected? Needed?? self.radiobutton=wxID_TUNAPIEFRAMETUNAPIETOOLBARRADIO self.tvbutton=wxID_TUNAPIEFRAMETUNAPIETOOLBARTV self.running=0 # pid of external player self.reloading=0 # set when contacting server (has to be set now or # get error on first startup due to OnGenreBoxListItemSelected # being called before files exist. self.downloading=0 #set when downloading from server self.startup=1 self.downloadedshoutcast=0 self.lastmod=-1 # tv or radio last modality when browsing favs? self.reverse=0 self.fcol="name" self.mcol="name" self.nstreamname,self.ngenre,self.nbitrate,self.nlisteners,self.nmod,self.nnowplaying=\ 0,1,2,3,4,5 self.adult=tuner.adultset() self.rdir=self.home+'/.tunapie/streamripper' self.shoutice=0 #0 is icecast server 1 is shoutcast self.maxd=100 self.newsize=8 self.setgenreboxradio() #note: when change tv -> radio, change genres try: os.mkdir(self.home+'/.tunapie') except OSError: pass try: self.favname,self.favurl,self.favgen,self.favplay,\ self.favbit,self.favlist,self.favmod=\ tuner.decode(self.home+'/.tunapie/favorites',1,1,1) except IOError: self.favname,self.favurl,self.favmod,self.favlist,self.favplay,\ self.favbit,self.favgen=[],[],[],[],[],[],[] self.favname,self.favlist, self.favgen, self.favbit, self.favurl, \ self.favplay, self.favmod=self.sort("name",self.favname,self.favlist,\ self.favgen, self.favbit, self.favurl, self.favplay,0, self.favmod) self.addtolistctrl(self.FaveListCtrl, self.favname,self.favgen,self.favbit,self.favlist,self.favplay,self.favmod) self.mediaplayer,self.videoplayer,self.term,self.ripper,self.rdir,\ self.shoutice,self.maxd,self.newsize,self.browser=tuner.readprefs\ (self.home, self.rdir,self.shoutice,self.maxd,self.newsize) missing_players=[] if self.mediaplayer=="": if commands.getoutput("which audacious").find("audacious")>-1: self.mediaplayer='audacious' elif commands.getoutput("which xmms").find("xmms")>-1: self.mediaplayer='xmms' elif commands.getoutput("which beep-media-player").find("beep")>-1: self.mediaplayer='beep-media-player' else: print("No audioplayer found.\n") missing_players.append("No audioplayer found.") if self.videoplayer=='': if commands.getoutput("which vlc").find("vlc")>-1: self.videoplayer='vlc' elif commands.getoutput("which gxine").find("gxine")>-1: self.videoplayer='gxine' elif commands.getoutput("which totem").find("totem")>-1: self.videoplayer='totem' elif commands.getoutput("which mplayer").find("mplayer")>-1: self.videoplayer='mplayer' elif commands.getoutput("which xine").find("xine")>-1: self.videoplayer='xine' elif commands.getoutput("totem").find("totem")>-1: self.mediaplayer='totem' elif commands.getoutput("amarok").find("amarok")>-1: self.mediaplayer='amarok' else: print("No videoplayer found\n") missing_players.append("No videoplayer found.") if self.term=="": if commands.getoutput("which xterm").find("xterm")>-1: self.term='xterm' elif commands.getoutput("which aterm").find("aterm")>-1: self.term='aterm' elif commands.getoutput("which Eterm").find("Eterm")>-1: self.term='Eterm' elif commands.getoutput("which rxvt").find("rxvt")>-1: self.term='rxvt' elif commands.getoutput("which x-terminal-emulator").find("x-terminal-emulator")>-1: self.term='x-terminal-emulator' else: print("No xterm found\n") missing_players.append("No xterm found.") if self.ripper=="": if commands.getoutput("which streamripper").find("streamripper")>-1: self.ripper='streamripper -t -u winamp2 -o never' else: print("Streamripper not installed. Recording will not work\n") missing_players.append("Streamripper not found. Recording will not work.") if self.browser=="": if commands.getoutput("which firefox").find("firefox")>-1: self.browser='firefox' if commands.getoutput("which iceweasel").find("iceweasel")>-1: self.browser='iceweasel' elif commands.getoutput("which mozilla").find("mozilla")>-1: self.browser='mozilla' elif commands.getoutput("which iceape").find("iceape")>-1: self.browser='iceape' elif commands.getoutput("which konqueror").find("konqueror")>-1: self.browser='konqueror' elif commands.getoutput("which x-www-browser").find("x-www-browser")>-1: self.browser='x-www-browser' else: print("Web browser not found.\n") missing_players.append("Web browser not found.") tuner.writeprefs(self.home,self.mediaplayer,self.videoplayer,self.term,\ self.ripper,self.rdir,self.shoutice,self.maxd,self.newsize,\ self.browser) self.setfontsize() if missing_players: missing_players.append("Please edit preferences manually.") #self.OnTunapieToolBarInfoTool(1,missing_players) print missing_players socket.setdefaulttimeout(20) wx.CallAfter(self.download) def setfontsize(self): size=int(self.newsize) self.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.FaveListCtrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.MainListCtrl.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.GenreBox.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.TunapieToolBar.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) self.TunapieStatus.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False,u'Sans')) def download(self): #called by at automatic download points #only calls reload (which does the real downloading) #if has not already been done this session #self.radioselected=1 self.startup=0 if int(self.shoutice): if not(self.downloadedshoutcast): self.downloadedshoutcast=1 self.reloading=1 thread.start_new_thread(self.reload,(3,)) self.checkfilesize() else: try: #updates pane if icecast has been downloaded recently if time.time()-os.stat(self.home+'/.tunapie/icecast')[8]<86400: self.parsefiles() self.updatemain() self.MainListCtrl.Select(0) self.MainListCtrl.SetFocus() return except OSError: pass self.reloading=1 thread.start_new_thread(self.reload,(5,)) self.checkfilesize() #self.OnRadioradioRadiobutton(1) #??other stuff that this command does.. def reporthook(self,b,c,d): if (b): self.downloading=1 def reload(self,type,searchquery=""): #type: reload 1=radio 2=tv 3=both 4=search 5=icecast if(type==1)|(type==3): try: radiofile=urllib.urlretrieve('http://www.shoutcast.com/sbin/newxml.phtml?genre=Top500',self.home+'/.tunapie/radiolist',self.reporthook) except IOError: self.downloading=2 return except AttributeError: self.downloading=2 return if(type==2)|(type==3): try: tvfile=urllib.urlretrieve('http://www.shoutcast.com/sbin/newtvlister.phtml?alltv=1',self.home+'/.tunapie/tvlist',self.reporthook) except IOError: self.downloading=2 return except AttributeError: self.downloading=2 return if(type==4): #search try: searchfile=urllib.urlretrieve('http://www.shoutcast.com/sbin/newxml.phtml?search='+searchquery.replace(" ","%20"),self.home+'/.tunapie/search',self.reporthook) except IOError: self.downloading=2 return except AttributeError: self.downloading=2 return if(type==5): #icecast try: icfile=urllib.urlretrieve('http://dir.xiph.org/yp.xml',self.home+'/.tunapie/icecast',self.reporthook) except IOError: self.downloading=2 return except AttributeError: self.downloading=2 return self.downloading=3 #self.addtolistctrl(self.MainListCtrl, self.name,self.genre,self.bitrate,self.listeners,self.playing) self.reloading=0 return def updatefavs(self): #need to call this after new update to db. #not same as updatemain. This one just updates the #url associated with a particular stream currentmod=self.TunapieToolBar.GetToolState(self.radiobutton) #print currentmod i=0 while 1: #loads either tv or radio listings ret=self.parsefiles() if ret==-1: return j=-1 for name in self.favname: j+=1 namenew,genrenew,playingnew,listenersnew,bitratenew,urlnew=\ self.find(name.lower()) k=-1 for newname in namenew: k+=1 if (name==newname): if (self.favbit[j]==bitratenew[k]): self.favurl[j]=urlnew[k] self.favplay[j]=playingnew[k] self.favlist[j]=listenersnew[k] break if i==0: #runs through one set of listings first, then does the other (tv or radio) currentmod=not(currentmod) i=1 continue return def parsefiles(self): if not(int(self.shoutice)): filename='/.tunapie/icecast' try: self.url,self.name,self.genre,self.playing,self.bitrate,\ self.listeners=tuner.decodeice(self.home+filename,self.radioselected) except IOError: return -1 return 0 if(self.radioselected==True): filename='/.tunapie/radiolist' else: filename='/.tunapie/tvlist' try: self.url,self.name,self.genre,self.playing,self.bitrate,\ self.listeners=tuner.decode(self.home+filename,self.radioselected,self.adult) except IOError: return -1 return 0 def updatemain(self, selection="", sortby="listeners"): self.name,self.genre,self.playing,self.listeners,\ self.bitrate,self.url=self.find(selection) self.sort(sortby,self.name,self.listeners,\ self.genre,self.bitrate,self.url,self.playing) self.addtolistctrl(self.MainListCtrl, self.name, self.genre,\ self.bitrate, self.listeners, self.playing) #self.MainListCtrl.SetFocus() #self.MainListCtrl.Select(0) def contacterror(self): self.SetStatusText('Error: cannot contact server') print 'Error: cannot contact server.' wx.Yield() time.sleep(2) self.SetStatusText('') def setgenreboxradio(self): self.GenreBox.DeleteAllItems() self.GenreBox.InsertStringItem(0,"Top Radio Streams") self.GenreBox.InsertStringItem(1,"Alternative") self.GenreBox.InsertStringItem(2,"Ambient") self.GenreBox.InsertStringItem(3,"Blues") self.GenreBox.InsertStringItem(4,"Classical") self.GenreBox.InsertStringItem(5,"Country") self.GenreBox.InsertStringItem(6,"Electronic") self.GenreBox.InsertStringItem(7,"Hip Hop") self.GenreBox.InsertStringItem(8,"Jazz") self.GenreBox.InsertStringItem(9,"Rock") self.GenreBox.InsertStringItem(10,"Rap") self.GenreBox.InsertStringItem(11,"Soul") self.GenreBox.InsertStringItem(12,"Spiritual") self.GenreBox.InsertStringItem(13,"Spoken") self.GenreBox.InsertStringItem(14,"World") self.GenreBox.Select(0) self.GenreBox.EnsureVisible(0) def setgenreboxtv(self): self.GenreBox.DeleteAllItems() i=0 self.GenreBox.InsertStringItem(i,"Top TV Streams") if self.adult: i+=1 self.GenreBox.InsertStringItem(i,"Adult") i+=1 self.GenreBox.InsertStringItem(i,"Anime") i+=1 self.GenreBox.InsertStringItem(i,"Cartoon") i+=1 self.GenreBox.InsertStringItem(i,"Dance") i+=1 self.GenreBox.InsertStringItem(i,"Movie") i+=1 self.GenreBox.InsertStringItem(i,"Music") i+=1 self.GenreBox.InsertStringItem(i,"Oldies") i+=1 self.GenreBox.InsertStringItem(i,"Pop") if self.adult: i+=1 self.GenreBox.InsertStringItem(i,"Porn") i+=1 self.GenreBox.InsertStringItem(i,"Rock") i+=1 self.GenreBox.InsertStringItem(i,"Sci Fi") i+=1 self.GenreBox.InsertStringItem(i,"SWC") i+=1 self.GenreBox.InsertStringItem(i,"Trance") i+=1 self.GenreBox.InsertStringItem(i,"TV") i+=1 self.GenreBox.InsertStringItem(i,"Video") if self.adult: i+=1 self.GenreBox.InsertStringItem(i,"XXX") self.GenreBox.Select(0) self.GenreBox.EnsureVisible(0) def find(self, selection='', namesearch=1): namenew,genrenew,playingnew,listenersnew,bitratenew,urlnew=\ [],[],[],[],[],[] i=-1 if selection=="top radio streams" or selection=="top tv streams": selection="" if(selection): for item in self.genre: i+=1 genre=item.lower() if(genre.find(selection)>-1): namenew.append(self.name[i]) genrenew.append(self.genre[i]) playingnew.append(self.playing[i]) listenersnew.append(self.listeners[i]) bitratenew.append(self.bitrate[i]) urlnew.append(self.url[i]) continue if namesearch==1: try: uppername=self.name[i] except IndexError: pass #Not downloaded the listing properly! continue name=uppername.lower() try: if(name.find(selection)>-1): namenew.append(self.name[i]) genrenew.append(self.genre[i]) playingnew.append(self.playing[i]) listenersnew.append(self.listeners[i]) bitratenew.append(self.bitrate[i]) urlnew.append(self.url[i]) continue except UnicodeDecodeError: pass try: #not sure this is really necessary!! upperplaying=self.playing[i] except IndexError: continue lowerplaying=upperplaying.lower() try: if(lowerplaying.find(selection)>-1): namenew.append(self.name[i]) genrenew.append(self.genre[i]) playingnew.append(self.playing[i]) listenersnew.append(self.listeners[i]) bitratenew.append(self.bitrate[i]) urlnew.append(self.url[i]) continue except UnicodeDecodeError: continue else: streamlist=int(self.maxd) try: if len(self.name)0): if(self.downloading==2): self.downloading=0 self.reloading=0 self.contacterror() return break print 'Downloading...' while 1: self.SetStatusText('Downloading...-') time.sleep(0.2) wx.Yield() self.SetStatusText('Downloading...\\') time.sleep(0.2) wx.Yield() self.SetStatusText('Downloading...|') time.sleep(0.2) wx.Yield() self.SetStatusText('Downloading.../') time.sleep(0.2) wx.Yield() if (self.downloading==3): self.SetStatusText('') self.downloading=0 while 1: time.sleep(0.2) wx.Yield() if (self.reloading==0): self.SetStatusText('') self.parsefiles() self.updatefavs() self.updatemain() self.MainListCtrl.Select(0) self.MainListCtrl.SetFocus() print 'Done.' return def OnMainListCtrlListColClick(self, event): if event.GetColumn()==-1: return if event.GetColumn()==self.nstreamname: if self.mcol=="name": self.reverse=not(self.reverse) self.mcol="name" if event.GetColumn()==self.nbitrate: if self.mcol=="bitrate": self.reverse=not(self.reverse) self.mcol="bitrate" if event.GetColumn()==self.nlisteners: if self.mcol=="listeners": self.reverse=not(self.reverse) self.mcol="listeners" if event.GetColumn()==self.ngenre: if self.mcol=="genre": self.reverse=not(self.reverse) self.mcol="genre" if event.GetColumn()==self.nnowplaying: if self.mcol=="playing": self.reverse=not(self.reverse) self.mcol="playing" self.name,self.listeners, self.genre, self.bitrate, self.url, \ self.playing, not_needed=self.sort(self.mcol,self.name,self.listeners,\ self.genre, self.bitrate, self.url, self.playing, self.reverse) self.addtolistctrl(self.MainListCtrl, self.name,self.genre,self.bitrate,self.listeners,self.playing) def OnTunapieToolBarRadioTool(self, event): if self.reloading==1: return self.setgenreboxradio() self.lastmod=1 self.radioselected=1 self.parsefiles() self.updatemain() self.MainListCtrl.Select(0) self.MainListCtrl.SetFocus() def OnTunapieToolBarTvTool(self, event): if self.reloading==1: return self.setgenreboxtv() self.lastmod=0 self.radioselected=0 self.parsefiles() self.updatemain() self.MainListCtrl.Select(0) self.MainListCtrl.SetFocus() #NOTE: The following can be seriously simplified now it uses threads.. #Need to look at this again when have the chance! def OnTunapieToolBarPlayTool(self, event): if self.reloading==1: return if(self.running): if (self.videoplayer.find("totem")<0 or self.radioselected): wasrunning=tuner.pkill(self.videoplayer[self.videoplayer.rfind("/")+1:self.videoplayer.find((' '),self.videoplayer.rfind("/")+1)]) if ((self.mediaplayer.find("xmms")<0 and self.mediaplayer.find("audacious")<0 and self.mediaplayer.find("beep-media-player")<0) or not(self.radioselected)): tuner.pkill(self.mediaplayer[self.mediaplayer.rfind("/")+1:self.mediaplayer.rfind("/")+16]) #if not(self.radioselected): # try: # if int(wasrunning): # return # except: # pass selection=self.MainListCtrl.GetFirstSelected() if selection==-1: selection=self.FaveListCtrl.GetFirstSelected() if selection==-1: return if not(self.favmod[selection]): tuner.pkill(self.mediaplayer[self.mediaplayer.rfind("/")+1:self.mediaplayer.rfind("/")+16]) self.lastmod=0 videoplayer=self.videoplayer if videoplayer.find("mplayer")>-1: if ((self.favgen[selection].lower().find('porn')>-1)|\ (self.favgen[selection].lower().find('swctv')>-1)): videoplayer+=' -demuxer 35' try: #self.running,output,outputfd=tuner.playvid(videoplayer,self.favurl[selection]) self.running=1 tuner.playvid(videoplayer,self.favurl[selection]) except IOError: self.contacterror() #try: # self.printout(output,outputfd) #except UnboundLocalError: # pass return else: self.lastmod=1 try: self.running=1 thread.start_new_thread(tuner.playselection, (self.mediaplayer,self.favurl[selection],0)) except IOError: self.contacterror() return if not(self.radioselected): videoplayer=self.videoplayer if videoplayer.find("mplayer")>-1: if ((self.genre[selection].lower().find('porn')>-1)|\ (self.genre[selection].lower().find('swctv')>-1)):\ videoplayer+=' -demuxer 35' try: self.running=1 #thread.start_new_thread(tuner.playvid,(videoplayer,self.url[selection])) tuner.playvid(videoplayer,self.url[selection]) except IOError: self.contacterror() #self.printout(output,outputfd) return if(self.radioselected): try: self.running=1 thread.start_new_thread(tuner.playselection,(self.mediaplayer,self.url[selection],0)) except IOError: #if try to play empty stream! self.contacterror() return #Maybe we can reuse this called from tuner.playselection. #as it is really just mplayer specific I am not too sorry to see it go. # def printout(self,pipe,pipefd): # if (self.videoplayer.find("mplayer")<0): # return # i=0 # output='' # print 'Contacting server' # self.SetStatusText('Contacting server') # while 1: # select.select([pipefd],[],[]) # outchunk=pipe.read() # output+=outchunk # if i>3: # output=output[len(outchunk):] # if outchunk=='': # try: # self.SetStatusText('') # return # except wx.PyDeadObjectError: # return # wx.Yield() # i+=1 # print (output) # if (output.find('Cache')>-1): # self.SetStatusText('Downloading') # if (output.find('playback')>-1): # self.SetStatusText('Playing') # if (output.find('full')>-1): # print 'Server full' # self.SetStatusText('Server full') # for wait in range(5): # time.sleep(0.2) # wx.Yield() # self.SetStatusText('') # return # if (output.find('Exiting... (End of file)')>-1): # print 'Error' # self.SetStatusText('Error') # for wait in range(5): # time.sleep(0.2) # wx.Yield() # self.SetStatusText('') # return def OnTunapieToolBarStopTool(self, event): tuner.pkill(self.videoplayer[self.videoplayer.rfind("/")+1:len(self.videoplayer)]) tuner.pkill(self.mediaplayer[self.mediaplayer.rfind("/")+1:self.mediaplayer.rfind("/")+16]) def OnTunapieToolBarRecTool(self, event): try: os.listdir(self.rdir) except OSError: try: os.makedirs(self.rdir) except OSError: print 'Cannot create rip directory!' self.SetStatusText('Cannot create rip directory!') for wait in range(5): time.sleep(0.2) wx.Yield() self.SetStatusText('') return selection=self.MainListCtrl.GetFirstSelected() if selection==-1: selection=self.FaveListCtrl.GetFirstSelected() if selection==-1: return recordoptions=[self.term,self.ripper,self.favurl[selection],self.rdir] else: recordoptions=[self.term,self.ripper,self.url[selection],self.rdir] dlg=RecordTime.RecordStream(self) dlg.setfontsize(self.newsize) dlg.setoptions(recordoptions) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() def OnFaveListCtrlLeftDclick(self, event): self.OnTunapieToolBarPlayTool(1) def OnMainListCtrlLeftDclick(self, event): self.OnTunapieToolBarPlayTool(1) def OnTunapieToolBarAddfaveTool(self, event): selection=self.MainListCtrl.GetFirstSelected() if (selection<0): return i=-1 for name in self.favname: i+=1 if (name==self.name[selection]): if (self.favbit[i]==self.bitrate[selection]): if (self.favurl[i]==self.url[selection]): print "Duplicate entry" self.SetStatusText('Duplicate entry!') for wait in range(5): time.sleep(0.2) wx.Yield() self.SetStatusText('') return self.favname.append(self.name[selection]) self.favurl.append(self.url[selection]) self.favmod.append(int(self.radioselected)) self.favplay.append(self.playing[selection]) self.favbit.append(self.bitrate[selection]) self.favgen.append(self.genre[selection]) self.favlist.append(self.listeners[selection]) self.favname,self.favlist, self.favgen, self.favbit, self.favurl, \ self.favplay, self.favmod=self.sort(self.fcol,self.favname,self.favlist,\ self.favgen, self.favbit, self.favurl, self.favplay, self.reverse, self.favmod) self.addtolistctrl(self.FaveListCtrl, self.favname,self.favgen,self.favbit,self.favlist,self.favplay,self.favmod) i=-1 for name in self.favname: i+=1 if (name==self.name[selection]): if (self.favbit[i]==self.bitrate[selection]): if (self.favurl[i]==self.url[selection]): newitem=i self.FaveListCtrl.Select(newitem) self.FaveListCtrl.SetFocus() self.FaveListCtrl.EnsureVisible(newitem) self.MainListCtrl.Select(self.MainListCtrl.GetFirstSelected(),False) tuner.savefavorites(self.home,self.favname,self.favurl,self.favlist,\ self.favplay,self.favbit,self.favgen,self.favmod) def OnTunapieToolBarRemfaveTool(self, event): selection=self.FaveListCtrl.GetFirstSelected() if selection<0: return newurl,newname,newmod,newlist,newplay,newbit,newgen=[],[],[],[],[],[],[] for i in range(len(self.favname)): if i!=selection: newurl.append(self.favurl[i]) newname.append(self.favname[i]) newmod.append(self.favmod[i]) newlist.append(self.favlist[i]) newplay.append(self.favplay[i]) newbit.append(self.favbit[i]) newgen.append(self.favgen[i]) self.favname,self.favurl,self.favmod,self.favlist,self.favplay,\ self.favbit,self.favgen=newname,newurl,newmod,newlist,newplay\ ,newbit,newgen self.favname,self.favlist, self.favgen, self.favbit, self.favurl, \ self.favplay, self.favmod=self.sort(self.fcol,self.favname,self.favlist,\ self.favgen, self.favbit, self.favurl, self.favplay, self.reverse, self.favmod) self.addtolistctrl(self.FaveListCtrl, self.favname,self.favgen,self.favbit,self.favlist,self.favplay, self.favmod) tuner.savefavorites(self.home,self.favname,self.favurl,self.favlist,\ self.favplay,self.favbit,self.favgen,self.favmod) self.FaveListCtrl.Select(0) #self.FaveListCtrl.SetFocus() def OnMainListCtrlListItemRightClick(self, event): if self.reloading==1: return self.PopupMenu(self.maincontext) def OnMaincontextPlayMenu(self, event): self.OnTunapieToolBarPlayTool(1) def OnMaincontextAddfaveMenu(self, event): self.OnTunapieToolBarAddfaveTool(1) def OnFavecontextPlayMenu(self, event): self.OnTunapieToolBarPlayTool(1) def OnFavecontextRemoveMenu(self, event): self.OnTunapieToolBarRemfaveTool(1) def OnFaveListCtrlListItemRightClick(self, event): if self.reloading==1: return self.PopupMenu(self.favecontext) def OnTunapieFrameKeyUp(self, event): try: key=event.GetUnicodeKey() except: key=event.GetKeyCode() #print key if key==318: self.FaveListCtrl.SetFocus() if key==316: self.MainListCtrl.SetFocus() if key==13: self.OnTunapieToolBarPlayTool(1) if key==82: self.OnTunapieToolBarRadioTool(1) if key==84: self.OnTunapieToolBarTvTool(1) if key==47: self.OnTunapieToolBarFindTool(1) if key==73: self.OnTunapieToolBarInfoTool(1) def OnFavecontextRecordMenu(self, event): self.OnTunapieToolBarRecTool(1) def OnMaincontextRecordMenu(self, event): self.OnTunapieToolBarRecTool(1) def OnTunapieToolBarFindTool(self, event): if self.reloading==1: return dlg=TunaSearch.Search(self) dlg.setfontsize(int(self.newsize)) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() if searchname: self.onlinesearch() def onlinesearch(self): selection=searchname.lower() selection=tuner.fixunicode(selection) #new server-based search for shoutcast radio if (self.radioselected): if(int(self.shoutice)): if (len(selection)<3 or selection=="the"): return self.reloading=1 self.downloading=0 thread.start_new_thread(self.reload,(4,selection)) self.checkfilesize() self.url,self.name,self.genre,self.playing,self.bitrate,\ self.listeners=tuner.decode(self.home+'/.tunapie/search',1,0) self.updatemain() return #old style search for shoutcast tv self.parsefiles() self.updatemain(selection) def OnTunapieToolBarInfoTool(self, event, info=""): if self.reloading==1: return dlg=TunerInfoDialog.StreamInfo(self) dlg.setfontsize(self.newsize) if not(info): selection=self.MainListCtrl.GetFirstSelected() fav=0 if (selection==-1): selection=self.FaveListCtrl.GetFirstSelected() if (selection==-1): return fav=1 #self.reloading=1 # thread.start_new_thread(self.reload,(3,)) # self.checkfilesize() if info: dlg.FillInfo(info, self.browser) elif (fav==1): try:dlg.FillInfo(tuner.playselection(self.mediaplayer,self.favurl[selection],1)\ ,self.browser) except IOError: pass else: try: dlg.FillInfo(tuner.playselection(self.mediaplayer,self.url[selection],1)\ ,self.browser) except IOError: pass #dlg.setvars(self.mediaplayer,self.videoplayer\ # ,self.term,self.ripper,self.home,self.maxdl) try: if info: dlg.SetTitle("Warning") dlg.infobuttonhide() if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() #self.SetStatusText('Ready') def OnFilemenuPreferencesMenu(self, event): if self.reloading==1: return dlg=TunerPrefs.preferences(self) dlg.setfontsize(self.newsize) dlg.setvars(self.mediaplayer,self.videoplayer\ ,self.term,self.ripper,self.home,self.rdir,self.shoutice,self.maxd,\ self.newsize,self.browser) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() self.mediaplayer,self.videoplayer,self.term,self.ripper,self.rdir,\ self.shoutice,self.maxd,self.newsize,self.browser=tuner.readprefs\ (self.home,self.rdir,self.shoutice,self.maxd,self.newsize) self.setfontsize() self.download() self.OnTunapieToolBarRadioTool(1) def OnFilemenuRecordqueueMenu(self, event): if self.reloading==1: return dlg=RecordQueue.recqueue(self) dlg.setfontsize(self.newsize) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() def OnFilemenuReloadMenu(self, event): if self.reloading==1: return #if self.running: # tuner.pkill(self.videoplayer[self.videoplayer.rfind("/")+1:len(self.videoplayer)]) # tuner.pkill(self.mediaplayer[self.mediaplayer.rfind("/")+1:self.mediaplayer.rfind("/")+16]) self.reloading=1 self.downloading=0 self.setgenreboxradio() self.radioselected=1 if (int(self.shoutice)==1): thread.start_new_thread(self.reload,(3,)) else: thread.start_new_thread(self.reload,(5,)) self.checkfilesize() event.Skip() #get top 100: #self.find('') def OnFilemenuQuitMenu(self, event): self.OnTunapieFrameClose(1) def OnFavecontextInfoMenu(self, event): self.OnTunapieToolBarInfoTool(1) def OnFavecontextURLMenu(self, event): if self.reloading==1: return dlg=AddStream.AddURL(self) dlg.setfontsize(self.newsize) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() def OnMaincontextInfoMenu(self, event): self.OnTunapieToolBarInfoTool(1) def OnFaveListCtrlSetFocus(self, event): #if self.FaveListCtrl.GetFirstSelected()<0: self.MainListCtrl.Select(self.MainListCtrl.GetFirstSelected(),False) #self.FaveListCtrl.Select(0) #self.FaveListCtrl.EnsureVisible(0) event.Skip() def OnMainListCtrlSetFocus(self, event): #if self.MainListCtrl.GetFirstSelected()<0: self.FaveListCtrl.Select(self.FaveListCtrl.GetFirstSelected(),False) #self.MainListCtrl.Select(0) #self.MainListCtrl.EnsureVisible(0) event.Skip() def OnGenreBoxSetFocus(self, event): self.FaveListCtrl.Select(self.FaveListCtrl.GetFirstSelected(),False) self.MainListCtrl.Select(self.MainListCtrl.GetFirstSelected(),False) event.Skip() def OnTunapieFrameClose(self, event): try: os.remove('/tmp/'+getpass.getuser()+'_tunapie_temp.pls') except OSError: pass geomfile=open(self.home+'/.tunapie/geom','w') size=self.GetSize() geomfile.write(str(size[0])+' '+str(size[1])+'\n') pos=self.GetPosition() geomfile.write(str(pos[0])+' '+str(pos[1])+'\n') geomfile.write(str(self.mainsplitter.GetSashPosition())+'\n') geomfile.write(str(self.favesplitter.GetSashPosition())+'\n') for i in range(5): geomfile.write(str(self.MainListCtrl.GetColumnWidth(i))+' ') geomfile.write(str(self.MainListCtrl.GetColumnWidth(5))+'\n') for i in range(5): geomfile.write(str(self.FaveListCtrl.GetColumnWidth(i))+' ') geomfile.write(str(self.FaveListCtrl.GetColumnWidth(5))+'\n') self.Destroy() def OnHelpmenuAboutMenu(self, event): if self.reloading==1: return dlg=AboutTuner.About(self) dlg.setfontsize(self.newsize) try: if dlg.ShowModal()==1: seq.reset() self.retrievedata() finally: dlg.Destroy() def OnGenreBoxListItemSelected(self, event): if self.reloading==1 or self.startup==1: return self.parsefiles() try: self.updatemain(event.GetLabel().lower()) except AttributeError: pass event.Skip() tunapie-2.1.19/src/compile0000644000175000017500000000001711171214563014372 0ustar jamesjamesimport Tunapie tunapie-2.1.19/src/TunerInfoDialog.py0000644000175000017500000001022611171216607016426 0ustar jamesjames#Boa:Dialog:StreamInfo #TunaPie (c)2005-2008 James Stone. Released under the GNU GPL. # #This program is free software; you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by #the Free Software Foundation; either version 2 of the License, or #(at your option) any later version. # #This program is distributed in the hope that it will be useful, #but WITHOUT ANY WARRANTY; without even the implied warranty of #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #GNU General Public License for more details. # #You should have received a copy of the GNU General Public License #along with this program; if not, write to the Free Software #Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # #Written using Boa-Constructor. #http://boa-constructor.sourceforge.net/ # #Version 0.1.2 02/05/07 import wx import wx.lib.stattext import tuner def create(parent): return StreamInfo(parent) [wxID_STREAMINFO, wxID_STREAMINFOINFOBOX, wxID_STREAMINFOINFOBUTTON, wxID_STREAMINFOOKBUTTON, wxID_STREAMINFOURLLABEL, ] = [wx.NewId() for _init_ctrls in range(5)] class StreamInfo(wx.Dialog): def _init_ctrls(self, prnt): # generated method, don't edit wx.Dialog.__init__(self, id=wxID_STREAMINFO, name=u'StreamInfo', parent=prnt, pos=wx.Point(295, 232), size=wx.Size(438, 259), style=wx.DEFAULT_DIALOG_STYLE, title=u'Stream Info') self.SetClientSize(wx.Size(438, 259)) self.SetThemeEnabled(True) self.SetBackgroundStyle(wx.BG_STYLE_SYSTEM) self.urllabel = wx.lib.stattext.GenStaticText(ID=wxID_STREAMINFOURLLABEL, label=u'Info:', name=u'urllabel', parent=self, pos=wx.Point(16, 16), size=wx.Size(21, 17), style=0) self.urllabel.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.urllabel.SetThemeEnabled(True) self.okbutton = wx.Button(id=wxID_STREAMINFOOKBUTTON, label=u'OK', name=u'okbutton', parent=self, pos=wx.Point(280, 216), size=wx.Size(85, 30), style=0) self.okbutton.SetFont(wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Helvetica')) self.okbutton.SetThemeEnabled(True) self.okbutton.Bind(wx.EVT_BUTTON, self.OnOkbuttonButton, id=wxID_STREAMINFOOKBUTTON) self.infobox = wx.ListBox(choices=[], id=wxID_STREAMINFOINFOBOX, name=u'infobox', parent=self, pos=wx.Point(56, 16), size=wx.Size(352, 184), style=0) self.infobox.SetThemeEnabled(True) self.infobutton = wx.Button(id=wxID_STREAMINFOINFOBUTTON, label=u'Info', name=u'infobutton', parent=self, pos=wx.Point(100, 216), size=wx.Size(85, 30), style=0) self.infobutton.Show(True) self.infobutton.Bind(wx.EVT_BUTTON, self.OnInfobuttonButton, id=wxID_STREAMINFOINFOBUTTON) def __init__(self, parent): self._init_ctrls(parent) def setfontsize(self, newsize): size=int(newsize) self.urllabel.SetFont(wx.Font(size, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) self.okbutton.SetFont(wx.Font(size-1, wx.SWISS, wx.NORMAL, wx.NORMAL, False, u'Sans')) def OnOkbuttonButton(self, event): self.Close() def FillInfo (self, info, browser=""): okurl=0 self.browser=browser for item in info: itemstrip=item.rstrip('\n') self.infobox.Append(itemstrip) print(itemstrip) if itemstrip.find("File")==0: if not(okurl): url=itemstrip[itemstrip.find("=")+1:] beginurl=url.find("//")+3 endurl=url[beginurl:].find("/") if endurl==-1: okurl=1 self.url=url else: self.url=url[:beginurl+endurl] def infobuttonhide(self): self.infobutton.Hide() def OnInfobuttonButton(self, event): try: tuner.showpage(self.browser,self.url) except AttributeError: pass tunapie-2.1.19/uninstall.sh0000755000175000017500000000044111171214563014601 0ustar jamesjames#!/bin/sh rm /usr/local/bin/tunapie rm -rf /usr/local/share/tunapie rm /etc/tunapie.config rm src/*.pyc rm /usr/local/share/pixmaps/tplogo.xpm rmdir -p /usr/local/share/pixmaps rm /usr/local/man/man1/tunapie.1 rmdir -p /usr/local/man/man1/ rm /usr/local/share/applications/tunapie.desktop tunapie-2.1.19/install.sh0000755000175000017500000000071511171214563014242 0ustar jamesjames#!/bin/sh if [ "$1" = "--adult" ]; then echo '1'>/etc/tunapie.config else echo '0'>/etc/tunapie.config fi python src/compile cp tunapie /usr/local/bin rm -rf /usr/local/share/tunapie mkdir /usr/local/share/tunapie cp src/*.py src/*.pyc src/*.png /usr/local/share/tunapie mkdir -p /usr/local/share/pixmaps cp src/tplogo.xpm /usr/local/share/pixmaps/ mkdir -p /usr/local/man/man1 cp tunapie.1 /usr/local/man/man1 cp tunapie.desktop /usr/local/share/applications tunapie-2.1.19/README0000644000175000017500000000445112453576551013132 0ustar jamesjames################################################################## # Tunapie: A python-based internet radio and TV tuner for Linux # ################################################################## ------------------------------------------------------------------ Tunapie is distributed under the GNU General Public License (GPL). Please check out the file COPYING in this directory for more details. ------------------------------------------------------------------ IMPORTANT NOTE 8th January 2015 - I haven't made a new version of tunapie available for many years - since Shoutcast changed their policy, and disallowed access to their streams for open source software. It seems now that Shoutcast is really no more, but Icecast(XIPH) has really taken over. I am not planning to update Tunapie, but I am just releasing a new version that sets Icecast as the default so it will at least download a working directory when it first starts! James ------------------------------------------------------------------ INTRODUCTION Tunapie is a directory browser for internet radio and TV streams (shoutcast and icecast currently supported). Tunapie will allow you to search for streams and then launch your audio player (xmms) or nsv viewer (mplayer) of choice. INSTRUCTIONS Install tunapie (see INSTALL for details). Tunapie is now set to automatically update the top 1000 streams for radio and tv from the shoutcast server. Set up the default path to your media player and nsv player in file-preferences. Filter stations by genre (genre box) or search using the search box at the bottom of the window. Play current selection by double clicking the station name or by pressing the "play" button. Stop all current helper applications with the "stop" button. Add selection to favorites by pressing the "add" button. Play selection in favorites by pressing play or double clicking. Record selection by pressing record (on older versions of streamripper you will need to rename the files from .mp3 to .nsv to play them. Files are saved in ~/.tunapie/ Please note that some nsv streams do not seem to work properly with mplayer. Please report these as bugs to the mplayer list. Let me know how Tunapie works, and please submit feature requests and bugreports. Tunapie (c)2005-2015 James Stone jamesmstone@gmail.com tunapie-2.1.19/COPYING0000644000175000017500000004313111171214563013267 0ustar jamesjames GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. tunapie-2.1.19/tunapie.10000644000175000017500000000345311171214563013766 0ustar jamesjames.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH TUNAPIE 1 .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME tunapie \- browse, record and launch Shoutcast and Icecast video and radio streams .SH SYNOPSIS .B tunapie .SH DESCRIPTION .B Tunapie is a GUI based program for displaying Shoutcast or Icecast video and radio streams. It gives information about streams including bitrate, IP and current number of listeners. Streams can then be played using an appropriate media player, defined in preferences. Tunapie also allows recording streams to be recorded using streamripper. Recordings can be set to start and stop at specified times. .SH OPTIONS .B Tunapie does not have any command line options. .SH FILES ~/.tunapie/prefs \- preferences file .TP ~/.tunapie/radiolist \- downloaded list of radio streams from Shoutcast .TP ~/.tunapie/tvlist \- downloaded list of video streams from Shoutcast .TP ~/.tunapie/icecast \- downloaded list of radio and video streams from xiph.org .TP ~/.tunapie/streamripper/ \- default directory for recording streams .TP /etc/tunapie.config \- file contains 1 if adult setting has been selected .SH SEE ALSO .B streamripper(1) .SH AUTHOR .B Tunapie was written by James Stone and released under the GNU general public license. tunapie-2.1.19/CHANGELOG0000644000175000017500000003045512453575661013470 0ustar jamesjames2.6.19 Make Icecast the default (Shoutcast doesn't work any more - nor does TV!) 2.6.18 Fix recording problem with Icecast. Add totem and amarok as optional players. 2.1.17 Improve GUI responsiveness when playing radio stations 2.1.16 Fix security issue with use of os.system, commands and non-secure tempfiles 2.1.15 Fix minimal wx version back to 2.6 2.1.14 Fix errors with wxGTK 2.8. Fix startup error if Geom file corrupted. 2.1.13 play icecast stations correctly 2.1.12 Fix bug where radiolist is not always refreshed correctly. 2.1.11 Revert to deprecated code in prefs as new version not supported by wxpython 2.6! 2.1.10 Fix icecast directory. Fix deprecation warnings for wxpython 2.8 2.1.9 Fix problem with GUI breakage when right clicking before download finished. Fix xcb_lock errors. 2.1.8 Fix to allow realplayer to play user-added streams. 2.1.7 Another record bug fixed (thanks Chris O'Halloran!) Added option to add user-defined streams. 2.1.6 Code cleanup Fix new record bug 2.1.5 Fix problem with mplayer lockup (again). 2.1.4 Fix error message if .tunapie directory has not been created. 2.1.3 Remove unnecessary import for deprecated wxPython package. Fix to prevent mplayer lockups 2.1.2 Fix for play bug if Totem set as video player (thanks Chris O'Halloran!) 2.1.1 Improvements to run on OS X. Default resolution changed to fit eeePC. Startup checking improved (thanks to Fabian Greffrath) 2.1 Updated desktop file 2.0rc10 Fix problem with record not working on gnome-terminal 2.0rc9 Compatibility with wxpython 2.8 (not tested) 2.0rc8 Window position and size now stored between sessions. Sash positions stored between sessions. Column widths stored between sessions. Fixed problem with icecast listings not downloading if file already present. 2.0rc7 Fixed error in statusbar preventing tunapie starting on some systems. Added print out to console for status Fixed "no attribute 'name'" error on first startup. Changed default player to vlc because of problems with libxine playing nsv streams. 2.0rc6 Fixed problem with selecting correct items when favorites or mainlist scrolled down. Icecast listing now works. Added import of select module to main program, so mplayer now works correctly. No longer have to press play twice to get videos to play!! 2.0rc5 Fixed toolbar. 2.0rc4 Fixed missing import of commands module. Switch to ListCtrl for genre list. Tweaks to general behaviour of lists etc. 2.0rc3 Fixed icon. 2.0rc2 Fixed bug with favorites not displaying correctly after removal of an item. 2.0rc1 Completely new GUI (sash-based). Added column for tv/radio in favorites and main window. New TV-specific genre list. Context menus. Keyboard input added. / to search, r for radio, t for tv, tab and arrow keys. 1.4.2 "Top Streams" added to genre selection Fixed problem with stop button not working under BSD. Fixed error messages if streams not contactable. 1.4.1 Fixed error message whem trying to view info about a non-existant stream. Fixed problem with finding apps at startup under BSD. 1.4 Added link to web-based shoutcast info on info page. Bugfixes: Not remembering preferences on first startup. Not reading preferences correctly if old preference file present. 1.3.3.3 Fixed incorrect formatting in man page. Fixed problem with audacious not playing new streams correctly. 1.3.3.2 Fixed problem with broken recordings in last release. Some code cleanup. 1.3.3.1 Better handling of missing helper apps: no longer warns user if player has been entered in preferences that tunapie does not recognise. 1.3.3 Increased timeout for Icecast to allow download of listing. Audacious now default audio player. Audacious will not be stopped when switching streams. Checks for different media players at first startup and gives warning if no suitable players are found. 1.3.2 Fixed path to icon finally! New icon added (thanks to everettattebury) 1.3.1.1 Fixed minor problem with install script complaining about missing *.jpg file 1.3.1 Fixed problem with search causing occasional lockups. Fixed lockup if non ASCII characters entered in search. 1.3 Fixed problem with streams not displaying correctly if xiph server list selected. Solved problem with icecast search if station names contained unicode characters. Times out properly if server is down. 1.2.3 Fixed new layout problem.. 1.2.2 Fixed problem with preferences not displaying Fixed problem with download not working properly if menu items selected during server contact. 1.2.1 Removed problem with Tunapie stopping currently running xmms instances. 1.2 Initial download now displays in status window. Icon now displays properly. 1.1.1 Improvements to layout. 1.1 Resize of main window now implemented. Changed code for enabling adult setting: now handled by config file /etc/tunapie.config 1.0.2 Added explicit mention of GPL version in file headers. 1.0.1 Removed unnecesarry executable flags in files to fit with Debian policy 1.0 Release V1.0: No changes since rc4 1.0rc4 Manual page added Fix to make stop button work with music players with long names (beep-media-player) 1.0rc3 GUI layout tweaked to allow 1 larger font size without clipping Improved stop button behaviour: now works every time! Also audio stream stopped when video started and vice versa. Xmms or totem are not killed if changing between streams of the same modality. Switched position of Save and Cancel button on Preferences for consistency. 1.0rc2 Fixed bug caused by upgrade of preferences file preventing tunapie from starting. 1.0rc1 Default videoplayuer changed to totem due to ongoing problems with some stream incompatibilities when using mplaye. Font size can now be altered in preferences! 0.9.9 If press play button while video player already running first press stops player, second press starts new player (avoids GUI lockup). Removed problem with favorites not deselecting when manually selecting radio or tv button (could lead to tunapie trying to load audio with video player and vice versa). Some code cleanup. Can now manually set number of streams to display in main window (50-500). 0.9.8 Fixed problem with parsing new version of tv listing from Shoutcast Fixed problem playing saltwater chimp streams with mplayer 0.9.7.6 Removed dependency on mxDateTime 0.9.7.5 More improvements to appearance. 0.9.7.4 Fix to make quit button work as expected. Removed "no streams available" comment if favorites file is empty. 0.9.7.3 Fixed startup problem if a previous version of tunapie has been run. Fixed info showing incorrect data when nothing selected. Fixed incorrect info display when switching between favorites and the main window with left and right arrow keys. Fixed problem with reload button not always working. 0.9.7.2 "No stations loaded" message if shoutcast server does not provide listing (ongoing server-side problems at the moment). 0.9.7.1 Buttons added to allow editing of order of favorites. 0.9.7 Left and right arrow keys switch between windows. Fixed intermittent failure of Icecast search. Improved implementation of server download and update. Browse buttons for choosing applications in preferences. Fixed program not starting up if adult stream list selected. Added hack to allow mplayer to play adult streams correctly. Removed unnecessary variable "downloadedicecast" Fixed problem with stream not playing if other urls (apart from streams) were in video playlist 0.9.6.1 Reimplement reload menu Fix problem with "now playing" not being saved correctly in favorites 0.9.6 Now compatible with Icecast listing: can select Icecast or Shoutcast from preferences. Sends all possible movie urls to video player video player can be stopped even if it has extra options specified on command line 0.9.5.2 Further minor bugfixes: recording now works, favorites are stored as correct modality (radio or TV). Video player is stopped correctly when starting audio player. 0.9.5.1 Fix to broken favorites saving in 0.9.5 0.9.5 Fix to allow tunapie to work with new Shoutcast directory system. Radio search function now contacts server to give wider variety of channels. Warning: will overwrite your old favorites file, so back it up (~/.tunapie/favorites). 0.9.4 Listbox selections can now be navigted with arrow keys, and return lanunches external player. 0.9.3 Fixed bug with double click on scrollbar launching external application 0.9.2 Further font fixes Removed reload feature 0.9.1 Tweaked font appearance Async fix number 2! 0.9.0 Recording timer now available, allowing the possibility of recording streams at a specific time in the future, even if tunapie is not running at the time (uses at queue). Search function now looks within "Now Playing" as well as genre and station name. 0.8.4 Streamripper arguments added in preferences are now passed as expected. Can specify directory to rip streams to in preferences. Multiple ess.tv streams can be added to favorites (despite name being the same). 0.8.3.1 Tunapie GUI now updates properly when using xine as mediaplayer (works with more nsv streams). 0.8.3 Fixed problem with Streamtuner not recording. Proper implementation of splashscreen. Fixed intermittent unexpected async error on startup 0.8.2 Splash screen added. Error messages fixed. 0.8.1 Get full URL info about streams with "info" button Identifies self as tunapie to shoutcast server. Info windows no longer greyed out Incorrect server full message when playing some streaming video channels fixed IndexError message fixed 0.8.0 Automatically updates outdated URLs in favorites when possible. Duplicate entries in favorites no longer allowed. Fixed bug where tunapie tried to play last played movie with audio player. Increased default max download size to 1000 since shoutcast server no longer allows larger downloads. 0.7.2 Output from mplayer now displayed in status window Fixed another bug with displaying TV/radio listings when selecting favorites. 0.7.1 Fix modality change problem if search after selecting a (radio) favorite. Select correct wxversion when more than one version installed. Only download list at startup if max downloads set to < 500 0.7.0 Upgrade to wxPython 2.6 Downloads top 500 radio and tv streams at startup (longer startup time) 0.6.3 Fix fontsizes TV selector button returns to correct setting after selecting favorites Only downloads new tv and radio listings the first time each modality is selected. Clears main window as soon as reload is triggered. 0.6.2.1 Bugfix to enable clean shutdown if files not played. 0.6.2 Now works with multiple users, and cleans up tempfiles properly. 0.6.1.1 Correct 0.6.1 release! 0.6.1 Fixed failure to launch mplayer on selecting video stream. 0.6.0 Return to wxPython 2.4 due to stability problems. Odd numbered minor releases will use wxPython 2.5, even numbered releases will use wxPython 2.4. All improvements from 0.5 branch have been backported. 0.5.2: Fixed wxPython 2.5 problem with program crashing on trying to load newly stored favorites. 0.5.1: Fixed download at startup problem. Added Stop button. Moved reload to File menu. Fixed bug if try to change modality during download. When select one menu, deselect another. 0.5: Upgrade to wxPython 2.5 Auto-load top 100 radio list on startup Fixed other over-aggressive killing tendencies! 0.4.6.1: Fixed over-aggressive killing of mplayer. 0.4.6: Adult content for TV listings can be enabled at install. Addition of maximum stations to download to preferences. Now lists automatically update (no need to press reload) unless maximum downloads set to a value greater than 500. Some cleanup of code 0.4.5: Fixed defunct processes 0.4.4: Fixed full download of directory listing. Error trapping if server not contactable. 0.4.3: Fixed extra bug with incomplete downloaded directory parsing. 0.4.2: Fixed lockup if downloaded directory listing is not complete. Now clears main listing window if radio button is pressed and no genre selected. 0.4.1: Enabled recording of nsv streams. Bugfix to radio/tv radiobutton indicator. Improvement in handling of external players. 0.3.3: A minor bug in the creation of the favorites file was fixed. 0.3.2: A fix for a TV listing bug. 0.3: This release improves handling of favorites, allowing access to full information on streams. 0.2: This release improves the search algorithm and playlist integration, and fixed minor bugs. 0.1: Initial release. tunapie-2.1.19/INSTALL0000644000175000017500000000206111171214563013262 0ustar jamesjames################################################################## # Tunapie: A python-based internet radio and TV tuner for Linux # ################################################################## ------------------------------------------------------------------ Tunapie is distributed under the GNU General Public License (GPL). Please check out the file COPYING in this directory for more details. ------------------------------------------------------------------ INSTALLATION: Tunapie depends upon: Python>=2.3 wxPython>=2.6 (may work with 2.5 but untested) Debian users, and Ubuntu (Feisty) users can install Tunapie with apt-get install tunapie To play audio streams you will need a compatible media player such as xmms. To play video streams, an nsv compatible player such as mplayer. To record streams, you will need streamripper. Install tunapie with: sudo sh install.sh or, for full non-censored tv listings, sudo sh install.sh --adult Uninstall with: sudo sh uninstall.sh Have fun! Tunapie (c)2005-2009 James Stone jamesmstone@gmail.com tunapie-2.1.19/tunapie.desktop0000644000175000017500000000026211171214563015272 0ustar jamesjames[Desktop Entry] Type=Application Name=Tunapie Comment=Lists audio and video streams from shoutcast and icecast Icon=tplogo.xpm TryExec=tunapie Exec=tunapie Categories=AudioVideo tunapie-2.1.19/tunapie0000755000175000017500000000006511171214563013626 0ustar jamesjames#!/bin/sh python /usr/local/share/tunapie/Tunapie.py