├── LICENSE ├── README.md ├── build-aux └── meson │ └── postinstall.py ├── com.github.Johnn3y.Forklift.json ├── data ├── com.github.Johnn3y.Forklift-symbolic.svg ├── com.github.Johnn3y.Forklift.Source.svg ├── com.github.Johnn3y.Forklift.appdata.xml.in ├── com.github.Johnn3y.Forklift.desktop.in ├── com.github.Johnn3y.Forklift.gschema.xml ├── com.github.Johnn3y.Forklift.svg ├── meson.build └── screenshots │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png ├── meson.build ├── po ├── LINGUAS ├── POTFILES ├── meson.build └── tr.po └── src ├── Forklift.gresource.xml ├── Forklift.in ├── Forklift.py ├── __init__.py ├── aboutdialog.ui ├── application.py ├── applicationwindow.py ├── applicationwindow.ui ├── cd.py ├── downloadprogressactionrow.ui ├── downloadprogresslistbox.ui ├── formats_actionrow.ui ├── items.py ├── items_actionrow.ui ├── main.py └── meson.build /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Forklift - yet another GUI for youtube-dl 2 | 3 | ## Description 4 | 5 | Forklift is a simple GUI for youtube-dl using PyGObject 6 | 7 | ## Installation 8 | 9 | ### Flatpak 10 | Download on Flathub 11 | 12 | ### Arch Linux 13 | `forklift-git` on [AUR](https://aur.archlinux.org/packages/forklift-git) 14 | 15 | 16 | ## Requirements 17 | * [GTK+3](https://gtk.org/) 18 | * [libdazzle](https://gitlab.gnome.org/GNOME/libdazzle) 19 | * [libhandy](https://source.puri.sm/Librem5/libhandy) 20 | * [PyGObject](https://pygobject.readthedocs.io/en/latest/) 21 | * [youtube-dl](https://rg3.github.io/youtube-dl/) 22 | 23 | ## ToDo 24 | 25 | * a lot 26 | -------------------------------------------------------------------------------- /build-aux/meson/postinstall.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | from os import environ, path 4 | from subprocess import call 5 | 6 | prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local') 7 | datadir = path.join(prefix, 'share') 8 | destdir = environ.get('DESTDIR', '') 9 | 10 | # Package managers set this so we don't need to run 11 | if not destdir: 12 | print('Updating icon cache...') 13 | call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')]) 14 | 15 | print('Updating desktop database...') 16 | call(['update-desktop-database', '-q', path.join(datadir, 'applications')]) 17 | 18 | print('Compiling GSettings schemas...') 19 | call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')]) 20 | 21 | 22 | -------------------------------------------------------------------------------- /com.github.Johnn3y.Forklift.json: -------------------------------------------------------------------------------- 1 | { 2 | "id" : "com.github.Johnn3y.Forklift", 3 | "runtime" : "org.gnome.Platform", 4 | "runtime-version" : "3.36", 5 | "sdk" : "org.gnome.Sdk", 6 | "command" : "Forklift", 7 | "finish-args" : [ 8 | "--socket=wayland", 9 | "--socket=fallback-x11", 10 | "--share=ipc", 11 | "--share=network", 12 | "--talk-name=org.freedesktop.Notifications", 13 | "--filesystem=home" 14 | ], 15 | "cleanup" : [ 16 | "/include", 17 | "/lib/pkgconfig" 18 | ], 19 | "modules" : [ 20 | { 21 | "name" : "ffmpeg", 22 | "config-opts" : [ 23 | "--enable-shared", 24 | "--disable-static", 25 | "--disable-doc", 26 | "--disable-ffplay", 27 | "--disable-devices", 28 | "--enable-gnutls", 29 | "--enable-libvorbis" 30 | ], 31 | "sources" : [ 32 | { 33 | "url" : "https://ffmpeg.org/releases/ffmpeg-4.2.1.tar.xz", 34 | "sha256" : "cec7c87e9b60d174509e263ac4011b522385fd0775292e1670ecc1180c9bb6d4", 35 | "type" : "archive" 36 | } 37 | ], 38 | "cleanup" : [ 39 | "/share/ffmpeg" 40 | ], 41 | "post-install" : [ 42 | "install -Dm644 COPYING.LGPLv3 /app/share/licenses/ffmpeg/COPYING" 43 | ] 44 | }, 45 | { 46 | "name" : "youtube-dl", 47 | "buildsystem" : "simple", 48 | "ensure-writable" : [ 49 | "/lib/python*/site-packages/easy-install.pth" 50 | ], 51 | "sources" : [ 52 | { 53 | "url" : "https://github.com/ytdl-org/youtube-dl", 54 | "tag" : "2020.03.24", 55 | "commit" : "049c0486bbd57a9bb5fb5a6a5eeff82fd4ac03ff", 56 | "type" : "git" 57 | } 58 | ], 59 | "build-commands" : [ 60 | "python3 setup.py build", 61 | "python3 setup.py install --prefix=/app" 62 | ] 63 | }, 64 | { 65 | "name" : "libdazzle", 66 | "config-opts" : [ 67 | "--libdir=/app/lib", 68 | "--buildtype=release" 69 | ], 70 | "buildsystem" : "meson", 71 | "builddir" : true, 72 | "cleanup" : [ 73 | "/bin" 74 | ], 75 | "sources" : [ 76 | { 77 | "type" : "git", 78 | "url" : "https://gitlab.gnome.org/GNOME/libdazzle.git", 79 | "branch" : "3.36.0", 80 | "commit" : "2f4d35523c61121eac0459e01b1510e46fe7f2c8" 81 | } 82 | ] 83 | }, 84 | { 85 | "name" : "libhandy", 86 | "buildsystem" : "meson", 87 | "config-opts" : [ 88 | "-Dexamples=false", 89 | "-Dtests=false" 90 | ], 91 | "sources" : [ 92 | { 93 | "url" : "https://source.puri.sm/Librem5/libhandy", 94 | "branch" : "v0.0.13", 95 | "commit" : "7a193d7692c9c76a1a94f17c4d30b585f77d177c", 96 | "type" : "git" 97 | } 98 | ] 99 | }, 100 | { 101 | "name" : "Forklift", 102 | "buildsystem" : "meson", 103 | "sources" : [ 104 | { 105 | "url" : "https://github.com/Johnn3y/Forklift", 106 | "branch" : "master", 107 | "type" : "git" 108 | } 109 | ] 110 | } 111 | ] 112 | } 113 | -------------------------------------------------------------------------------- /data/com.github.Johnn3y.Forklift-symbolic.svg: -------------------------------------------------------------------------------- 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 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | -------------------------------------------------------------------------------- /data/com.github.Johnn3y.Forklift.appdata.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.github.Johnn3y.Forklift 4 | CC0-1.0 5 | GPL-3.0-or-later 6 | Forklift 7 | Video and audio download application 8 | 9 |

10 | Forklift is a program used to download video and audio files from popular Video and Audio platforms. Using the popular CLI application youtube-dl as base, Forklift supports dozents of websites. Forklift is also optimized for smaller screens, so you can easily navigate on your mobile device.

11 |

Main Features:

12 |
    13 |
  • Search function for YouTube and Soundcloud
  • 14 |
  • Download original files or
  • 15 |
  • Convert video and audio files to other formats like mp3, ogg, etc
  • 16 |
17 |
18 | ​ 19 | 20 | Main Window 21 | https://raw.githubusercontent.com/Johnn3y/Forklift/master/data/screenshots/1.png 22 | 23 | 24 | Search for YouTube and Soundcloud 25 | https://raw.githubusercontent.com/Johnn3y/Forklift/master/data/screenshots/2.png 26 | 27 | 28 | Download Status 29 | https://raw.githubusercontent.com/Johnn3y/Forklift/master/data/screenshots/3.png 30 | 31 | 32 | Responsive design 33 | https://raw.githubusercontent.com/Johnn3y/Forklift/master/data/screenshots/4.png 34 | 35 | 36 | com.github.Johnn3y.Forklift.desktop 37 | http://github.com/Johnn3y/Forklift 38 | http://github.com/Johnn3y 39 | 40 | 41 | 42 | 43 |

