-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A bit of refactoring, organizing files into folders.
- Loading branch information
1 parent
93e0cd5
commit 7f09396
Showing
12 changed files
with
51 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from datetime import datetime | ||
|
||
|
||
def find_missing_entries_in_list(list_to_check, list_to_find): | ||
""" | ||
Finds the missing entries in a list. | ||
Args: | ||
list_to_check (list): The list to check against. | ||
list_to_find (list): The list to find missing entries in. | ||
Returns: | ||
list: A list of missing entries found in list_to_find. | ||
""" | ||
return [item for item in list_to_find if item not in list_to_check] | ||
|
||
|
||
def minutes_until_2100(): | ||
""" | ||
Used for sorting collection so that the newest show up first in Emby. | ||
Returns: | ||
int: The number of minutes remaining until the year 2100. | ||
""" | ||
today = datetime.now() | ||
year_2100 = datetime(2100, 1, 1) | ||
delta = year_2100 - today | ||
minutes = delta.days * 24 * 60 + delta.seconds // 60 | ||
return minutes |