├── LICENSE ├── Python Media Player Version 0.0.1 ├── GUI.py ├── Icons │ ├── add_directory.gif │ ├── add_file.gif │ ├── background.gif │ ├── clear_play_list.gif │ ├── delete_selected.gif │ ├── exit.gif │ ├── fast_forward.gif │ ├── mute.gif │ ├── next_track.gif │ ├── pause.gif │ ├── play.gif │ ├── previous_track.gif │ ├── rewind.gif │ ├── stop.gif │ └── unmute.gif └── Tools │ ├── Configuration_base.py │ ├── Configuration_base.pyc │ ├── Controls.py │ ├── Controls.pyc │ ├── DisplayPanel.py │ ├── DisplayPanel.pyc │ ├── Gui.py │ ├── Gui.pyc │ ├── ListPanel.py │ ├── ListPanel.pyc │ ├── __pycache__ │ ├── Configuration_base.cpython-35.pyc │ ├── DisplayPanel.cpython-35.pyc │ ├── ListPanel.cpython-35.pyc │ └── player.cpython-35.pyc │ ├── avbin.dll │ ├── player.py │ └── player.pyc ├── README.md └── src ├── test.png └── test1.png /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/GUI.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | print (__author__) 32 | import os 33 | def main(): 34 | try: 35 | try: 36 | import Tkinter 37 | except: 38 | import tkinter 39 | import pyglet 40 | os.system("cd Tools && python Gui.py") 41 | except Exception as e: 42 | print(e) 43 | input("") 44 | if __name__=='__main__': 45 | main() 46 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/add_directory.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/add_directory.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/add_file.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/add_file.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/background.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/clear_play_list.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/clear_play_list.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/delete_selected.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/delete_selected.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/exit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/exit.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/fast_forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/fast_forward.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/mute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/mute.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/next_track.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/next_track.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/pause.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/pause.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/play.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/play.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/previous_track.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/previous_track.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/rewind.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/rewind.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/stop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/stop.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Icons/unmute.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Icons/unmute.gif -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Configuration_base.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | 32 | fname='000001_amplifier.mp3' # Example Music 33 | 34 | 35 | # Controls >> Volume Labels 36 | Volume_lowest_value=10 37 | Volume_highest_value=50 38 | 39 | 40 | # Display 41 | Digital_Clock_Font_Setting="DS-Digital 40" 42 | Songs_playing_Font_Setting="Verdana 13" 43 | duration_time_Font_Setting="arial 10" 44 | 45 | # list_panel 46 | list_box_width=40 47 | list_box_height=15 48 | list_box_song_list_font=('arial 10') 49 | 50 | # player 51 | jump_distance=30 52 | 53 | # main 54 | PROGRAM_NAME='Python Media Player' 55 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Configuration_base.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/Configuration_base.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Controls.py: -------------------------------------------------------------------------------- 1 | # This Program Is Created Only For Practise and Educational Purpose Only 2 | # This Program Is Created By S.S.B 3 | # This Program Is Completely Free And Open Source 4 | __author__=''' 5 | 6 | S.S.B 7 | surajsinghbisht054@gmail.com 8 | https://bitforestinfo.blogspot.com 9 | ''' 10 | # 11 | # 12 | ################################################## 13 | ######## Please Don't Remove Author Name ######### 14 | ############### Thanks ########################### 15 | ################################################## 16 | # 17 | # 18 | # Here Importing Modules 19 | from Configuration_base import * 20 | 21 | try: 22 | import Tkinter, ttk 23 | except: 24 | import tkinter as Tkinter 25 | import tkinter.ttk as ttk 26 | 27 | import player, ListPanel, DisplayPanel, os, threading, time 28 | 29 | class Controls: 30 | def __init__(self, root, playing, player, volume): 31 | self.playervolume=volume 32 | self.root=Tkinter.Frame(root) 33 | self.root.pack() 34 | self.status=Tkinter.IntVar() # For Song Status 35 | self.playing=playing 36 | self.player=player 37 | self.var=Tkinter.IntVar() # For Volume Bar 38 | self.var.set(1.0) 39 | self.songtime=Tkinter.IntVar() 40 | self.create_control_panel() 41 | #self.time_thread() 42 | #print self.player.playing 43 | 44 | def time_thread(self): 45 | threading.Thread(target=self.update_time_).start() 46 | return 47 | 48 | 49 | def update_time_(self): 50 | while True: 51 | time.sleep(2) 52 | if self.player.player.playing: 53 | pass 54 | else: 55 | try: 56 | print ('Playing Next Music') 57 | self.Next() 58 | pass 59 | except Exception as e: 60 | print ('Playing Next Music- Error',e) 61 | pass 62 | 63 | 64 | def create_control_panel(self): 65 | frame=Tkinter.LabelFrame(self.root) 66 | frame.pack(expand='yes',fill='x',side='top') 67 | add_fileicon=Tkinter.PhotoImage(file="../Icons/add_file.gif") 68 | add_directoryicon=Tkinter.PhotoImage(file="../Icons/add_directory.gif") 69 | exiticon=Tkinter.PhotoImage(file="../Icons/exit.gif") 70 | playicon=Tkinter.PhotoImage(file="../Icons/play.gif") 71 | pauseicon=Tkinter.PhotoImage(file="../Icons/pause.gif") 72 | stopicon=Tkinter.PhotoImage(file="../Icons/stop.gif") 73 | rewindicon=Tkinter.PhotoImage(file="../Icons/rewind.gif") 74 | fast_forwardicon=Tkinter.PhotoImage(file="../Icons/fast_forward.gif") 75 | previous_trackicon=Tkinter.PhotoImage(file="../Icons/previous_track.gif") 76 | next_trackicon=Tkinter.PhotoImage(file="../Icons/next_track.gif") 77 | self.muteicon=Tkinter.PhotoImage(file="../Icons/mute.gif") 78 | self.unmuteicon=Tkinter.PhotoImage(file="../Icons/unmute.gif") 79 | delete_selectedicon=Tkinter.PhotoImage(file="../Icons/delete_selected.gif") 80 | 81 | list_file=[ 82 | (playicon,'self.play'), 83 | (pauseicon,'self.pause'), 84 | (stopicon,'self.stop'), 85 | (previous_trackicon,'self.previous'), 86 | (rewindicon,'self.rewind'), 87 | (fast_forwardicon,'self.fast'), 88 | (next_trackicon,'self.Next'),] 89 | for i,j in list_file: 90 | storeobj=ttk.Button(frame, image=i,command=eval(j)) 91 | storeobj.pack(side='left') 92 | storeobj.image=i 93 | self.volume_label=Tkinter.Button(frame,image=self.unmuteicon) 94 | self.volume_label.image=self.unmuteicon 95 | 96 | volume=ttk.Scale(frame,from_=Volume_lowest_value, to=Volume_highest_value ,variable=self.var, command=self.update_volume) 97 | volume.pack(side='right', padx=10, ) 98 | self.volume_label.pack(side='right') 99 | return 100 | 101 | 102 | def update_volume(self, event=None): 103 | if Volume_lowest_value==self.var.get(): 104 | self.volume_label.config(state='active') 105 | self.volume_label.config(image=self.muteicon) 106 | self.playervolume.set(0.0) 107 | self.volume_label.config(state='disabled') 108 | else: 109 | self.volume_label.config(state='active') 110 | self.volume_label.config(image=self.unmuteicon) 111 | self.playervolume.set(self.volume_equalize()) 112 | self.volume_label.config(state='disabled') 113 | return 114 | 115 | def volume_equalize(self): 116 | if len(str(self.var.get()))==1: 117 | val='0.{}'.format(str(self.var.get())) 118 | elif len(str(self.var.get()))==2: 119 | val='{}.{}'.format(str(self.var.get())[0],str(self.var.get())[1]) 120 | else: 121 | val=self.var.get() 122 | return float(val) 123 | 124 | def mute(self): 125 | self.var.set(0) 126 | return self.update_volume() 127 | def unmute(self): 128 | self.var.set(11) 129 | return self.update_volume() 130 | def increase_volume(self): 131 | high=Volume_highest_value-5 132 | if self.var.get() < high: 133 | store=self.var.get()+5 134 | self.var.set(store) 135 | return self.update_volume() 136 | def decrease_volume(self): 137 | low=6 138 | if self.var.get() > low : 139 | store=self.var.get()-5 140 | self.var.set(store) 141 | return self.update_volume() 142 | 143 | def play(self): 144 | if self.status.get()==0: 145 | k=self.player.play_song() 146 | self.status.set(1) 147 | return k 148 | elif self.status.get()==1: 149 | k=self.player.play() 150 | self.status.set(0) 151 | return k 152 | else: 153 | print ('something wrong on controls.Controls.play') 154 | print ('or playing variable is empty') 155 | return 'Nothing' 156 | 157 | def pause(self): 158 | if self.status.get()==0 or self.status.get()==1: 159 | self.player.pause() 160 | return 161 | 162 | def stop(self): 163 | self.player.stop() 164 | return 165 | 166 | def previous(self): 167 | try: 168 | dirbase=os.path.dirname(self.playing.get()) 169 | dirt=os.listdir(dirbase) 170 | base=os.path.basename(self.playing.get()) 171 | k=dirt.index(base)-1 172 | path=os.path.join(dirbase, dirt[k]) 173 | print (path) 174 | self.playing.set(path) 175 | pass 176 | except: 177 | pass 178 | def fast(self): 179 | return self.player.fast_forward() 180 | 181 | def Next(self): 182 | try: 183 | dirbase=os.path.dirname(self.playing.get()) 184 | dirt=os.listdir(dirbase) 185 | base=os.path.basename(self.playing.get()) 186 | k=dirt.index(base)-1 187 | path=os.path.join(dirbase, dirt[k]) 188 | print (path) 189 | self.playing.set(path) 190 | pass 191 | except: 192 | pass 193 | def rewind(self): 194 | return self.player.rewind() 195 | 196 | class Main: 197 | def __init__(self, root=None): 198 | self.root=Tkinter.Frame(root) 199 | self.root.pack(side='top') 200 | 201 | self.path=Tkinter.StringVar() # For Song Path 202 | self.song_time=Tkinter.StringVar() # For Song Playing Time 203 | self.song_duration=Tkinter.StringVar() # For Song Duration 204 | self.volume=Tkinter.IntVar() # For Song Volume 205 | 206 | # ============= Creating Media Player ====================================================== 207 | mediaplayer=player.mediaplayer(self.path, self.song_time, self.song_duration, self.volume) 208 | 209 | # ============= Creating Display Panel ====================================================== 210 | DisplayPanel.Player(self.root, self.path, self.song_time, self.song_duration) 211 | 212 | # ============= Creating Control Panel ====================================================== 213 | lit2=Controls(self.root, self.path, mediaplayer, self.volume) 214 | self.hook2=lit2 215 | # ============= Here Connecting List Panel ====================================================== 216 | lit=ListPanel.main(self.root, self.path) 217 | self.hook=lit.hook 218 | 219 | 220 | if __name__=='__main__': 221 | root=Tkinter.Tk() 222 | Main(root) 223 | root.mainloop() 224 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Controls.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/Controls.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/DisplayPanel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | # ==================================================== 32 | # Usages: 33 | # Player(root, var1, var2, var3) 34 | # root=Frame or widget for place display 35 | # var1=String Variable For Song Path 36 | # var2=String Variable For Song Playing Time 37 | # var3=String Variable For Song Durations 38 | #===================================================== 39 | 40 | # Here Importing Module 41 | try: 42 | import Tkinter, ttk 43 | except: 44 | import tkinter as Tkinter 45 | import tkinter.ttk as ttk 46 | import os.path 47 | from Configuration_base import * 48 | 49 | # Creating Class 50 | class Player: 51 | def __init__(self, root, song, time, duration): 52 | self.root=Tkinter.Frame(root) 53 | self.root.pack(side='top') 54 | self.song=song 55 | self.time=time 56 | self.duration=duration 57 | self.create_console() 58 | self.auto_bind() 59 | 60 | def auto_bind(self): 61 | self.song.trace('w',self.update_song_title) 62 | self.time.trace('w',self.update_time) 63 | self.duration.trace('w', self.update_duration) 64 | return 65 | 66 | def create_console(self): 67 | self.back_time_label=Tkinter.PhotoImage(file="../Icons/background.gif") 68 | # consoleframe=Tkinter.LabelFrame(self.root, text='Display Panel', bg='aqua') 69 | # consoleframe.pack(side='top', expand='yes', fill='x') 70 | self.canvas=Tkinter.Canvas(self.root, width=400, height=100, bg='skyblue') 71 | self.canvas.pack() 72 | self.canvas.image=self.back_time_label 73 | self.canvas.create_image(0, 0, anchor="nw", image=self.back_time_label) 74 | self.time_display=self.canvas.create_text(10, 25, anchor="nw", fill='cornsilk', font=Digital_Clock_Font_Setting, text='0:00:00') 75 | self.song_display=self.canvas.create_text(220,40, anchor="nw", fill='cornsilk', font=Songs_playing_Font_Setting, text='Nothing For Playing') 76 | self.song_duration=self.canvas.create_text(220,65, anchor="nw", fill='cornsilk', font=duration_time_Font_Setting, text='[0:00:00]') 77 | return 78 | 79 | def song_title_filter(self, text): 80 | if len(os.path.basename(text))>22: 81 | name=os.path.basename(text)[0:20]+'...' 82 | pass 83 | else: 84 | name=os.path.basename(text) 85 | pass 86 | return name 87 | 88 | def update_duration(self, *args,**kwargs): 89 | raw_text=self.duration.get() 90 | text="[{}]".format(raw_text) 91 | self.canvas.itemconfig(self.song_duration, text=text) 92 | return 93 | 94 | def update_time(self, *args, **kwargs): 95 | text=self.time.get() 96 | self.canvas.itemconfig(self.time_display, text=text) 97 | return 98 | 99 | def update_song_title(self, *args, **kwargs): 100 | text=self.song.get() 101 | text=self.song_title_filter(text) 102 | self.canvas.itemconfig(self.song_display, text=text) 103 | return 104 | 105 | 106 | if __name__=='__main__': 107 | root=Tkinter.Tk() 108 | Var=Tkinter.IntVar() 109 | root.title('Player Module') 110 | var1=Tkinter.StringVar() 111 | Tkinter.Entry(root, textvariable=var1).pack(side='top') 112 | var2=Tkinter.StringVar() 113 | Tkinter.Entry(root, textvariable=var2).pack(side='top') 114 | var3=Tkinter.StringVar() 115 | Tkinter.Entry(root, textvariable=var3).pack(side='top') 116 | Player(root, var1, var2, var3) 117 | while True: 118 | root.update() 119 | root.update_idletask() 120 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/DisplayPanel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/DisplayPanel.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Gui.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | # Importing Modules 32 | try: 33 | import Tkinter, ttk 34 | except: 35 | import tkinter as Tkinter 36 | import tkinter.ttk as ttk 37 | import os 38 | from Configuration_base import * 39 | import Controls 40 | 41 | 42 | 43 | 44 | class Main(Tkinter.Tk): 45 | def __init__(self, *args, **kwargs): 46 | Tkinter.Tk.__init__(self, *args, **kwargs) 47 | ct=Controls.Main(root=self) 48 | self.hook=ct.hook 49 | self.controls_=ct.hook2 50 | self.creating_menu_bar() 51 | def creating_menu_bar(self): 52 | try: 53 | add_fileicon=Tkinter.PhotoImage(file="../Icons/add_file.gif") 54 | add_directoryicon=Tkinter.PhotoImage(file="../Icons/add_directory.gif") 55 | exiticon=Tkinter.PhotoImage(file="../Icons/exit.gif") 56 | playicon=Tkinter.PhotoImage(file="../Icons/play.gif") 57 | pauseicon=Tkinter.PhotoImage(file="../Icons/pause.gif") 58 | stopicon=Tkinter.PhotoImage(file="../Icons/stop.gif") 59 | rewindicon=Tkinter.PhotoImage(file="../Icons/rewind.gif") 60 | fast_forwardicon=Tkinter.PhotoImage(file="../Icons/fast_forward.gif") 61 | previous_trackicon=Tkinter.PhotoImage(file="../Icons/previous_track.gif") 62 | next_trackicon=Tkinter.PhotoImage(file="../Icons/next_track.gif") 63 | muteicon=Tkinter.PhotoImage(file="../Icons/mute.gif") 64 | unmuteicon=Tkinter.PhotoImage(file="../Icons/unmute.gif") 65 | delete_selectedicon=Tkinter.PhotoImage(file="../Icons/delete_selected.gif") 66 | 67 | except Exception as e: 68 | print ("[ Script Detected Change or Missing Something ]\n") 69 | print (e) 70 | import sys 71 | sys.exit(0) 72 | 73 | menu_bar=Tkinter.Menu(self) # MAIN BAR 74 | 75 | # [ FILE ] OPTIONS 76 | file_menu=Tkinter.Menu(menu_bar, tearoff=0) 77 | file_menu.add_command(label="Open_file",accelerator="Ctrl+O",compound="left", underline=0, image=add_fileicon, command=self.hook.ask_for_play_song_direct) 78 | file_menu.add_command(label="Open_folder",accelerator="Ctrl+Shift+O",compound="left", underline=0, image=add_directoryicon, command=self.hook.ask_for_directory) 79 | file_menu.add_command(label="Open_Disk",accelerator="Ctrl+D",compound="left", underline=0, image=add_directoryicon, command=self.hook.ask_for_directory) 80 | file_menu.add_separator() 81 | file_menu.add_command(label="Quit",accelerator="Alt+F4",compound="left", underline=0, image=exiticon, command=self.destroy) 82 | 83 | # [ EDIT ] OPTIONS 84 | edit_menu=Tkinter.Menu(menu_bar, tearoff=0) 85 | edit_menu.add_command(label="Play",accelerator="Space",compound="left", underline=0, image=playicon, command=self.controls_.play) 86 | edit_menu.add_command(label="Pause",accelerator="Space",compound="left", underline=0, image=pauseicon, command=self.controls_.pause) 87 | edit_menu.add_command(label="Stop",accelerator="Ctrl+T",compound="left", underline=0, image=stopicon, command=self.controls_.stop) 88 | edit_menu.add_separator() 89 | edit_menu.add_command(label="Rewind Track",accelerator="Ctrl+R",compound="left", underline=0, image=rewindicon, command=self.controls_.rewind) 90 | edit_menu.add_command(label="Fast_Forward",accelerator="Ctrl+F",compound="left", underline=0, image=fast_forwardicon, command=self.controls_.fast) 91 | edit_menu.add_separator() 92 | edit_menu.add_command(label="Previous Track",accelerator="Ctrl+P",compound="left", underline=0, image=previous_trackicon, command=self.controls_.previous) 93 | edit_menu.add_command(label="Next Track",accelerator="Ctrl+N",compound="left", underline=0, image=next_trackicon, command=self.controls_.Next) 94 | edit_menu.add_separator() 95 | edit_menu.add_command(label="Mute",accelerator="Ctrl+M",compound="left", underline=0, image=muteicon, command=self.controls_.mute) 96 | edit_menu.add_command(label="Un-mute",accelerator="Ctrl+N",compound="left", underline=0, image=unmuteicon, command=self.controls_.unmute) 97 | edit_menu.add_separator() 98 | edit_menu.add_command(label="Increase Volume",accelerator="Ctrl++",compound="left", underline=0, image=add_fileicon, command=self.controls_.increase_volume) 99 | edit_menu.add_command(label="Decrease Volume",accelerator="Ctrl+-",compound="left", underline=0, image=delete_selectedicon, command=self.controls_.decrease_volume) 100 | 101 | 102 | # [ ABOUT ] OPTIONS 103 | about_menu=Tkinter.Menu(menu_bar, tearoff=0) 104 | about_menu.add_command(label='Help', accelerator='F1', compound='left', underline=0) 105 | about_menu.add_separator() 106 | about_menu.add_command(label='About', accelerator='F2' ,compound='left', underline=0) 107 | 108 | #-------[ Joining menu sections with main menu ]---------------------- 109 | menu_bar.add_cascade(label='File', menu=file_menu) 110 | menu_bar.add_cascade(label='Edit', menu=edit_menu) 111 | menu_bar.add_cascade(label='About', menu=about_menu) 112 | 113 | #------[ Joining with root ]------------------------------------------ 114 | self.config(menu=menu_bar) 115 | 116 | 117 | if __name__=='__main__': 118 | Main(className=PROGRAM_NAME).mainloop() 119 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/Gui.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/Gui.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/ListPanel.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | # ============================================ 32 | # Usages: 33 | # main(root, var1) 34 | # root=Frame or widget for place display 35 | # var1=String Variable For Song Path 36 | # 37 | # And If Want To Use Internal Functions Of ListPanel Then 38 | # 39 | # Usages: 40 | # storeobj=main(root, var1) 41 | # hook=storeobj.hook 42 | # hook.FuntionWantToUse 43 | # 44 | # ============================================ 45 | 46 | 47 | # Here Importing Modules 48 | # Importing Modules 49 | try: 50 | import Tkinter, ttk,tkFileDialog 51 | except: 52 | import tkinter as Tkinter 53 | import tkinter.ttk as ttk 54 | import tkinter.filedialog as tkFileDialog 55 | 56 | import os 57 | 58 | from Configuration_base import * 59 | 60 | # Creating Class 61 | class ListPanel: 62 | def __init__(self, root, playing): 63 | self.playing=playing # Playing Song Directory 64 | self.root=Tkinter.Frame(root, bg='skyblue') 65 | self.root.pack(side='top') 66 | self.var1=Tkinter.StringVar() # For Search Songs 67 | self.directory=Tkinter.StringVar() # For Directory 68 | self.directory.set('.') 69 | self.create_song_list_panel() 70 | 71 | 72 | def create_song_list_panel(self): 73 | # Creating Picture Canvas as Background 74 | background=Tkinter.PhotoImage(file="../Icons/background.gif") 75 | mainframe=Tkinter.Canvas(self.root) 76 | mainframe.pack(side='top', expand='yes', fill='both') 77 | mainframe.image=background 78 | mainframe.create_image(0, 0, anchor="nw", image=background) 79 | 80 | frame0=Tkinter.Frame(mainframe) 81 | frame0.pack(side='top') 82 | Tkinter.Label(frame0, text='Search : ', bg='skyblue').pack(side='left', expand='yes', fill='x') 83 | Tkinter.Entry(frame0, textvariable=self.var1).pack(side='left', expand='yes', fill='x') 84 | frame0.bind_all('',self.search_song_trigger) 85 | frame=Tkinter.Frame(mainframe, bg='skyblue') 86 | frame.pack(side='top') 87 | self.list_box=Tkinter.Listbox(frame, bg='powderblue', font=list_box_song_list_font, width=list_box_width, height=list_box_height) 88 | scrollbar=Tkinter.Scrollbar(frame, bg='skyblue') 89 | scrollbar.pack(side='right',expand='yes',fill='y') 90 | scrollbar.config(command=self.list_box.yview) 91 | self.list_box.config(yscrollcommand=scrollbar.set) 92 | self.list_box.pack(expand='yes',fill='both',side='right') 93 | frame1=Tkinter.Frame(mainframe, bg='blue') 94 | frame1.pack(side='top', expand='yes',fill='x') 95 | add_fileicon=Tkinter.PhotoImage(file="../Icons/add_file.gif") 96 | add_directoryicon=Tkinter.PhotoImage(file="../Icons/add_directory.gif") 97 | list_file=[ 98 | (add_fileicon,'self.ask_for_play_song_direct'), 99 | (add_directoryicon,'self.ask_for_directory'), 100 | ] 101 | for i,j in list_file: 102 | storeobj=Tkinter.Button(frame1, image=i, command=eval(j), bg='blue') 103 | storeobj.pack(side='left') 104 | storeobj.image=i 105 | self.list_box.bind('',self.play_on_click) 106 | return self.update_list_box_songs() 107 | 108 | 109 | def search_song_trigger(self, event=None): 110 | string=self.var1.get() 111 | list_dir=os.listdir(self.directory.get()) 112 | self.list_box.delete('0','end') 113 | for i in list_dir: 114 | if string in i: 115 | if i[::-1][0]=='~': 116 | pass 117 | else: 118 | self.list_box.insert(0, i) 119 | else: 120 | pass 121 | return 122 | def play_on_click(self, event=None): 123 | store=self.list_box.selection_get() 124 | if self.directory.get()=='.': 125 | path=os.path.join(os.getcwd(),store) 126 | self.playing.set(path) 127 | print ('[+] Song Variable Update Path : {}'.format(path)) 128 | return 129 | else: 130 | path=os.path.join(self.directory.get(),store) 131 | self.playing.set(path) 132 | print ('[+] Song Variable Update Path : {}'.format(path)) 133 | return 134 | 135 | 136 | def update_list_box_songs(self, dirs='.'): 137 | files=os.listdir(dirs) 138 | files.reverse() 139 | self.list_box.delete('0','end') 140 | for i in files: 141 | if i[::-1][0]=='~': 142 | pass 143 | else: 144 | self.list_box.insert(0, i) 145 | return 146 | 147 | 148 | def ask_for_play_song_direct(self): 149 | path=tkFileDialog.askopenfilename(title='Play Selected Song') 150 | if path: 151 | self.playing.set(path) 152 | print ('[+] Song Variable Update Path : {}'.format(path)) 153 | return 154 | 155 | 156 | def ask_for_directory(self): 157 | path=tkFileDialog.askdirectory(title='Select Directory For Playlist') 158 | if path: 159 | self.directory.set(path) 160 | print (path) 161 | return self.update_list_box_songs(dirs=path) 162 | 163 | 164 | 165 | class main: 166 | def __init__(self, root, var1): 167 | self.playing=var1 168 | self.root=Tkinter.Frame(root) 169 | self.root.pack() 170 | self.anchorvar=Tkinter.IntVar() 171 | self.anchorvar.set(1) 172 | self.anchor_button=Tkinter.Button(self.root, text='[ Close ]', command=self.check_drawer, bg='skyblue', activebackground='powderblue') 173 | self.anchor_button.pack(side='top',expand='yes',fill='x') 174 | self.mainframe=Tkinter.Frame(self.root) 175 | self.mainframe.pack() 176 | obj=ListPanel(self.mainframe, self.playing) 177 | self.hook=obj 178 | def open_drawer(self): 179 | if self.anchorvar.get()==1: 180 | self.anchorvar.set(0) 181 | self.mainframe.pack_forget() 182 | self.anchor_button.config(text=' [ Open ]') 183 | def close_drawer(self): 184 | if self.anchorvar.get()==0: 185 | self.anchorvar.set(1) 186 | self.mainframe.pack(side='top',expand='yes',fill='both') 187 | self.anchor_button.config(text=' [ Close ]') 188 | 189 | def check_drawer(self): 190 | if self.anchorvar.get()==1: 191 | self.anchorvar.set(0) 192 | self.mainframe.pack_forget() 193 | self.anchor_button.config(text=' [ Open ]') 194 | else: 195 | self.anchorvar.set(1) 196 | self.mainframe.pack(side='top',expand='yes',fill='both') 197 | self.anchor_button.config(text=' [ Close ]') 198 | 199 | 200 | 201 | 202 | 203 | if __name__=='__main__': 204 | root=Tkinter.Tk(className='Python Song List ') 205 | playing=Tkinter.StringVar() 206 | var1=Tkinter.StringVar() # For Playing Song 207 | Tkinter.Entry(root, textvariable=var1).pack(side='top') 208 | main(root, var1) 209 | root.mainloop() 210 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/ListPanel.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/ListPanel.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/__pycache__/Configuration_base.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/__pycache__/Configuration_base.cpython-35.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/__pycache__/DisplayPanel.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/__pycache__/DisplayPanel.cpython-35.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/__pycache__/ListPanel.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/__pycache__/ListPanel.cpython-35.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/__pycache__/player.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/__pycache__/player.cpython-35.pyc -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/avbin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/avbin.dll -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/player.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ---------------- READ ME --------------------------------------------- 4 | # This Script is Created Only For Practise And Educational Purpose Only 5 | # This is an Example Of Tkinter Canvas Graphics 6 | # This Script Is Created For http://bitforestinfo.blogspot.in 7 | # This Script is Written By 8 | # 9 | # 10 | ################################################## 11 | ######## Please Don't Remove Author Name ######### 12 | ############### Thanks ########################### 13 | ################################################## 14 | # 15 | # 16 | __author__=''' 17 | 18 | ###################################################### 19 | By S.S.B Group 20 | ###################################################### 21 | 22 | Suraj Singh 23 | Admin 24 | S.S.B Group 25 | surajsinghbisht054@gmail.com 26 | http://bitforestinfo.blogspot.in/ 27 | 28 | Note: We Feel Proud To Be Indian 29 | ###################################################### 30 | ''' 31 | # Here Importing Modules 32 | import pyglet # import pyglet 33 | import datetime 34 | import os 35 | import time 36 | import threading 37 | import pyglet.media as media 38 | from Configuration_base import * 39 | 40 | # ============================================ 41 | # Usages: 42 | # player=__media__player(path, song_time, song_duration, volume) 43 | # Here: 44 | # path=String Variable For Song Path 45 | # song_time=String Variable For Song Playing Time 46 | # song_duration= String Variable For Time duration 47 | # volume = IntVar For Volume Updates 48 | # 49 | # For Other Functions: 50 | # player.YourFunction 51 | # ============================================ 52 | 53 | 54 | class mediaplayer: 55 | def __init__(self, path, song_time,song_duration,volume): 56 | self.path=path # Song Playing Song 57 | self.volume=volume # Song Volume Update 58 | self.songtime=song_time # Song Time Variable 59 | self.songduration=song_duration # Song Duration 60 | self.player=media.Player() # pyglet Media Player 61 | self.player.volume=1.5 # 62 | self.time_thread() # Time Updating Thread 63 | 64 | self.path.trace('w',self.play_song) 65 | self.volume.trace('w', self.volume_) 66 | 67 | def jump(self, time): 68 | try: 69 | self.player.seek(time) 70 | return 71 | except: 72 | print ('[+] Jump is Not Possible') 73 | return 74 | 75 | 76 | def now(self): 77 | storeobj=self.player.time 78 | return storeobj 79 | 80 | def now_(self): 81 | time=int(self.now()) 82 | k=datetime.timedelta(seconds=time) 83 | k=k.__str__() 84 | return k 85 | 86 | 87 | def pause(self): 88 | self.player.pause() 89 | return 90 | 91 | def play(self): 92 | self.player.play() 93 | return 94 | 95 | def stop(self): 96 | self.reset_player() 97 | return 98 | 99 | def volume_(self, *args, **kwargs): 100 | try: 101 | volume=self.volume.get() 102 | self.player.volume=volume 103 | except: 104 | pass 105 | return 106 | 107 | def time_thread(self): 108 | threading.Thread(target=self.update_time_).start() 109 | return 110 | 111 | 112 | def update_time_(self): 113 | while True: 114 | now=self.now_() 115 | try: 116 | self.songtime.set(now) 117 | pass 118 | 119 | except Exception as e: 120 | print e 121 | pass 122 | 123 | 124 | def duration(self): 125 | try: 126 | storeobj=self.player.source.duration 127 | return storeobj 128 | except: 129 | return '0' 130 | def duration_(self): 131 | time=self.duration()+10.0 132 | k=datetime.timedelta(seconds=time) 133 | k=k.__str__() 134 | return k 135 | 136 | def reset_player(self): 137 | self.player.pause() 138 | self.player.delete() 139 | return 140 | 141 | 142 | 143 | def play_song(self, *args, **kwargs): 144 | if self.path.get(): 145 | try: 146 | self.reset_player() 147 | try: 148 | src=media.load(self.path.get()) 149 | self.player.queue(src) 150 | self.play() 151 | 152 | self.songduration.set(self.duration_()) # Updating duration Time 153 | return 154 | except Exception as e: 155 | print ("[+] Something wrong when playing song",e) 156 | return 157 | except Exception as e: 158 | print (' [+] Please Check Your File Path', self.path.get()) 159 | print (' [+] Error: Problem On Playing \n ',e) 160 | return 161 | else: 162 | print (' [+] Please Check Your File Path', self.path.get()) 163 | return 164 | 165 | def fast_forward(self): 166 | time = self.player.time + jump_distance 167 | try: 168 | if self.duration() > time: 169 | self.player.seek(time) 170 | else: 171 | self.player.seek(self.duration()) 172 | except AttributeError: 173 | pass 174 | 175 | def rewind(self): 176 | time = self.player.time - jump_distance 177 | try: 178 | self.player.seek(time) 179 | except: 180 | self.player.seek(0) 181 | 182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /Python Media Player Version 0.0.1/Tools/player.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/Python Media Player Version 0.0.1/Tools/player.pyc -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Python-Media-Player 2 | This is a simple music player written in Python With Tkinter and Other Useful Module. I wrote this project just 3 | for practise and fun purpose. if you are also new to python and want to practise your skills . then you can use this 4 | python repo and your Project. You can Upgrade the features of this Music Player 5 | 6 | ### First Screenshot 7 | ![Screenshot](src/test.png?raw=true "Screen1") 8 | 9 | ### Second Screenshot 10 | ![Screenshot](src/test1.png?raw=true "Screen2") 11 | 12 | ### Author Details 13 | ``` 14 | Suraj Singh 15 | Admin 16 | S.S.B Group 17 | surajsinghbisht054@gmail.com 18 | http://www.bitforestinfo.com 19 | ``` 20 | 21 | 22 | # Development. 23 | 24 | 25 | Want to Contribute? Great! 26 | 27 | 28 | There Are 2 Methods. 29 | 30 | 1. Pull Request ( Github Account Required ). 31 | 32 | 2. Through Email. 33 | 34 | 35 | ### 1. Pull Request ( Github A/c Required ). 36 | 37 | 1. Fork it! 38 | 39 | 2. Create your feature branch: `git checkout -b my-new-feature` 40 | 41 | 3. Commit your changes: `git commit -am 'Add some feature'` 42 | 43 | 4. Push to the branch: `git push origin my-new-feature` 44 | 45 | 5. Submit a pull request :D 46 | 47 | 48 | 49 | ### 2. Through Email. 50 | 51 | 1. Send Your Updated Version On My Email. 52 | 53 | - surajsinghbisht054@gmail.com 54 | 55 | 56 | ----- 57 | 58 | ## Contributing 59 | 60 | See [CONTRIBUTING](/CONTRIBUTING.md). 61 | 62 | ---- 63 | 64 | ## License 65 | 66 | Apache License 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/src/test.png -------------------------------------------------------------------------------- /src/test1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/surajsinghbisht054/Python-Media-Player/d82cbba6ebc8d69414d8b69864ef8de39942e300/src/test1.png --------------------------------------------------------------------------------