Initial Release

44 |
45 |
46 |
47 | Forklift 48 |
49 | -------------------------------------------------------------------------------- /data/com.github.Johnn3y.Forklift.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Forklift 3 | Exec=Forklift 4 | Terminal=false 5 | Type=Application 6 | Categories=AudioVideo; 7 | StartupNotify=true 8 | Icon=com.github.Johnn3y.Forklift 9 | -------------------------------------------------------------------------------- /data/com.github.Johnn3y.Forklift.gschema.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /data/com.github.Johnn3y.Forklift.svg: -------------------------------------------------------------------------------- 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 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | -------------------------------------------------------------------------------- /data/meson.build: -------------------------------------------------------------------------------- 1 | install_data( 2 | 'com.github.Johnn3y.Forklift.svg', 3 | install_dir : join_paths(get_option('datadir'), 'icons/hicolor/scalable/apps') 4 | ) 5 | 6 | install_data( 7 | 'com.github.Johnn3y.Forklift-symbolic.svg', 8 | install_dir : join_paths(get_option('datadir'), 'icons/hicolor/symbolic/apps') 9 | ) 10 | 11 | desktop_file = i18n.merge_file( 12 | input: 'com.github.Johnn3y.Forklift.desktop.in', 13 | output: 'com.github.Johnn3y.Forklift.desktop', 14 | type: 'desktop', 15 | po_dir: '../po', 16 | install: true, 17 | install_dir: join_paths(get_option('datadir'), 'applications') 18 | ) 19 | 20 | desktop_utils = find_program('desktop-file-validate', required: false) 21 | if desktop_utils.found() 22 | test('Validate desktop file', desktop_utils, 23 | args: [desktop_file] 24 | ) 25 | endif 26 | 27 | appstream_file = i18n.merge_file( 28 | input: 'com.github.Johnn3y.Forklift.appdata.xml.in', 29 | output: 'com.github.Johnn3y.Forklift.appdata.xml', 30 | po_dir: '../po', 31 | install: true, 32 | install_dir: join_paths(get_option('datadir'), 'appdata') 33 | ) 34 | 35 | appstream_util = find_program('appstream-util', required: false) 36 | if appstream_util.found() 37 | test('Validate appstream file', appstream_util, 38 | args: ['validate', appstream_file] 39 | ) 40 | endif 41 | 42 | install_data('com.github.Johnn3y.Forklift.gschema.xml', 43 | install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas') 44 | ) 45 | 46 | compile_schemas = find_program('glib-compile-schemas', required: false) 47 | if compile_schemas.found() 48 | test('Validate schema file', compile_schemas, 49 | args: ['--strict', '--dry-run', meson.current_source_dir()] 50 | ) 51 | endif 52 | -------------------------------------------------------------------------------- /data/screenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Johnn3y/Forklift/6dd26bd864d643dfb81310254b57aac93f8aabec/data/screenshots/1.png -------------------------------------------------------------------------------- /data/screenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Johnn3y/Forklift/6dd26bd864d643dfb81310254b57aac93f8aabec/data/screenshots/2.png -------------------------------------------------------------------------------- /data/screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Johnn3y/Forklift/6dd26bd864d643dfb81310254b57aac93f8aabec/data/screenshots/3.png -------------------------------------------------------------------------------- /data/screenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Johnn3y/Forklift/6dd26bd864d643dfb81310254b57aac93f8aabec/data/screenshots/4.png -------------------------------------------------------------------------------- /meson.build: -------------------------------------------------------------------------------- 1 | project('Forklift', version: '1.0.0', 2 | meson_version: '>= 0.40.0', 3 | ) 4 | 5 | i18n = import('i18n') 6 | 7 | 8 | subdir('data') 9 | subdir('src') 10 | subdir('po') 11 | 12 | meson.add_install_script('build-aux/meson/postinstall.py') 13 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | tr 2 | -------------------------------------------------------------------------------- /po/POTFILES: -------------------------------------------------------------------------------- 1 | data/com.github.Johnn3y.Forklift.desktop.in 2 | data/com.github.Johnn3y.Forklift.appdata.xml.in 3 | data/com.github.Johnn3y.Forklift.gschema.xml 4 | src/window.uisrc/main.py 5 | src/window.py 6 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext('Forklift', preset: 'glib') 2 | -------------------------------------------------------------------------------- /po/tr.po: -------------------------------------------------------------------------------- 1 | # Turkish translation for com.github.Johnn3y.Forklift. 2 | # Copyright (C) 2022 com.github.Johnn3y.Forklift's COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the com.github.Johnn3y.Forklift package. 4 | # 5 | # Sabri Ünal , 2020. 6 | # 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: com.github.Johnn3y.Forklift master\n" 10 | "Report-Msgid-Bugs-To: https://github.com/Johnn3y/Forklift/issues\n" 11 | "POT-Creation-Date: 2022-08-10 16:09+0300\n" 12 | "PO-Revision-Date: 2022-08-10 16:31+0300\n" 13 | "Last-Translator: Sabri Ünal \n" 14 | "Last-Translator: Emin Tufan Çetin \n" 15 | "Language-Team: Türkçe \n" 16 | "Language: tr\n" 17 | "MIME-Version: 1.0\n" 18 | "Content-Type: text/plain; charset=UTF-8\n" 19 | "Content-Transfer-Encoding: 8bit\n" 20 | "Plural-Forms: nplurals=1; plural=0;\n" 21 | "X-Generator: Poedit 3.1.1\n" 22 | "X-Poedit-SearchPath-0: src\n" 23 | "X-Poedit-SearchPath-1: data\n" 24 | 25 | #: src/aboutdialog.ui:10 26 | msgid "Copyright © 2020 Johnn3y" 27 | msgstr "Copyright © 2020 Johnn3y" 28 | 29 | #: src/aboutdialog.ui:11 30 | msgid "A GUI for youtube-dl" 31 | msgstr "Youtube-dl arayüzü" 32 | 33 | #: src/aboutdialog.ui:13 34 | msgid "Github" 35 | msgstr "Github" 36 | 37 | #: src/applicationwindow.ui:10 src/applicationwindow.ui:69 38 | msgid "Forklift" 39 | msgstr "Forklift" 40 | 41 | #: src/applicationwindow.ui:76 src/items_actionrow.ui:22 42 | msgid "title" 43 | msgstr "başlık" 44 | 45 | #: src/applicationwindow.ui:87 46 | msgid "1" 47 | msgstr "1" 48 | 49 | #: src/applicationwindow.ui:111 50 | msgid "extracting info" 51 | msgstr "bilgi çıkartılıyor" 52 | 53 | #: src/applicationwindow.ui:122 54 | msgid "exinfo" 55 | msgstr "exinfo" 56 | 57 | #: src/applicationwindow.ui:263 58 | msgid "Videos" 59 | msgstr "Videolar" 60 | 61 | #: src/applicationwindow.ui:421 62 | msgid "Options" 63 | msgstr "Seçenekler" 64 | 65 | #: src/applicationwindow.ui:453 66 | msgid "Use geobypass" 67 | msgstr "Geobypass kullan" 68 | 69 | #: src/applicationwindow.ui:465 70 | msgid "" 71 | "IP range in CIDR notation that will be used similarly to geo_bypass_country" 72 | msgstr "" 73 | "geo_bypass_country ile benzer şekilde kullanılacak CIDR gösteriminde IP " 74 | "aralığı" 75 | 76 | #: src/applicationwindow.ui:466 src/applicationwindow.ui:1098 77 | msgid "geo_bypass_ip_block" 78 | msgstr "geo_bypass_ip_block" 79 | 80 | #: src/applicationwindow.ui:479 81 | msgid "" 82 | "Two-letter ISO 3166-2 country code that will be used for explicit geographic " 83 | "restriction bypassing via faking X-Forwarded-For HTTP header" 84 | msgstr "" 85 | "Bariz coğrafi kısıtlamaları atlamak için Sahte X-Forwarded-For HTTP " 86 | "üstbilgisi yoluyla kullanılacak iki harfli ISO 3166-2 ülke kodu" 87 | 88 | #: src/applicationwindow.ui:480 src/applicationwindow.ui:1086 89 | msgid "geo_bypass_country" 90 | msgstr "geo_bypass_country" 91 | 92 | #: src/applicationwindow.ui:504 93 | msgid "Use authentification" 94 | msgstr "Kimlik doğrulama kullan" 95 | 96 | #: src/applicationwindow.ui:516 src/applicationwindow.ui:589 97 | msgid "Password for accessing a video" 98 | msgstr "Video erişim parolası" 99 | 100 | #: src/applicationwindow.ui:517 src/applicationwindow.ui:1014 101 | msgid "videopassword" 102 | msgstr "videopassword" 103 | 104 | #: src/applicationwindow.ui:530 105 | msgid "Username for authentication purposes" 106 | msgstr "Kimlik doğrulama için kullanıcı" 107 | 108 | #: src/applicationwindow.ui:531 src/applicationwindow.ui:1026 109 | msgid "username" 110 | msgstr "username" 111 | 112 | #: src/applicationwindow.ui:544 113 | msgid "Password for authentication purposes" 114 | msgstr "Kimlik doğrulama için parola" 115 | 116 | #: src/applicationwindow.ui:547 src/applicationwindow.ui:1038 117 | msgid "password" 118 | msgstr "password" 119 | 120 | #: src/applicationwindow.ui:561 121 | msgid "Multiple-system operator account password" 122 | msgstr "Çoklu sistem operatörü hesap parolası" 123 | 124 | #: src/applicationwindow.ui:562 src/applicationwindow.ui:1062 125 | msgid "ap_password" 126 | msgstr "ap_password" 127 | 128 | #: src/applicationwindow.ui:575 129 | msgid "Multiple-system operator account username" 130 | msgstr "Çoklu sistem operatörü hesap kullanıcı adı" 131 | 132 | #: src/applicationwindow.ui:576 src/applicationwindow.ui:1050 133 | msgid "ap_username" 134 | msgstr "ap_username" 135 | 136 | #: src/applicationwindow.ui:590 src/applicationwindow.ui:1074 137 | msgid "ap_mso" 138 | msgstr "ap_mso" 139 | 140 | #: src/applicationwindow.ui:614 src/applicationwindow.ui:1002 141 | msgid "Custom format code" 142 | msgstr "Özel biçim kodu" 143 | 144 | #: src/applicationwindow.ui:627 145 | msgid "Enter format code" 146 | msgstr "Biçim kodunu gir" 147 | 148 | #: src/applicationwindow.ui:684 149 | msgid "mp4" 150 | msgstr "mp4" 151 | 152 | #: src/applicationwindow.ui:685 153 | msgid "Convert to mp4" 154 | msgstr "Mp4 biçimine çevir" 155 | 156 | #: src/applicationwindow.ui:693 157 | msgid "webm" 158 | msgstr "webm" 159 | 160 | #: src/applicationwindow.ui:694 161 | msgid "Convert to webm" 162 | msgstr "Webm biçimine çevir" 163 | 164 | #: src/applicationwindow.ui:702 165 | msgid "mkv" 166 | msgstr "mkv" 167 | 168 | #: src/applicationwindow.ui:703 169 | msgid "Convert to mkv" 170 | msgstr "Mkv biçimine çevir" 171 | 172 | #: src/applicationwindow.ui:711 173 | msgid "avi" 174 | msgstr "avi" 175 | 176 | #: src/applicationwindow.ui:712 177 | msgid "Convert to avi" 178 | msgstr "Avi biçimine çevir" 179 | 180 | #: src/applicationwindow.ui:720 181 | msgid "ogg" 182 | msgstr "ogg" 183 | 184 | #: src/applicationwindow.ui:721 185 | msgid "Convert to ogg" 186 | msgstr "Ogg biçimine çevir" 187 | 188 | #: src/applicationwindow.ui:729 189 | msgid "flv" 190 | msgstr "flv" 191 | 192 | #: src/applicationwindow.ui:730 193 | msgid "Convert to flv" 194 | msgstr "Flv biçimine çevir" 195 | 196 | #: src/applicationwindow.ui:738 src/applicationwindow.ui:756 197 | msgid "mp3" 198 | msgstr "mp3" 199 | 200 | #: src/applicationwindow.ui:739 201 | msgid "Convert to mp3" 202 | msgstr "Mp3 biçimine çevir" 203 | 204 | #: src/applicationwindow.ui:747 205 | msgid "wav" 206 | msgstr "wav" 207 | 208 | #: src/applicationwindow.ui:748 209 | msgid "Convert to wav" 210 | msgstr "Wav biçimine çevir" 211 | 212 | #: src/applicationwindow.ui:757 213 | msgid "Convert to vorbis" 214 | msgstr "Vorbis biçimine çevir" 215 | 216 | #: src/applicationwindow.ui:765 217 | msgid "opus" 218 | msgstr "opus" 219 | 220 | #: src/applicationwindow.ui:766 221 | msgid "Convert to opus" 222 | msgstr "Opus biçimine çevir" 223 | 224 | #: src/applicationwindow.ui:774 225 | msgid "m4a" 226 | msgstr "m4a" 227 | 228 | #: src/applicationwindow.ui:775 229 | msgid "Convert to m4a" 230 | msgstr "M4a biçimine çevir" 231 | 232 | #: src/applicationwindow.ui:783 233 | msgid "flac" 234 | msgstr "flac" 235 | 236 | #: src/applicationwindow.ui:784 237 | msgid "Convert to flac" 238 | msgstr "Flac biçimine çevir" 239 | 240 | #: src/applicationwindow.ui:792 241 | msgid "aac" 242 | msgstr "aac" 243 | 244 | #: src/applicationwindow.ui:793 245 | msgid "Convert to aac" 246 | msgstr "Aac biçimine çevir" 247 | 248 | #: src/applicationwindow.ui:803 249 | msgid "conversion" 250 | msgstr "dünüşüm" 251 | 252 | #: src/applicationwindow.ui:831 253 | msgid "formats" 254 | msgstr "biçimler" 255 | 256 | #: src/applicationwindow.ui:867 257 | msgid "Selected videos" 258 | msgstr "Seçilen videolar" 259 | 260 | #: src/applicationwindow.ui:941 261 | msgid "Selected options" 262 | msgstr "Seçilen seçenekler" 263 | 264 | #: src/applicationwindow.ui:1132 src/downloadprogressactionrow.ui:53 265 | msgid "page0" 266 | msgstr "page0" 267 | 268 | #: src/applicationwindow.ui:1178 269 | msgid "Enter URL" 270 | msgstr "Bağlantı gir" 271 | 272 | #: src/applicationwindow.ui:1182 273 | msgid "URL" 274 | msgstr "URL" 275 | 276 | #: src/applicationwindow.ui:1197 277 | msgid "YouTube" 278 | msgstr "YouTube" 279 | 280 | #: src/applicationwindow.ui:1198 281 | msgid "Soundcloud" 282 | msgstr "Soundcloud" 283 | 284 | #: src/applicationwindow.ui:1210 285 | msgid "Search" 286 | msgstr "Ara" 287 | 288 | #: src/applicationwindow.ui:1281 289 | msgid "Download Status Info" 290 | msgstr "İndirme Durum Bilgisi" 291 | 292 | #: src/applicationwindow.ui:1333 293 | msgid "_About Forklift" 294 | msgstr "Forklift _Hakkında" 295 | 296 | #: src/downloadprogressactionrow.ui:42 297 | msgid "page1" 298 | msgstr "page1" 299 | 300 | #: src/formats_actionrow.ui:11 301 | msgid "249 - vp9codec - 7,5 MB" 302 | msgstr "249 - vp9codec - 7,5 MB" 303 | 304 | #: src/formats_actionrow.ui:12 305 | msgid "mp4 - Video only - 144p - resolutionm" 306 | msgstr "mp4 - Sadece video - 144p - çözünürlük" 307 | 308 | #: src/items_actionrow.ui:10 309 | msgid "World" 310 | msgstr "Dünya" 311 | 312 | #: src/items_actionrow.ui:11 313 | msgid "Hello" 314 | msgstr "Herhaba" 315 | 316 | #: src/items_actionrow.ui:51 317 | msgid "alt_title" 318 | msgstr "alt_title" 319 | 320 | #: src/items_actionrow.ui:76 src/items_actionrow.ui:175 321 | #: src/items_actionrow.ui:274 322 | msgid "button" 323 | msgstr "button" 324 | 325 | #: src/items_actionrow.ui:94 326 | msgid "id" 327 | msgstr "id" 328 | 329 | #: src/items_actionrow.ui:122 330 | msgid "uploader" 331 | msgstr "uploader" 332 | 333 | #: src/items_actionrow.ui:150 334 | msgid "uploader_id" 335 | msgstr "uploader_id" 336 | 337 | #: src/items_actionrow.ui:193 338 | msgid "uploader_date" 339 | msgstr "uploader_date" 340 | 341 | #: src/items_actionrow.ui:221 342 | msgid "license" 343 | msgstr "license" 344 | 345 | #: src/items_actionrow.ui:249 346 | msgid "creator" 347 | msgstr "creator" 348 | 349 | #: src/items_actionrow.ui:292 350 | msgid "description" 351 | msgstr "description" 352 | -------------------------------------------------------------------------------- /src/Forklift.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | applicationwindow.ui 5 | aboutdialog.ui 6 | items_actionrow.ui 7 | formats_actionrow.ui 8 | downloadprogressactionrow.ui 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Forklift.in: -------------------------------------------------------------------------------- 1 | #!@PYTHON@ 2 | 3 | # it under the terms of the GNU General Public License as published by 4 | # the Free Software Foundation, either version 3 of the License, or 5 | # (at your option) any later version. 6 | # 7 | # This program is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | # GNU General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU General Public License 13 | # along with this program. If not, see . 14 | 15 | import os 16 | import sys 17 | import signal 18 | import gettext 19 | 20 | VERSION = '@VERSION@' 21 | pkgdatadir = '@pkgdatadir@' 22 | localedir = '@localedir@' 23 | 24 | sys.path.insert(1, pkgdatadir) 25 | signal.signal(signal.SIGINT, signal.SIG_DFL) 26 | gettext.install('Forklift', localedir) 27 | 28 | if __name__ == '__main__': 29 | import gi 30 | 31 | from gi.repository import Gio 32 | resource = Gio.Resource.load(os.path.join(pkgdatadir, 'Forklift.gresource')) 33 | resource._register() 34 | 35 | from Forklift import main 36 | sys.exit(main.main(VERSION)) 37 | -------------------------------------------------------------------------------- /src/Forklift.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- 3 | # 4 | # main.py 5 | # Copyright (C) 2018 johnn3y 6 | # 7 | # Vorbereitung is free software: you can redistribute it and/or modify it 8 | # under the terms of the GNU General Public License as published by the 9 | # Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # Vorbereitung is distributed in the hope that it will be useful, but 13 | # WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | # See the GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License along 18 | # with this program. If not, see . 19 | #import gi 20 | #gi.require_version('Gtk', '3.24') 21 | #from gi.repository import Gtk 22 | import os, sys 23 | 24 | 25 | from application import Application 26 | 27 | 28 | if __name__ == "__main__": 29 | #app=Application() 30 | app=Application(version=VERSION) 31 | sys.exit(app.run(sys.argv)) 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Johnn3y/Forklift/6dd26bd864d643dfb81310254b57aac93f8aabec/src/__init__.py -------------------------------------------------------------------------------- /src/aboutdialog.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 38 | 39 | -------------------------------------------------------------------------------- /src/application.py: -------------------------------------------------------------------------------- 1 | # application.py 2 | # 3 | # Copyright (C) 2018 - johnn3y 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | from .applicationwindow import ApplicationWindow 18 | from gi.repository import GLib, Gio, Gtk 19 | import sys 20 | 21 | import gi 22 | gi.require_version('Gtk', '3.0') 23 | 24 | APPLICATION_NAME="Forklift"#localized 25 | PRGNAME="Forklift"#not localized 26 | APPLICATION_ID="com.github.Johnn3y.Forklift" 27 | 28 | class Application(Gtk.Application): 29 | 30 | def __init__(self,version, *args, **kwargs): 31 | super().__init__(*args, **kwargs) 32 | 33 | GLib.set_application_name(APPLICATION_NAME) 34 | GLib.set_prgname(PRGNAME) 35 | self.set_application_id(APPLICATION_ID) 36 | self.application_version=version 37 | 38 | def do_startup(self): 39 | Gtk.Application.do_startup(self) 40 | 41 | self.build_app_menu() 42 | 43 | def do_activate(self): 44 | self.window = ApplicationWindow(application=self, title=APPLICATION_NAME, icon_name=self.get_application_id()) 45 | self.window.present() 46 | 47 | def build_app_menu(self): 48 | actionEntries = [('about', self.on_about)] 49 | 50 | for action, callback in actionEntries: 51 | simpleAction = Gio.SimpleAction.new(action, None) 52 | simpleAction.connect('activate', callback) 53 | self.add_action(simpleAction) 54 | 55 | def on_about(self, action, param): 56 | AboutDialog(transient_for=self.window, attached_to=self.window, visible=True, version= self.application_version,logo_icon_name=self.get_application_id()) 57 | 58 | 59 | @Gtk.Template(resource_path='/com/github/Johnn3y/Forklift/aboutdialog.ui') 60 | class AboutDialog(Gtk.AboutDialog): 61 | __gtype_name__ = "AboutDialog" 62 | 63 | def __init__(self, **kwargs): 64 | super().__init__(**kwargs) 65 | -------------------------------------------------------------------------------- /src/applicationwindow.py: -------------------------------------------------------------------------------- 1 | # applicationwindow.py 2 | # 3 | # Copyright (C) 2018 - johnn3y 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | from __future__ import unicode_literals 18 | from .items import InfoExtraction, Download, Item, DownloadProgressItem 19 | 20 | import gi 21 | 22 | gi.require_version('Gtk', '3.0') 23 | gi.require_version('Handy', '0.0') 24 | gi.require_version('Dazzle', '1.0') 25 | from gi.repository import Gtk, Gdk, GLib, GObject, Gio, Handy, Dazzle 26 | 27 | DEFAULT_DOWNLOAD_FOLDER='.' 28 | @Gtk.Template(resource_path='/com/github/Johnn3y/Forklift/applicationwindow.ui') 29 | class ApplicationWindow(Gtk.ApplicationWindow): 30 | __gtype_name__ = 'ApplicationWindow' 31 | addpopover = Gtk.Template.Child() 32 | addpopoverentry = Gtk.Template.Child() 33 | detailsbutton = Gtk.Template.Child() 34 | ficb = Gtk.Template.Child() 35 | downloadpopover = Gtk.Template.Child() 36 | addpopoverstack = Gtk.Template.Child() 37 | searchtype = Gtk.Template.Child() 38 | gtklb = Gtk.Template.Child() 39 | dnd_stack = Gtk.Template.Child() 40 | download_progress_listbox = Gtk.Template.Child() 41 | actionbar = Gtk.Template.Child() 42 | 43 | lstore = GObject.Property(type=Gio.ListStore) 44 | downloadprogressliststore = GObject.Property(type=Gio.ListStore) 45 | 46 | flb = Gtk.Template.Child() 47 | gtklb1 = Gtk.Template.Child() 48 | gtklb2 = Gtk.Template.Child() 49 | 50 | stack1_formats= Gtk.Template.Child() 51 | 52 | leaflet2 = Gtk.Template.Child() 53 | hbleaflet = Gtk.Template.Child() 54 | 55 | fw1button = Gtk.Template.Child() 56 | bw2button = Gtk.Template.Child() 57 | 58 | ab2 = Gtk.Template.Child() 59 | ab3 = Gtk.Template.Child() 60 | 61 | sg2 = Gtk.Template.Child() 62 | sg3 = Gtk.Template.Child() 63 | swg = Gtk.Template.Child() 64 | 65 | savebutton = Gtk.Template.Child() 66 | 67 | conversionlb = Gtk.Template.Child() 68 | 69 | selectedformatbox = Gtk.Template.Child() 70 | 71 | titlebar_stack = Gtk.Template.Child() 72 | extraction_threads_counter_label = Gtk.Template.Child() 73 | 74 | extraction_thread_counter = GObject.Property(type=int) 75 | 76 | authentification_expander_row = Gtk.Template.Child() 77 | custom_code_expander_row = Gtk.Template.Child() 78 | geobypass_expander_row = Gtk.Template.Child() 79 | 80 | formatcode_entry4 = Gtk.Template.Child() 81 | videopassword_entry = Gtk.Template.Child() 82 | username_entry = Gtk.Template.Child() 83 | password_entry = Gtk.Template.Child() 84 | ap_username_entry = Gtk.Template.Child() 85 | ap_password_entry = Gtk.Template.Child() 86 | ap_mso_entry = Gtk.Template.Child() 87 | geo_bypass_country_entry = Gtk.Template.Child() 88 | geo_bypass_ip_block_entry = Gtk.Template.Child() 89 | 90 | custom_code_action_row = Gtk.Template.Child() 91 | videopassword_action_row = Gtk.Template.Child() 92 | username_action_row = Gtk.Template.Child() 93 | password_action_row = Gtk.Template.Child() 94 | ap_username_action_row = Gtk.Template.Child() 95 | ap_password_action_row = Gtk.Template.Child() 96 | ap_mso_action_row = Gtk.Template.Child() 97 | geo_bypass_country_action_row = Gtk.Template.Child() 98 | geo_bypass_ip_block_action_row = Gtk.Template.Child() 99 | 100 | 101 | def __init__(self, **kwargs): 102 | super().__init__(**kwargs) 103 | 104 | #uff=[{"title_repr":"Convert to wav","subtitle_repr":"wav","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"wav"}]}},{"title_repr":"Convert to mp3","subtitle_repr":"mp3","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"mp3"}]}},{"title_repr":"Convert to aac","subtitle_repr":"aac","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"aac"}]}},{"title_repr":"Convert to flac","subtitle_repr":"flac","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"flac"}]}},{"title_repr":"Convert to m4a","subtitle_repr":"m4a","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"m4a"}]}},{"title_repr":"Convert to opus","subtitle_repr":"opus","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"opus"}]}},{"title_repr":"Convert to vorbis","subtitle_repr":"vorbis","icon_name":"audio-x-generic-symbolic","ydl_opts":{'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':"vorbis"}]}},{"title_repr":"Convert to mp4","subtitle_repr":"mp4","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"mp4"}]}},{"title_repr":"Convert to flv","subtitle_repr":"flv","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"flv"}]}},{"title_repr":"Convert to ogg","subtitle_repr":"ogg","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"ogg"}]}},{"title_repr":"Convert to avi","subtitle_repr":"avi","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"avi"}]}},{"title_repr":"Convert to mkv","subtitle_repr":"mkv","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"mkv"}]}},{"title_repr":"Convert to webm","subtitle_repr":"webm","icon_name":"video-x-generic-symbolic","ydl_opts":{'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':"webm"}]}}] 105 | #for u in uff: 106 | # ar=FormatsRow(u["icon_name"],u["title_repr"],u["subtitle_repr"],u["ydl_opts"]) 107 | # self.conversionlb.prepend(ar) 108 | for a in self.conversionlb.get_children(): 109 | if a.get_subtitle() in ['mp4','webm','mkv','avi','ogg','flv']: 110 | a.ydl_opts = {'postprocessors':[{'key': 'FFmpegVideoConvertor', 'format':a.get_subtitle()}]} 111 | elif a.get_subtitle() in ['mp3','wav','vorbis','opus','m4a','flac','aac']: 112 | a.ydl_opts = {'extractaudio':True,'postprocessors':[{'key': 'FFmpegExtractAudio', 'preferredcodec':a.get_subtitle()}]} 113 | 114 | 115 | 116 | self.leaflet2.connect("notify::folded",self.on_leaflet_visible_changed) 117 | 118 | self.dnd_stack.drag_dest_set(Gtk.DestDefaults.ALL, [], Gdk.DragAction.COPY) 119 | self.dnd_stack.drag_dest_add_text_targets() 120 | 121 | self.set_property("lstore",Gio.ListStore.new(Item)) 122 | self.gtklb.bind_model(self.lstore, self.mflb) 123 | self.lstore.connect("items_changed",self.on_lstore_items_changed) 124 | 125 | 126 | self.empty_state = Dazzle.EmptyState(visible=True,icon_name=self.get_application().get_application_id()+"-symbolic",title=GLib.get_application_name(),subtitle="• Click ➕ above to type in URL or to search,\n• click 📋 above to paste URL from Clipboard, or\n• Drag-and-Drop URL here.") 127 | self.dnd_stack.add(self.empty_state) 128 | self.on_lstore_items_changed(None,None,None,None) 129 | 130 | self.set_property("downloadprogressliststore",Gio.ListStore.new(DownloadProgressItem)) 131 | self.refresh_bind_model() 132 | self.ficb.set_current_folder(DEFAULT_DOWNLOAD_FOLDER) 133 | 134 | self.authentification_expander_row.connect("notify::enable-expansion",self.on_authentification_expander_row_enable_expansion_changed) 135 | self.custom_code_expander_row.connect("notify::enable-expansion",self.on_custom_code_expander_row_enable_expansion_changed) 136 | self.geobypass_expander_row.connect("notify::enable-expansion",self.on_geobypass_expander_row_enable_expansion_changed) 137 | 138 | def on_custom_code_expander_row_enable_expansion_changed(self, expander_row, event): 139 | self.custom_code_action_row.set_visible(expander_row.get_enable_expansion()) 140 | self.selectedformatbox.set_visible(not expander_row.get_enable_expansion()) 141 | self.savebutton.set_sensitive(self.custom_code_action_row.get_visible() or self.selectedformatbox.get_visible()) 142 | #self.custom_code_action_row.set_title(self.formatcode_entry4.get_text()) 143 | #self.custom_code_action_row.ydl_opts={"format":self.formatcode_entry4.get_text()} 144 | #self.on_formatcode_entry4_changed(self, self.formatcode_entry4) 145 | 146 | def on_authentification_expander_row_enable_expansion_changed(self, expander_row, event): 147 | for a in [self.videopassword_action_row,self.username_action_row,self.password_action_row, 148 | self.ap_username_action_row,self.ap_password_action_row,self.ap_mso_action_row]: 149 | if expander_row.get_enable_expansion() == False: 150 | a.set_visible(False) 151 | else: 152 | a.set_visible(a.get_title()!="") 153 | 154 | @Gtk.Template.Callback() 155 | def on_entry_changed(self, entry): 156 | #m={Entry:(ActionRow,is_not_pw_entry,ydl_code)} 157 | m={self.formatcode_entry4:(self.custom_code_action_row,True,"format"), 158 | self.videopassword_entry:(self.videopassword_action_row,False,"videopassword"), 159 | self.username_entry:(self.username_action_row,True,"username"), 160 | self.password_entry:(self.password_action_row,False,"password"), 161 | self.ap_username_entry:(self.ap_username_action_row,True,"ap_username"), 162 | self.ap_password_entry:(self.ap_password_action_row,False,"ap_password"), 163 | self.ap_mso_entry:(self.ap_mso_action_row,False,"ap_mso"), 164 | self.geo_bypass_country_entry:(self.geo_bypass_country_action_row,True,"geo_bypass_country"), 165 | self.geo_bypass_ip_block_entry:(self.geo_bypass_ip_block_action_row,True,"geo_bypass_ip_block_entry")} 166 | m[entry][0].set_visible(entry.get_text()!="") 167 | def f():return "***" if entry.get_text()!="" else "" 168 | m[entry][0].set_title(entry.get_text() if m[entry][1] else f()) 169 | m[entry][0].ydl_opts={m[entry][2]:entry.get_text()} 170 | 171 | 172 | def on_geobypass_expander_row_enable_expansion_changed(self, expander_row, event): 173 | if expander_row.get_enable_expansion() == False: 174 | self.geo_bypass_country_action_row.set_visible(False) 175 | self.geo_bypass_ip_block_action_row.set_visible(False) 176 | 177 | 178 | def on_lstore_items_changed(self, pos, rm, a, d): 179 | self.dnd_stack.set_visible_child(self.empty_state if len(self.lstore) == 0 else self.leaflet2) 180 | 181 | def mflb(self, item): 182 | return MyLabel(item) 183 | 184 | def lbfilter(self, item): 185 | #if self.lstore.get(item).is_selected(): 186 | return MyLabel(item) 187 | 188 | def progress_model(self, item): 189 | return Downloadprogressactionrow(item) 190 | 191 | @Gtk.Template.Callback() 192 | def on_ok_clicked(self, okbutton): 193 | txt = self.addpopoverentry.get_text() 194 | if self.addpopoverstack.get_visible_child_name() == "searchbox": 195 | txt = self.searchtype.get_active_id()+':'+txt 196 | self.start_download(txt) 197 | self.addpopover.popdown() 198 | 199 | @Gtk.Template.Callback() 200 | def on_paste_clicked(self, pastebutton): 201 | clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD) 202 | self.start_download(clipboard.wait_for_text()) 203 | 204 | def start_download(self, url): 205 | self.change_extraction_thread_counter(True) 206 | thread = InfoExtraction(url, self.callback, self.change_extraction_thread_counter, self.send_notification) 207 | thread.start() 208 | 209 | def callback(self, item): 210 | self.lstore.append(item) 211 | 212 | @Gtk.Template.Callback() 213 | def on_drag_data_received(self, widget, drag_content, x, y, data, info, time): 214 | self.start_download(data.get_text()) 215 | 216 | 217 | 218 | def on_leaflet_visible_changed(self, leaflet, event): 219 | self.fw1button.set_visible(leaflet.get_fold()==Handy.Fold.FOLDED) 220 | self.ab2.set_visible(leaflet.get_fold()==Handy.Fold.FOLDED) 221 | self.ab3.set_visible(leaflet.get_fold()==Handy.Fold.FOLDED) 222 | 223 | @Gtk.Template.Callback() 224 | def on_new_deleteselectedbutton_clicked(self, button): 225 | for a in self.gtklb.get_selected_rows(): 226 | self.lstore.remove(a.get_index()) 227 | 228 | def change_extraction_thread_counter(self, inc):#if bool(inc) increment else decrement 229 | self.extraction_thread_counter+=1 if inc else -1 230 | self.titlebar_stack.set_visible_child_name("title" if self.extraction_thread_counter==0 else "exinfo") 231 | self.extraction_threads_counter_label.set_text(str(self.extraction_thread_counter)) 232 | def refresh_bind_model(self,i=0): 233 | self.download_progress_listbox.bind_model( 234 | self.downloadprogressliststore, self.progress_model) 235 | def real_download(self, url, ydl_opts, path): 236 | item = DownloadProgressItem(self.refresh_bind_model) 237 | self.downloadprogressliststore.append(item) 238 | ydl_opts['progress_hooks'] = [item.my_hook] 239 | t = Download(url, ydl_opts, path, self.send_notification) 240 | t.start() 241 | @Gtk.Template.Callback() 242 | def on_downloadselectedbutton_clicked(self, selection): 243 | self.set_visible_child_1(None) 244 | for a in self.gtklb.get_selected_rows(): 245 | path, ydl_opts = self.get_settings() 246 | self.real_download(self.lstore.get_item(a.get_index()).webpage_url,ydl_opts,path) 247 | 248 | def get_settings(self): 249 | ydl_opts = {} 250 | path=self.ficb.get_file().get_path() 251 | if self.selectedformatbox.get_visible(): 252 | ydl_opts.update(self.selectedformatbox.get_children()[0].ydl_opts) 253 | for a in [self.custom_code_action_row,self.videopassword_action_row,self.username_action_row,self.password_action_row, 254 | self.ap_username_action_row,self.ap_username_action_row,self.ap_mso_action_row, 255 | self.geo_bypass_country_action_row,self.geo_bypass_ip_block_action_row]: 256 | if a.get_visible(): 257 | ydl_opts.update(a.ydl_opts) 258 | return path, ydl_opts 259 | 260 | def do_show_rows(self,t,a): 261 | self.gtklb1.insert(MyLabel(self.lstore.get_item(a.get_index())),-1) 262 | 263 | @Gtk.Template.Callback() 264 | def on_rows_changed(self,t): 265 | 266 | if len(self.selectedformatbox.get_children())!=0: 267 | self.selectedformatbox.remove(self.selectedformatbox.get_children()[0]) 268 | if len(t.get_selected_rows()) !=0: 269 | title=t.get_selected_row().get_title() 270 | subtitle=t.get_selected_row().get_subtitle() 271 | icon_name=t.get_selected_row().get_icon_name() 272 | ydl_opts=t.get_selected_row().ydl_opts 273 | fr=FormatsRow(icon_name,title,subtitle,ydl_opts) 274 | self.selectedformatbox.add(fr) 275 | self.savebutton.set_sensitive(len(self.selectedformatbox.get_children())!=0) 276 | 277 | @Gtk.Template.Callback() 278 | def on_row_selected(self, t): 279 | self.actionbar.set_visible(len(t.get_selected_rows()) != 0) 280 | 281 | for a in self.sg2.get_widgets(): 282 | a.set_visible(len(t.get_selected_rows()) != 0) 283 | for a in self.sg3.get_widgets(): 284 | a.set_visible(len(t.get_selected_rows()) != 0) 285 | for i in self.gtklb1.get_children(): 286 | self.gtklb1.remove(i) 287 | t.selected_foreach(self.do_show_rows) 288 | if len(t.get_selected_rows()) == 1: 289 | self.flb.bind_model(self.lstore.get_item(t.get_selected_rows()[0].get_index()).formats,self.formats_model) 290 | self.stack1_formats.set_visible(len(t.get_selected_rows()) == 1) 291 | 292 | 293 | def formats_model(self, a): 294 | return FormatsRow(a.icon_name,a.title_repr,a.subtitle_repr,a.ydl_opts) 295 | 296 | @Gtk.Template.Callback() 297 | def on_flb_selected_rows_changed(self, t): 298 | if len(t.get_selected_rows()) ==1: 299 | pass 300 | #self.selectedformatsbox.add(FormatsRow) 301 | @Gtk.Template.Callback() 302 | def on_download_progress_listbox_selected_rows(self, t): 303 | self.detailsbutton.set_visisble(len(t.get_selected_rows()) != 0) 304 | 305 | @Gtk.Template.Callback() 306 | def set_visible_child_1(self, button): 307 | self.leaflet2.set_visible_child_name("rb0") 308 | self.hbleaflet.set_visible_child_name("hb4") 309 | 310 | @Gtk.Template.Callback() 311 | def set_visible_child_2(self, button): 312 | self.leaflet2.set_visible_child_name("rb1") 313 | self.hbleaflet.set_visible_child_name("hb5") 314 | 315 | @Gtk.Template.Callback() 316 | def set_visible_child_3(self, button): 317 | self.leaflet2.set_visible_child_name("rb2") 318 | self.hbleaflet.set_visible_child_name("hb6") 319 | 320 | def send_notification(self,notification_title,notification_body): 321 | n=Gio.Notification.new(notification_title) 322 | n.set_body(notification_body) 323 | n.set_icon(Gio.Icon.new_for_string(self.get_application().get_application_id())) 324 | self.get_application().send_notification(None,n) 325 | 326 | @Gtk.Template(resource_path='/com/github/Johnn3y/Forklift/formats_actionrow.ui') 327 | class FormatsRow(Handy.ActionRow): 328 | __gtype_name__ = 'FormatsRow' 329 | ydl_opts={} 330 | 331 | def __init__(self,icon_name,title,subtitle,ydl_opts, **kwargs): 332 | super().__init__(**kwargs) 333 | self.set_icon_name(icon_name) 334 | self.set_title(title) 335 | self.set_subtitle(subtitle) 336 | self.ydl_opts=ydl_opts 337 | 338 | class H(Handy.Dialog):#Deprecated 339 | pass 340 | 341 | @Gtk.Template(resource_path='/com/github/Johnn3y/Forklift/items_actionrow.ui') 342 | class MyLabel(Handy.ExpanderRow): 343 | __gtype_name__ = 'lbl' 344 | 345 | title = Gtk.Template.Child() 346 | alt_title = Gtk.Template.Child() 347 | webpage_url = Gtk.Template.Child() 348 | id = Gtk.Template.Child() 349 | uploader = Gtk.Template.Child() 350 | uploader_id = Gtk.Template.Child() 351 | uploader_url = Gtk.Template.Child() 352 | uploader_date = Gtk.Template.Child() 353 | license = Gtk.Template.Child() 354 | creator = Gtk.Template.Child() 355 | thumbnail = Gtk.Template.Child() 356 | description = Gtk.Template.Child() 357 | 358 | def __init__(self, a, **kwargs): 359 | super().__init__(**kwargs) 360 | for i, j in ((a.title, self.set_title), (a.subtitle, self.set_subtitle)): 361 | if i is not None: 362 | j(i) 363 | e = ( 364 | (self.title.set_text, a.title), (self.alt_title.set_text, a.alt_title), (self.webpage_url.set_uri, a.webpage_url), (self.webpage_url.set_label, "webpage_url"), (self.id.set_text, a.id), (self.uploader.set_text, a.uploader), (self.uploader_id.set_text, a.uploader_id), (self.uploader_url.set_uri, a.uploader_url), (self.uploader_url.set_label, "uploader_url"), (self.uploader_date.set_text, a.uploader_date), (self.license.set_text, a.license), (self.creator.set_text, a.creator), (self.thumbnail.set_uri, a.thumbnail), (self.thumbnail.set_label, "thumbnail"), (self.description.set_text, a.description)) 365 | for x, y in e: 366 | try: 367 | x(y) 368 | except TypeError: 369 | pass 370 | 371 | 372 | @Gtk.Template(resource_path='/com/github/Johnn3y/Forklift/downloadprogressactionrow.ui') 373 | class Downloadprogressactionrow(Gtk.Box): 374 | __gtype_name__ = 'Downloadprogressactionrow' 375 | download_progress_actionrow = Gtk.Template.Child() 376 | download_progress_icon_box = Gtk.Template.Child() 377 | 378 | def __init__(self, item, **kwargs): 379 | super().__init__(**kwargs) 380 | self.download_progress_icon_box.add(Dazzle.ProgressIcon(progress = item.download_progress,visible=True,expand=True)) 381 | for i, j in ((item.title, self.download_progress_actionrow.set_title), 382 | (item.subtitle, self.download_progress_actionrow.set_subtitle)): 383 | if i is not None: 384 | j(i) 385 | 386 | -------------------------------------------------------------------------------- /src/cd.py: -------------------------------------------------------------------------------- 1 | # cd.py 2 | # 3 | # Copyright (C) 2018 - johnn3y 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | 18 | import os 19 | 20 | class cd: 21 | """Context manager for changing the current working directory""" 22 | def __init__(self, newPath): 23 | self.newPath = os.path.expanduser(newPath) 24 | 25 | def __enter__(self): 26 | self.savedPath=os.getcwd() 27 | os.chdir(self.newPath) 28 | 29 | def __exit__(self,etype,value,traceback): 30 | os.chdir(self.savedPath) 31 | -------------------------------------------------------------------------------- /src/downloadprogressactionrow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 65 | 66 | -------------------------------------------------------------------------------- /src/downloadprogresslistbox.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | 8 | 9 | True 10 | False 11 | vertical 12 | 13 | 14 | True 15 | False 16 | none 17 | False 18 | 19 | 20 | False 21 | True 22 | 0 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/formats_actionrow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | -------------------------------------------------------------------------------- /src/items.py: -------------------------------------------------------------------------------- 1 | # items.py 2 | # 3 | # Copyright (C) 2018 - johnn3y 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | from __future__ import unicode_literals 18 | import gi 19 | gi.require_version('Gtk','3.0') 20 | from gi.repository import GObject, Gio, GLib 21 | import threading 22 | import youtube_dl 23 | from .cd import cd 24 | 25 | class Format(GObject.GObject): 26 | format_id = GObject.Property(type=str) 27 | url = GObject.Property(type=str) 28 | player_url = GObject.Property(type=str) 29 | ext = GObject.Property(type=str) 30 | format_note = GObject.Property(type=str) 31 | acodec = GObject.Property(type=str) 32 | preference = GObject.Property(type=str) 33 | abr = GObject.Property(type=str) 34 | filesize = GObject.Property(type=str) 35 | tbr = GObject.Property(type=str) 36 | vcodec = GObject.Property(type=str) 37 | format = GObject.Property(type=str) 38 | width = GObject.Property(type=str) 39 | height = GObject.Property(type=str) 40 | title_repr = GObject.Property(type=str) 41 | subtitle_repr = GObject.Property(type=str) 42 | icon_name = GObject.Property(type=str) 43 | ydl_opts = {} 44 | 45 | def __init__(self, dic): 46 | GObject.GObject.__init__(self) 47 | for l in ['format_id', 'url', 'player_url', 'ext', 'format_note', 'acodec', 'preference', 48 | 'abr', 'filesize', 'tbr', 'format', 'vcodec', 'width', 'height']: 49 | self.set_property(l, dic.get(l)) 50 | self.ydl_opts={"format":self.format_id} 51 | 52 | # Create title and subtitle reprs. 53 | sst = "" 54 | fs = "" 55 | 56 | choices={(True,True):"video-x-generic-symbolic",("none",True):"audio-x-generic-symbolic",(True,"none"):"audio-volume-muted-symbolic"} 57 | def g(x): return x if x == "none" else True 58 | self.icon_name=choices[(g(self.vcodec),g(self.acodec))] 59 | 60 | if self.vcodec is not None: 61 | for f, g in ((self.width, 'x'), (self.height, ' ')): 62 | if f is not None: 63 | fs += f+g 64 | 65 | base1000={"base":1000,'list':[(1,'kB'),(2,'MB'),(3,'GB'),(4,'TB'),(5,'PB')]} 66 | for x, y in ((self.tbr, "k"), self.conv(base1000, self.filesize)): 67 | if x is not None: 68 | sst +=" - "+x+y 69 | def h(x): return '' if x is None else x 70 | self.title_repr = h(self.ext)+" - "+h(fs) + \ 71 | "("+h(self.format_note)+")" 72 | self.subtitle_repr = self.format_id+sst 73 | 74 | def conv(self, bdict, by): 75 | if by is None: 76 | return None,None 77 | for a,b in bdict['list']: 78 | mul=pow(bdict['base'],a) 79 | by=int(by) 80 | d=by/mul 81 | if d >= 1 and d < bdict['base']: 82 | c=pow(10,2) 83 | d=int(c*d) 84 | d=d/c 85 | return str(d)," "+b 86 | return str(by), " Bytes" 87 | 88 | 89 | class DownloadProgressItem(GObject.GObject): 90 | status = GObject.Property(type=str) 91 | filename = GObject.Property(type=str) 92 | tmpfilename = GObject.Property(type=str) 93 | downloaded_bytes = GObject.Property(type=int) 94 | total_bytes = GObject.Property(type=int) 95 | total_bytes_estimate = GObject.Property(type=int) 96 | elapsed = GObject.Property(type=str) 97 | eta = GObject.Property(type=str) 98 | speed = GObject.Property(type=str) 99 | fragment_index = GObject.Property(type=str) 100 | fragment_count = GObject.Property(type=str) 101 | 102 | def __init__(self, refresh_bind_model): 103 | GObject.GObject.__init__(self) 104 | self.refresh_bind_model = refresh_bind_model 105 | def my_hook(self, d): 106 | for a in ['status', 'filename', 'tmpfilename', 'downloaded_bytes', 107 | 'total_bytes', 'total_bytes_estimate', 'fragment_index', 'fragment_count']: 108 | try: 109 | self.set_property(a, d.get(a)) 110 | except(TypeError, KeyError): 111 | pass 112 | GLib.idle_add(self.refresh_bind_model) 113 | 114 | @GObject.Property(type=float) 115 | def download_progress(self):#returns float if progress calculated elif progress return True else False 116 | if self.total_bytes != 0: 117 | return self.downloaded_bytes/self.total_bytes 118 | elif self.total_bytes_estimate != 0: 119 | return self.downloaded_bytes/self.total_bytes_estimate 120 | else: 121 | return 0 122 | 123 | @GObject.Property(type=str) 124 | def title(self): 125 | return self.filename 126 | 127 | @GObject.Property(type=str) 128 | def subtitle(self): 129 | return self.status 130 | 131 | class Item(GObject.GObject): 132 | playlist_id = GObject.Property(type=str) 133 | playlist_title = GObject.Property(type=str) 134 | playlist_webpage_url = GObject.Property(type=str) 135 | title = GObject.Property(type=str) 136 | alt_title = GObject.Property(type=str) 137 | webpage_url = GObject.Property(type=str) 138 | id = GObject.Property(type=str) 139 | uploader = GObject.Property(type=str) 140 | uploader_id = GObject.Property(type=str) 141 | uploader_url = GObject.Property(type=str) 142 | uploader_date = GObject.Property(type=str) 143 | license = GObject.Property(type=str) 144 | creator = GObject.Property(type=str) 145 | thumbnail = GObject.Property(type=str) 146 | description = GObject.Property(type=str) 147 | formats = GObject.Property(type=Gio.ListStore) 148 | extractor = GObject.Property(type=str) 149 | extractor_key = GObject.Property(type=str) 150 | subtitle = GObject.Property(type=str) 151 | 152 | def __init__(self, a): 153 | GObject.GObject.__init__(self) 154 | for u in ['playlist_id', 'playlist_title', 'playlist_webpage_url', 'title', 'alt_title', 155 | 'webpage_url', 'id', 'uploader', 'uploader_id', 'uploader_url', 'uploader_date', 'license', 156 | 'creator', 'thumbnail', 'description', 'extractor', 'extractor_key']: 157 | self.set_property(u, a.get(u)) 158 | 159 | self.formats = Gio.ListStore.new(Format) 160 | for f in a['formats']: 161 | b = Format(f) 162 | self.formats.append(b) 163 | 164 | self.subtitle = "" 165 | if self.uploader is not None: 166 | self.subtitle += self.uploader+ " " 167 | if self.extractor == 'generic': 168 | self.subtitle +="@ "+self.webpage_url 169 | elif self.extractor is not None: 170 | self.subtitle +="@ "+self.extractor 171 | 172 | class Download(threading.Thread): 173 | def __init__(self, url, ydl_opts, path, notification_callback_function): 174 | threading.Thread.__init__(self) 175 | self.url = url 176 | self.ydl_opts = ydl_opts 177 | self.path = path 178 | self.notification_callback_function = notification_callback_function 179 | 180 | def my_hook(self, d): 181 | status = ['finished', 'error', 'downloading'] 182 | for stat in status: 183 | if stat is d['status']: 184 | self.model.set_value(self.iter, 0, d['status']) 185 | if d['status'] == 'finished' or d['status'] == 'error': 186 | GLib.idle_add(self.notification_callback_function,d['status'],d['filename']) 187 | if d['status'] == 'downloading': 188 | for a, b in enumerate(['status', 'filename', 'tmpfilename', 'downloaded_bytes', 'total_bytes', 'total_bytes_estimate', 'elapsed', 'eta', 'speed', 'fragment_index', 'fragment_count']): 189 | try: 190 | self.model.set_value(self.iter, a, str(d[b])) 191 | except(TypeError, KeyError): 192 | pass 193 | 194 | def run(self): 195 | # self.ydl_opts['progress_hooks']=[self.my_hook] 196 | with cd(self.path), youtube_dl.YoutubeDL(self.ydl_opts) as ydl: 197 | try: 198 | ydl.download([self.url]) 199 | except youtube_dl.utils.DownloadError as e: 200 | GLib.idle_add(notification_callback_function,'Error',str(e)) 201 | 202 | 203 | class InfoExtraction(threading.Thread): 204 | 205 | def __init__(self, url, callback, change_extraction_thread_counter, notification_callback_function): 206 | threading.Thread.__init__(self) 207 | self.url = url 208 | self.callback = callback 209 | self.change_extraction_thread_counter = change_extraction_thread_counter 210 | self.notification_callback_function = notification_callback_function 211 | 212 | def run(self): 213 | with youtube_dl.YoutubeDL() as ydl: 214 | try: 215 | d = ydl.extract_info(self.url, download = False) 216 | if d is not None: 217 | if d.get('_type') is 'playlist': 218 | playlist_dic={'playlist_id':d.get('playlist_id'), 219 | 'playlist_title':d.get('playlist_title') 220 | ,'playlist_webpage_url':d.get('playlist_webpage_url')} 221 | for entry in d['entries']: 222 | entry.update(playlist_dic) 223 | GLib.idle_add(self.callback, Item(entry)) 224 | else: 225 | GLib.idle_add(self.callback, Item(d)) 226 | except youtube_dl.utils.DownloadError as e: 227 | self.d = None 228 | GLib.idle_add(self.notification_callback_function,"Error","Unable to extract "+self.url) 229 | finally: 230 | GLib.idle_add(self.change_extraction_thread_counter,False) 231 | -------------------------------------------------------------------------------- /src/items_actionrow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 320 | 321 | -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- 1 | # main.py 2 | # 3 | # Copyright (C) 2018 - johnn3y 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | import os, sys 18 | 19 | from .application import Application 20 | 21 | 22 | def main(version): 23 | app=Application(version=version) 24 | return app.run(sys.argv) 25 | -------------------------------------------------------------------------------- /src/meson.build: -------------------------------------------------------------------------------- 1 | pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name()) 2 | moduledir = join_paths(pkgdatadir, 'Forklift') 3 | gnome = import('gnome') 4 | 5 | gnome.compile_resources('Forklift', 6 | 'Forklift.gresource.xml', 7 | gresource_bundle: true, 8 | install: true, 9 | install_dir: pkgdatadir, 10 | ) 11 | 12 | python = import('python') 13 | 14 | conf = configuration_data() 15 | conf.set('PYTHON', python.find_installation('python3').path()) 16 | conf.set('VERSION', meson.project_version()) 17 | conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir'))) 18 | conf.set('pkgdatadir', pkgdatadir) 19 | 20 | dependency('gtk+-3.0') 21 | dependency('libhandy-0.0') 22 | dependency('libdazzle-1.0') 23 | 24 | configure_file( 25 | input: 'Forklift.in', 26 | output: 'Forklift', 27 | configuration: conf, 28 | install: true, 29 | install_dir: get_option('bindir') 30 | ) 31 | 32 | Forklift_sources = [ 33 | '__init__.py', 34 | 'main.py', 35 | 'applicationwindow.py', 36 | 'application.py', 37 | 'cd.py', 38 | 'items.py' 39 | ] 40 | 41 | install_data(Forklift_sources, install_dir: moduledir) 42 | --------------------------------------------------------------------------------