Compare commits
5 Commits
8e70ed1e7d
...
1.0.2
Author | SHA1 | Date | |
---|---|---|---|
105a8ec077 | |||
b1814e967c | |||
6fac08414b | |||
7bd6c4731c | |||
c48b5826c4 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -124,3 +124,7 @@ dmypy.json
|
|||||||
.pyre/
|
.pyre/
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
|
toBinary
|
||||||
|
|
||||||
|
binary/
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color: rgb(42, 42, 42);
|
<string notr="true">background-color: rgb(42, 42, 42);
|
||||||
font: 11pt "UbuntuMono NF";
|
|
||||||
selection-background-color: rgb(105, 105, 105);
|
selection-background-color: rgb(105, 105, 105);
|
||||||
color: rgb(230, 230, 230);</string>
|
color: rgb(230, 230, 230);</string>
|
||||||
</property>
|
</property>
|
||||||
@ -58,7 +57,8 @@ background-color: rgb(105, 105, 105);</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="search_line_edit">
|
<widget class="QLineEdit" name="search_line_edit">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color: rgb(42, 42, 42);</string>
|
<string notr="true">background-color: rgb(42, 42, 42);
|
||||||
|
font: 11pt "UbuntuMono NF";</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
@ -74,7 +74,8 @@ background-color: rgb(105, 105, 105);</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QListWidget" name="tracks_list_widget">
|
<widget class="QListWidget" name="tracks_list_widget">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">background-color: rgb(42, 42, 42);</string>
|
<string notr="true">background-color: rgb(42, 42, 42);
|
||||||
|
font: 11pt "UbuntuMono NF";</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
50
README.md
50
README.md
@ -20,9 +20,6 @@
|
|||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<a href="#about-the-project">About The Project</a>
|
<a href="#about-the-project">About The Project</a>
|
||||||
<ul>
|
|
||||||
<li><a href="#built-with">Built With</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#getting-started">Getting Started</a>
|
<a href="#getting-started">Getting Started</a>
|
||||||
@ -32,49 +29,24 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#usage">Usage</a></li>
|
<li><a href="#usage">Usage</a></li>
|
||||||
<li><a href="#roadmap">Roadmap</a></li>
|
<li><a href="#gallery">Gallery</a></li>
|
||||||
<li><a href="#contributing">Contributing</a></li>
|
|
||||||
<li><a href="#license">License</a></li>
|
|
||||||
<li><a href="#contact">Contact</a></li>
|
|
||||||
<li><a href="#acknowledgments">Acknowledgments</a></li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<!-- ABOUT THE PROJECT -->
|
|
||||||
|
|
||||||
## About The Project
|
## About The Project
|
||||||
|
|
||||||
This is my personnal GUI for MediaInfo, based on [MediaInfo.NET]([GitHub - stax76/MediaInfo.NET: MediaInfo.NET is a Windows application that shows media file information](https://github.com/stax76/MediaInfo.NET))
|
This is my personnal GUI for MediaInfo, based on [MediaInfo.NET](https://github.com/stax76/MediaInfo.NET)
|
||||||
|
|
||||||

|
<p align="center"><img src="screenshots/basic.jpg" width="600"></p>
|
||||||
|
|
||||||
<p align="center">View of the main interface</p><br>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<p align="center">You can select each track to see more details</p><br>
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
<p align="center">You can search through all the tracks</p>
|
|
||||||
|
|
||||||
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
||||||
|
|
||||||
<!-- GETTING STARTED -->
|
|
||||||
|
|
||||||
## Getting Started
|
|
||||||
|
|
||||||
This is an example of how you may give instructions on setting up your project locally.
|
|
||||||
To get a local copy up and running follow these simple example steps.
|
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
This is an example of how to list things you need to use the software and how to install them.
|
* Python 3.7 or later
|
||||||
|
|
||||||
- Python 3.7 or later
|
|
||||||
* PySide6
|
* PySide6
|
||||||
|
* [MediaInfo](https://github.com/MediaArea/MediaInfo)
|
||||||
|
|
||||||
* [MediaInfo]([https://github.com/MediaArea/MediaInfo)
|
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
@ -94,8 +66,18 @@ This is an example of how to list things you need to use the software and how to
|
|||||||
|
|
||||||
<!-- USAGE EXAMPLES -->
|
<!-- USAGE EXAMPLES -->
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Just drag and drop a file on the window.
|
Just drag and drop a file on the window to show the media file informations
|
||||||
|
|
||||||
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
||||||
|
|
||||||
|
|
||||||
|
## Gallery
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
2
mediainfosama/__main__.py
Normal file
2
mediainfosama/__main__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
if __name__ == "__main__":
|
||||||
|
import main
|
@ -1,5 +1,4 @@
|
|||||||
import os, subprocess, json
|
import os, subprocess
|
||||||
from shlex import quote
|
|
||||||
|
|
||||||
class FileCmds:
|
class FileCmds:
|
||||||
def __init__(self, file_path):
|
def __init__(self, file_path):
|
||||||
@ -19,7 +18,7 @@ class FileCmds:
|
|||||||
:type cmd: str
|
:type cmd: str
|
||||||
:return: str
|
:return: str
|
||||||
'''
|
'''
|
||||||
process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
|
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
|
||||||
output, error = process.communicate()
|
output, error = process.communicate()
|
||||||
return output
|
return output
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ class FileCmds:
|
|||||||
:type inform: str
|
:type inform: str
|
||||||
:rtype: str
|
:rtype: str
|
||||||
'''
|
'''
|
||||||
bash_command = f"mediainfo --Inform={quote(inform)} {quote(self.file_path)}"
|
bash_command = ["mediainfo", f"--Inform={inform}", self.file_path]
|
||||||
output = self.execute_bash(bash_command).decode('utf-8')
|
output = self.execute_bash(bash_command).decode('utf-8')
|
||||||
return output
|
return output
|
||||||
|
|
||||||
@ -105,7 +104,7 @@ class FileCmds:
|
|||||||
output += "M: Menu\n\n"
|
output += "M: Menu\n\n"
|
||||||
|
|
||||||
output += "\n"
|
output += "\n"
|
||||||
output += self.execute_bash(f"mediainfo {quote(self.file_path)}").decode('utf-8')
|
output += self.execute_bash(["mediainfo", self.file_path]).decode('utf-8')
|
||||||
return(output)
|
return(output)
|
||||||
|
|
||||||
|
|
||||||
@ -115,7 +114,7 @@ class FileCmds:
|
|||||||
|
|
||||||
:rtype: string
|
:rtype: string
|
||||||
'''
|
'''
|
||||||
output = self.execute_bash(f"mediainfo --Full {quote(self.file_path)}").decode('utf-8')
|
output = self.execute_bash(["mediainfo", "--Full", self.file_path]).decode('utf-8')
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from PySide6.QtWidgets import QWidget
|
from PySide6.QtWidgets import QWidget
|
||||||
from PySide6.QtCore import QSize
|
from PySide6.QtCore import QSize
|
||||||
from PySide6.QtGui import QTextCharFormat, QTextCursor, QColor
|
from PySide6.QtGui import QTextCharFormat, QTextCursor, QColor, QTextBlockFormat
|
||||||
from ui_main_window import Ui_MainWindow
|
from ui_main_window import Ui_MainWindow
|
||||||
from file_cmds import FileCmds
|
from file_cmds import FileCmds
|
||||||
|
|
||||||
@ -17,6 +17,9 @@ class MainWindow(QWidget, Ui_MainWindow):
|
|||||||
self.splitter.setStretchFactor(0, False)
|
self.splitter.setStretchFactor(0, False)
|
||||||
self.splitter.setStretchFactor(1, True)
|
self.splitter.setStretchFactor(1, True)
|
||||||
|
|
||||||
|
self.detail_text_edit.setFont("UbuntuMono NF")
|
||||||
|
self.detail_text_edit.zoomIn(2)
|
||||||
|
|
||||||
|
|
||||||
def setupConnections(self):
|
def setupConnections(self):
|
||||||
self.tracks_list_widget.itemSelectionChanged.connect(self.popuplate_content)
|
self.tracks_list_widget.itemSelectionChanged.connect(self.popuplate_content)
|
||||||
@ -59,8 +62,17 @@ class MainWindow(QWidget, Ui_MainWindow):
|
|||||||
self.content = self.file_cmds.tabs_content[item_selected[0].text()]
|
self.content = self.file_cmds.tabs_content[item_selected[0].text()]
|
||||||
self.detail_text_edit.setPlainText(self.content)
|
self.detail_text_edit.setPlainText(self.content)
|
||||||
self.search()
|
self.search()
|
||||||
|
self.wrap_line_indent()
|
||||||
|
|
||||||
|
|
||||||
|
def wrap_line_indent(self):
|
||||||
|
cursor = QTextCursor(self.detail_text_edit.document())
|
||||||
|
cursor.select(QTextCursor.Document)
|
||||||
|
fmt = QTextBlockFormat()
|
||||||
|
fmt.setLeftMargin(100)
|
||||||
|
fmt.setTextIndent(-100)
|
||||||
|
cursor.mergeBlockFormat(fmt)
|
||||||
|
|
||||||
def search(self):
|
def search(self):
|
||||||
to_search = self.search_line_edit.text()
|
to_search = self.search_line_edit.text()
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ class Ui_MainWindow(object):
|
|||||||
MainWindow.setObjectName(u"MainWindow")
|
MainWindow.setObjectName(u"MainWindow")
|
||||||
MainWindow.resize(1214, 888)
|
MainWindow.resize(1214, 888)
|
||||||
MainWindow.setStyleSheet(u"background-color: rgb(42, 42, 42);\n"
|
MainWindow.setStyleSheet(u"background-color: rgb(42, 42, 42);\n"
|
||||||
"font: 11pt \"UbuntuMono NF\";\n"
|
|
||||||
"selection-background-color: rgb(105, 105, 105);\n"
|
"selection-background-color: rgb(105, 105, 105);\n"
|
||||||
"color: rgb(230, 230, 230);")
|
"color: rgb(230, 230, 230);")
|
||||||
self.verticalLayout_2 = QVBoxLayout(MainWindow)
|
self.verticalLayout_2 = QVBoxLayout(MainWindow)
|
||||||
@ -47,14 +46,16 @@ class Ui_MainWindow(object):
|
|||||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||||
self.search_line_edit = QLineEdit(self.layoutWidget)
|
self.search_line_edit = QLineEdit(self.layoutWidget)
|
||||||
self.search_line_edit.setObjectName(u"search_line_edit")
|
self.search_line_edit.setObjectName(u"search_line_edit")
|
||||||
self.search_line_edit.setStyleSheet(u"background-color: rgb(42, 42, 42);")
|
self.search_line_edit.setStyleSheet(u"background-color: rgb(42, 42, 42);\n"
|
||||||
|
"font: 11pt \"UbuntuMono NF\";")
|
||||||
self.search_line_edit.setFrame(False)
|
self.search_line_edit.setFrame(False)
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.search_line_edit)
|
self.verticalLayout.addWidget(self.search_line_edit)
|
||||||
|
|
||||||
self.tracks_list_widget = QListWidget(self.layoutWidget)
|
self.tracks_list_widget = QListWidget(self.layoutWidget)
|
||||||
self.tracks_list_widget.setObjectName(u"tracks_list_widget")
|
self.tracks_list_widget.setObjectName(u"tracks_list_widget")
|
||||||
self.tracks_list_widget.setStyleSheet(u"background-color: rgb(42, 42, 42);")
|
self.tracks_list_widget.setStyleSheet(u"background-color: rgb(42, 42, 42);\n"
|
||||||
|
"font: 11pt \"UbuntuMono NF\";")
|
||||||
self.tracks_list_widget.setFrameShape(QFrame.NoFrame)
|
self.tracks_list_widget.setFrameShape(QFrame.NoFrame)
|
||||||
|
|
||||||
self.verticalLayout.addWidget(self.tracks_list_widget)
|
self.verticalLayout.addWidget(self.tracks_list_widget)
|
||||||
|
Reference in New Issue
Block a user